From 1e09c8c053a22d5ef3fa4fa22ff19e9b4e1692fd Mon Sep 17 00:00:00 2001 From: MineFact Date: Mon, 18 Sep 2023 12:06:10 -0500 Subject: [PATCH] updated swagger and removed routes from README --- README.md | 47 +---------------------- swagger.json | 106 +++++++++++++++++++++++++++------------------------ 2 files changed, 57 insertions(+), 96 deletions(-) diff --git a/README.md b/README.md index 7d7dbb9..ccd4687 100644 --- a/README.md +++ b/README.md @@ -17,54 +17,9 @@ _A REST-API to interface with data from the BuildTheEarth.net Minecraft Network. ## Routes -These are the routes for the Network API. - -Plot System API Docs: +Plot System API Documentation: https://buildtheearth.github.io/network-api/ -### Global Plot System - -- **Get Builder Count:**
-Returns the number of builders of the global plot system.
-[GET] https://psapi.buildtheearth.net/api/plotsystem/builders

- -- **Get Difficulties:**
-Returns the available difficulties of the global plot system.
-[GET] https://psapi.buildtheearth.net/api/plotsystem/difficulties

- -- **Get All Plot System Countries of a Team:**
-Returns the countries of a build team that are available in the global plot system.
-[GET] https://psapi.buildtheearth.net/api/plotsystem/teams/%API_KEY%/countries

- -- **Get All Plot System Cities of a Team:**
-Returns the cities of a build team that are available in the global plot system.
-[GET] https://psapi.buildtheearth.net/api/plotsystem/teams/%API_KEY%/cities

- -- **Get All Plots of a Team:**
-Returns the plots of a build team that are available in the global plot system.
-[GET] https://psapi.buildtheearth.net/api/plotsystem/teams/%API_KEY%/plots

- -- **Get all reviews of a Team:**
-Returns all reviews of a build team that are available in the global plot system.
-[GET] https://psapi.buildtheearth.net/api/plotsystem/teams/%API_KEY%/reviews

- -- **Get all servers of a Team:**
-Returns all servers of a build team that are available in the global plot system.
-[GET] https://psapi.buildtheearth.net/api/plotsystem/teams/%API_KEY%/servers

- -- **Create a Plot for a Team:**
-Saved the plot details for a new plot of a build team in the global plot system.
-[POST] https://psapi.buildtheearth.net/api/plotsystem/teams/%API_KEY%/plots

- -- **Change a Plot of a Team:**
-Changes the plot details of a plot of a build team in the global plot system.
-[PUT] https://psapi.buildtheearth.net/api/plotsystem/teams/%API_KEY%/plots

- -### Build Teams - -- **Get Information about a Build Team:**
-Returns some information about a build team of BuildTheEarth.
-[GET] https://psapi.buildtheearth.net/api/teams/%API_KEY%

## Installation diff --git a/swagger.json b/swagger.json index 308c40b..b2f38bf 100644 --- a/swagger.json +++ b/swagger.json @@ -17,20 +17,17 @@ ], "tags": [ { - "name": "Builders" + "name": "Global Plot System" }, { - "name": "Difficulties" - }, - { - "name": "Teams" + "name": "Build Teams" } ], "paths": { "/api/plotsystem/builders": { "get": { "tags": [ - "Builders" + "Global Plot System" ], "summary": "Get Builder Count", "description": "Returns the number of builders of the global plot system.", @@ -41,12 +38,13 @@ } } }, - "/api/difficulties": { + "/api/plotsystem/difficulties": { "get": { "tags": [ - "Difficulties" + "Global Plot System" ], "summary": "Get Difficulties", + "description": "Returns the available difficulties of the global plot system.", "responses": { "200": { "description": "Success" @@ -54,35 +52,13 @@ } } }, - "/api/teams/{api_key}/cities": { - "get": { - "tags": [ - "Teams" - ], - "summary": "Get Cities of Build Team", - "parameters": [ - { - "name": "api_key", - "in": "path", - "schema": { - "type": "string" - }, - "required": true - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/api/teams/{api_key}/countries": { + "/api/plotsystem/teams/%API_KEY%/cities": { "get": { "tags": [ - "Teams" + "Global Plot System" ], - "summary": "Get Countries of Build Team", + "summary": "Get All Plot System Cities of a Team", + "description": "Returns the cities of a build team that are available in the global plot system.", "parameters": [ { "name": "api_key", @@ -100,12 +76,13 @@ } } }, - "/api/teams/{api_key}/ftp_configuration": { + "/api/plotsystem/teams/%API_KEY%/countries": { "get": { "tags": [ - "Teams" + "Global Plot System" ], - "summary": "Get the FTP Cofiguration of the Build Team", + "summary": "Get All Plot System Countries of a Team", + "description": "Returns the countries of a build team that are available in the global plot system.", "parameters": [ { "name": "api_key", @@ -123,12 +100,13 @@ } } }, - "/api/teams/{api_key}/plots": { + "/api/plotsystem/teams/%API_KEY%/plots": { "get": { "tags": [ - "Teams" + "Global Plot System" ], - "summary": "Get The Plots of a Build Team", + "summary": "Get All Plots of a Team", + "description": "Returns the plots of a build team that are available in the global plot system.", "parameters": [ { "name": "api_key", @@ -147,9 +125,10 @@ }, "post": { "tags": [ - "Teams" + "Global Plot System" ], - "summary": "Add a Plot to a Build Team", + "summary": "Create a Plot for a Build Team", + "description": "Saved the plot details for a new plot of a build team in the global plot system.", "requestBody": { "content": { "application/json": { @@ -186,9 +165,10 @@ }, "put": { "tags": [ - "Teams" + "Global Plot System" ], - "summary": "Update a Plot of a Build Team", + "summary": "Update a Plot of a Build Team", + "description": "Changes the plot details of a plot of a build team in the global plot system.", "requestBody": { "content": { "application/json": { @@ -221,12 +201,37 @@ } } }, - "/api/teams/{api_key}/reviews": { + "/api/plotsystem/teams/%API_KEY%/reviews": { + "get": { + "tags": [ + "Global Plot System" + ], + "summary": "Get all reviews of a Build Team", + "description": "Returns all reviews of a build team that are available in the global plot system.", + "parameters": [ + { + "name": "api_key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success" + } + } + } + }, + "/api/plotsystem/teams/%API_KEY%/servers": { "get": { "tags": [ - "Teams" + "Global Plot System" ], - "summary": "Get Reviews of a Build Team", + "summary": "Get all servers of a Build Team", + "description": "Returns all servers of a build team that are available in the global plot system.", "parameters": [ { "name": "api_key", @@ -244,12 +249,13 @@ } } }, - "/api/teams/{api_key}/servers": { + "/api/teams/%API_KEY%": { "get": { "tags": [ - "Teams" + "Build Teams" ], - "summary": "Get Servers of a Build Team", + "summary": "Get Information about a Build Team", + "description": "Returns some information about a build team of BuildTheEarth.", "parameters": [ { "name": "api_key",