swag updated

This commit is contained in:
James Tombleson 2022-12-11 09:48:44 -08:00
parent 5637d718cf
commit ab8f3e8fde
3 changed files with 1249 additions and 641 deletions

View File

@ -91,234 +91,6 @@ const docTemplate = `{
"responses": {} "responses": {}
} }
}, },
"/config/sources": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Lists the top 50 records",
"responses": {}
}
},
"/config/sources/by/source": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Lists the top 50 records based on the name given. Example: reddit",
"parameters": [
{
"type": "string",
"description": "Source Name",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/by/sourceAndName": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "dadjokes",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "reddit",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/new/reddit": {
"post": {
"tags": [
"Config",
"Source",
"Reddit"
],
"summary": "Creates a new reddit source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/new/twitch": {
"post": {
"tags": [
"Config",
"Source",
"Twitch"
],
"summary": "Creates a new twitch source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/new/youtube": {
"post": {
"tags": [
"Config",
"Source",
"YouTube"
],
"summary": "Creates a new youtube source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "uuid",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
},
"post": {
"tags": [
"Source"
],
"summary": "Marks a source as deleted based on its ID value.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/config/sources/{id}/disable": {
"post": {
"tags": [
"Config",
"Source"
],
"summary": "Disables a source from processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/config/sources/{id}/enable": {
"post": {
"tags": [
"Config",
"Source"
],
"summary": "Enables a source to continue processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/discord/queue": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Debug",
"Discord",
"Queue"
],
"summary": "Returns the top 100 entries from the queue to be processed.",
"responses": {}
}
},
"/discord/webhooks": { "/discord/webhooks": {
"get": { "get": {
"produces": [ "produces": [
@ -541,6 +313,25 @@ const docTemplate = `{
"responses": {} "responses": {}
} }
}, },
"/queue/discord/webhooks": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Queue"
],
"summary": "Returns the top 100 entries from the queue to be processed.",
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListDiscordWebHooksQueueResults"
}
}
}
}
},
"/settings/{key}": { "/settings/{key}": {
"get": { "get": {
"produces": [ "produces": [
@ -562,6 +353,265 @@ const docTemplate = `{
"responses": {} "responses": {}
} }
}, },
"/sources": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Lists the top 50 records",
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSourcesResults"
}
},
"400": {
"description": "Unable to reach SQL or Data problems",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
}
},
"/sources/by/source": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Lists the top 50 records based on the name given. Example: reddit",
"parameters": [
{
"type": "string",
"description": "Source Name",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSourcesResults"
}
},
"400": {
"description": "Unable to query SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Problems with data.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
}
},
"/sources/by/sourceAndName": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "dadjokes",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "reddit",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/new/reddit": {
"post": {
"tags": [
"Source"
],
"summary": "Creates a new reddit source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/new/twitch": {
"post": {
"tags": [
"Source"
],
"summary": "Creates a new twitch source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/new/youtube": {
"post": {
"tags": [
"Source"
],
"summary": "Creates a new youtube source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "uuid",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.GetSourceResult"
}
},
"204": {
"description": "No record found.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"400": {
"description": "Unable to query SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Failed to process data from SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
},
"post": {
"tags": [
"Source"
],
"summary": "Marks a source as deleted based on its ID value.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/sources/{id}/disable": {
"post": {
"tags": [
"Source"
],
"summary": "Disables a source from processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/sources/{id}/enable": {
"post": {
"tags": [
"Source"
],
"summary": "Enables a source to continue processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/subscriptions": { "/subscriptions": {
"get": { "get": {
"produces": [ "produces": [
@ -571,10 +621,29 @@ const docTemplate = `{
"Subscription" "Subscription"
], ],
"summary": "Returns the top 100 entries from the queue to be processed.", "summary": "Returns the top 100 entries from the queue to be processed.",
"responses": {} "responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSubscriptionResults"
}
},
"400": {
"description": "Unable to reach SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Failed to process data from SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
} }
}, },
"/subscriptions/byDiscordId": { "/subscriptions/by/SourceId": {
"get": { "get": {
"produces": [ "produces": [
"application/json" "application/json"
@ -592,10 +661,17 @@ const docTemplate = `{
"required": true "required": true
} }
], ],
"responses": {} "responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSubscriptionResults"
}
}
}
} }
}, },
"/subscriptions/bySourceId": { "/subscriptions/by/discordId": {
"get": { "get": {
"produces": [ "produces": [
"application/json" "application/json"
@ -613,15 +689,31 @@ const docTemplate = `{
"required": true "required": true
} }
], ],
"responses": {} "responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSubscriptionResults"
}
},
"400": {
"description": "Unable to reach SQL or Data problems",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Data problems",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
} }
}, },
"/subscriptions/discord/webhook/delete": { "/subscriptions/discord/webhook/delete": {
"delete": { "delete": {
"tags": [ "tags": [
"Config",
"Source",
"Discord",
"Subscription" "Subscription"
], ],
"summary": "Removes a Discord WebHook Subscription based on the Subscription ID.", "summary": "Removes a Discord WebHook Subscription based on the Subscription ID.",
@ -637,7 +729,7 @@ const docTemplate = `{
"responses": {} "responses": {}
} }
}, },
"/subscriptions/new/discordwebhook": { "/subscriptions/new/discord/webhook": {
"post": { "post": {
"tags": [ "tags": [
"Subscription" "Subscription"
@ -662,6 +754,147 @@ const docTemplate = `{
"responses": {} "responses": {}
} }
} }
},
"definitions": {
"models.DiscordQueueDto": {
"type": "object",
"properties": {
"articleId": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"models.SourceDto": {
"type": "object",
"properties": {
"deleted": {
"type": "boolean"
},
"enabled": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"site": {
"type": "string"
},
"source": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string"
},
"url": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"models.SubscriptionDto": {
"type": "object",
"properties": {
"discordwebhookid": {
"type": "string"
},
"id": {
"type": "string"
},
"sourceid": {
"type": "string"
}
}
},
"routes.ApiError": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
}
}
},
"routes.GetSourceResult": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"$ref": "#/definitions/models.SourceDto"
},
"status": {
"type": "integer"
}
}
},
"routes.ListDiscordWebHooksQueueResults": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"type": "array",
"items": {
"$ref": "#/definitions/models.DiscordQueueDto"
}
},
"status": {
"type": "integer"
}
}
},
"routes.ListSourcesResults": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"type": "array",
"items": {
"$ref": "#/definitions/models.SourceDto"
}
},
"status": {
"type": "integer"
}
}
},
"routes.ListSubscriptionResults": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"type": "array",
"items": {
"$ref": "#/definitions/models.SubscriptionDto"
}
},
"status": {
"type": "integer"
}
}
}
} }
}` }`

View File

@ -82,234 +82,6 @@
"responses": {} "responses": {}
} }
}, },
"/config/sources": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Lists the top 50 records",
"responses": {}
}
},
"/config/sources/by/source": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Lists the top 50 records based on the name given. Example: reddit",
"parameters": [
{
"type": "string",
"description": "Source Name",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/by/sourceAndName": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "dadjokes",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "reddit",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/new/reddit": {
"post": {
"tags": [
"Config",
"Source",
"Reddit"
],
"summary": "Creates a new reddit source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/new/twitch": {
"post": {
"tags": [
"Config",
"Source",
"Twitch"
],
"summary": "Creates a new twitch source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/new/youtube": {
"post": {
"tags": [
"Config",
"Source",
"YouTube"
],
"summary": "Creates a new youtube source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/config/sources/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Config",
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "uuid",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
},
"post": {
"tags": [
"Source"
],
"summary": "Marks a source as deleted based on its ID value.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/config/sources/{id}/disable": {
"post": {
"tags": [
"Config",
"Source"
],
"summary": "Disables a source from processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/config/sources/{id}/enable": {
"post": {
"tags": [
"Config",
"Source"
],
"summary": "Enables a source to continue processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/discord/queue": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Debug",
"Discord",
"Queue"
],
"summary": "Returns the top 100 entries from the queue to be processed.",
"responses": {}
}
},
"/discord/webhooks": { "/discord/webhooks": {
"get": { "get": {
"produces": [ "produces": [
@ -532,6 +304,25 @@
"responses": {} "responses": {}
} }
}, },
"/queue/discord/webhooks": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Queue"
],
"summary": "Returns the top 100 entries from the queue to be processed.",
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListDiscordWebHooksQueueResults"
}
}
}
}
},
"/settings/{key}": { "/settings/{key}": {
"get": { "get": {
"produces": [ "produces": [
@ -553,6 +344,265 @@
"responses": {} "responses": {}
} }
}, },
"/sources": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Lists the top 50 records",
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSourcesResults"
}
},
"400": {
"description": "Unable to reach SQL or Data problems",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
}
},
"/sources/by/source": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Lists the top 50 records based on the name given. Example: reddit",
"parameters": [
{
"type": "string",
"description": "Source Name",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSourcesResults"
}
},
"400": {
"description": "Unable to query SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Problems with data.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
}
},
"/sources/by/sourceAndName": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "dadjokes",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "reddit",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/new/reddit": {
"post": {
"tags": [
"Source"
],
"summary": "Creates a new reddit source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/new/twitch": {
"post": {
"tags": [
"Source"
],
"summary": "Creates a new twitch source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/new/youtube": {
"post": {
"tags": [
"Source"
],
"summary": "Creates a new youtube source to monitor.",
"parameters": [
{
"type": "string",
"description": "name",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "url",
"name": "url",
"in": "query",
"required": true
}
],
"responses": {}
}
},
"/sources/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Source"
],
"summary": "Returns a single entity by ID",
"parameters": [
{
"type": "string",
"description": "uuid",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.GetSourceResult"
}
},
"204": {
"description": "No record found.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"400": {
"description": "Unable to query SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Failed to process data from SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
},
"post": {
"tags": [
"Source"
],
"summary": "Marks a source as deleted based on its ID value.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/sources/{id}/disable": {
"post": {
"tags": [
"Source"
],
"summary": "Disables a source from processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/sources/{id}/enable": {
"post": {
"tags": [
"Source"
],
"summary": "Enables a source to continue processing.",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {}
}
},
"/subscriptions": { "/subscriptions": {
"get": { "get": {
"produces": [ "produces": [
@ -562,10 +612,29 @@
"Subscription" "Subscription"
], ],
"summary": "Returns the top 100 entries from the queue to be processed.", "summary": "Returns the top 100 entries from the queue to be processed.",
"responses": {} "responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSubscriptionResults"
}
},
"400": {
"description": "Unable to reach SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Failed to process data from SQL.",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
} }
}, },
"/subscriptions/byDiscordId": { "/subscriptions/by/SourceId": {
"get": { "get": {
"produces": [ "produces": [
"application/json" "application/json"
@ -583,10 +652,17 @@
"required": true "required": true
} }
], ],
"responses": {} "responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSubscriptionResults"
}
}
}
} }
}, },
"/subscriptions/bySourceId": { "/subscriptions/by/discordId": {
"get": { "get": {
"produces": [ "produces": [
"application/json" "application/json"
@ -604,15 +680,31 @@
"required": true "required": true
} }
], ],
"responses": {} "responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/routes.ListSubscriptionResults"
}
},
"400": {
"description": "Unable to reach SQL or Data problems",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
},
"500": {
"description": "Data problems",
"schema": {
"$ref": "#/definitions/routes.ApiError"
}
}
}
} }
}, },
"/subscriptions/discord/webhook/delete": { "/subscriptions/discord/webhook/delete": {
"delete": { "delete": {
"tags": [ "tags": [
"Config",
"Source",
"Discord",
"Subscription" "Subscription"
], ],
"summary": "Removes a Discord WebHook Subscription based on the Subscription ID.", "summary": "Removes a Discord WebHook Subscription based on the Subscription ID.",
@ -628,7 +720,7 @@
"responses": {} "responses": {}
} }
}, },
"/subscriptions/new/discordwebhook": { "/subscriptions/new/discord/webhook": {
"post": { "post": {
"tags": [ "tags": [
"Subscription" "Subscription"
@ -653,5 +745,146 @@
"responses": {} "responses": {}
} }
} }
},
"definitions": {
"models.DiscordQueueDto": {
"type": "object",
"properties": {
"articleId": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"models.SourceDto": {
"type": "object",
"properties": {
"deleted": {
"type": "boolean"
},
"enabled": {
"type": "boolean"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"site": {
"type": "string"
},
"source": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string"
},
"url": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"models.SubscriptionDto": {
"type": "object",
"properties": {
"discordwebhookid": {
"type": "string"
},
"id": {
"type": "string"
},
"sourceid": {
"type": "string"
}
}
},
"routes.ApiError": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
}
}
},
"routes.GetSourceResult": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"$ref": "#/definitions/models.SourceDto"
},
"status": {
"type": "integer"
}
}
},
"routes.ListDiscordWebHooksQueueResults": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"type": "array",
"items": {
"$ref": "#/definitions/models.DiscordQueueDto"
}
},
"status": {
"type": "integer"
}
}
},
"routes.ListSourcesResults": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"type": "array",
"items": {
"$ref": "#/definitions/models.SourceDto"
}
},
"status": {
"type": "integer"
}
}
},
"routes.ListSubscriptionResults": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"payload": {
"type": "array",
"items": {
"$ref": "#/definitions/models.SubscriptionDto"
}
},
"status": {
"type": "integer"
}
}
}
} }
} }

View File

@ -1,4 +1,95 @@
basePath: /api basePath: /api
definitions:
models.DiscordQueueDto:
properties:
articleId:
type: string
id:
type: string
type: object
models.SourceDto:
properties:
deleted:
type: boolean
enabled:
type: boolean
id:
type: string
name:
type: string
site:
type: string
source:
type: string
tags:
items:
type: string
type: array
type:
type: string
url:
type: string
value:
type: string
type: object
models.SubscriptionDto:
properties:
discordwebhookid:
type: string
id:
type: string
sourceid:
type: string
type: object
routes.ApiError:
properties:
message:
type: string
status:
type: integer
type: object
routes.GetSourceResult:
properties:
message:
type: string
payload:
$ref: '#/definitions/models.SourceDto'
status:
type: integer
type: object
routes.ListDiscordWebHooksQueueResults:
properties:
message:
type: string
payload:
items:
$ref: '#/definitions/models.DiscordQueueDto'
type: array
status:
type: integer
type: object
routes.ListSourcesResults:
properties:
message:
type: string
payload:
items:
$ref: '#/definitions/models.SourceDto'
type: array
status:
type: integer
type: object
routes.ListSubscriptionResults:
properties:
message:
type: string
payload:
items:
$ref: '#/definitions/models.SubscriptionDto'
type: array
status:
type: integer
type: object
info: info:
contact: {} contact: {}
title: NewsBot collector title: NewsBot collector
@ -56,164 +147,6 @@ paths:
50. 50.
tags: tags:
- Articles - Articles
/config/sources:
get:
produces:
- application/json
responses: {}
summary: Lists the top 50 records
tags:
- Config
- Source
/config/sources/{id}:
get:
parameters:
- description: uuid
in: path
name: id
required: true
type: string
produces:
- application/json
responses: {}
summary: Returns a single entity by ID
tags:
- Config
- Source
post:
parameters:
- description: id
in: path
name: id
required: true
type: string
responses: {}
summary: Marks a source as deleted based on its ID value.
tags:
- Source
/config/sources/{id}/disable:
post:
parameters:
- description: id
in: path
name: id
required: true
type: string
responses: {}
summary: Disables a source from processing.
tags:
- Config
- Source
/config/sources/{id}/enable:
post:
parameters:
- description: id
in: path
name: id
required: true
type: string
responses: {}
summary: Enables a source to continue processing.
tags:
- Config
- Source
/config/sources/by/source:
get:
parameters:
- description: Source Name
in: query
name: source
required: true
type: string
produces:
- application/json
responses: {}
summary: 'Lists the top 50 records based on the name given. Example: reddit'
tags:
- Config
- Source
/config/sources/by/sourceAndName:
get:
parameters:
- description: dadjokes
in: query
name: name
required: true
type: string
- description: reddit
in: query
name: source
required: true
type: string
produces:
- application/json
responses: {}
summary: Returns a single entity by ID
tags:
- Config
- Source
/config/sources/new/reddit:
post:
parameters:
- description: name
in: query
name: name
required: true
type: string
- description: url
in: query
name: url
required: true
type: string
responses: {}
summary: Creates a new reddit source to monitor.
tags:
- Config
- Source
- Reddit
/config/sources/new/twitch:
post:
parameters:
- description: name
in: query
name: name
required: true
type: string
responses: {}
summary: Creates a new twitch source to monitor.
tags:
- Config
- Source
- Twitch
/config/sources/new/youtube:
post:
parameters:
- description: name
in: query
name: name
required: true
type: string
- description: url
in: query
name: url
required: true
type: string
responses: {}
summary: Creates a new youtube source to monitor.
tags:
- Config
- Source
- YouTube
/discord/queue:
get:
produces:
- application/json
responses: {}
summary: Returns the top 100 entries from the queue to be processed.
tags:
- Debug
- Discord
- Queue
/discord/webhooks: /discord/webhooks:
get: get:
produces: produces:
@ -369,6 +302,18 @@ paths:
summary: Sends back "pong". Good to test with. summary: Sends back "pong". Good to test with.
tags: tags:
- Debug - Debug
/queue/discord/webhooks:
get:
produces:
- application/json
responses:
"200":
description: ok
schema:
$ref: '#/definitions/routes.ListDiscordWebHooksQueueResults'
summary: Returns the top 100 entries from the queue to be processed.
tags:
- Queue
/settings/{key}: /settings/{key}:
get: get:
parameters: parameters:
@ -383,15 +328,199 @@ paths:
summary: Returns a object based on the Key that was given. summary: Returns a object based on the Key that was given.
tags: tags:
- Settings - Settings
/sources:
get:
produces:
- application/json
responses:
"200":
description: ok
schema:
$ref: '#/definitions/routes.ListSourcesResults'
"400":
description: Unable to reach SQL or Data problems
schema:
$ref: '#/definitions/routes.ApiError'
summary: Lists the top 50 records
tags:
- Source
/sources/{id}:
get:
parameters:
- description: uuid
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: ok
schema:
$ref: '#/definitions/routes.GetSourceResult'
"204":
description: No record found.
schema:
$ref: '#/definitions/routes.ApiError'
"400":
description: Unable to query SQL.
schema:
$ref: '#/definitions/routes.ApiError'
"500":
description: Failed to process data from SQL.
schema:
$ref: '#/definitions/routes.ApiError'
summary: Returns a single entity by ID
tags:
- Source
post:
parameters:
- description: id
in: path
name: id
required: true
type: string
responses: {}
summary: Marks a source as deleted based on its ID value.
tags:
- Source
/sources/{id}/disable:
post:
parameters:
- description: id
in: path
name: id
required: true
type: string
responses: {}
summary: Disables a source from processing.
tags:
- Source
/sources/{id}/enable:
post:
parameters:
- description: id
in: path
name: id
required: true
type: string
responses: {}
summary: Enables a source to continue processing.
tags:
- Source
/sources/by/source:
get:
parameters:
- description: Source Name
in: query
name: source
required: true
type: string
produces:
- application/json
responses:
"200":
description: ok
schema:
$ref: '#/definitions/routes.ListSourcesResults'
"400":
description: Unable to query SQL.
schema:
$ref: '#/definitions/routes.ApiError'
"500":
description: Problems with data.
schema:
$ref: '#/definitions/routes.ApiError'
summary: 'Lists the top 50 records based on the name given. Example: reddit'
tags:
- Source
/sources/by/sourceAndName:
get:
parameters:
- description: dadjokes
in: query
name: name
required: true
type: string
- description: reddit
in: query
name: source
required: true
type: string
produces:
- application/json
responses: {}
summary: Returns a single entity by ID
tags:
- Source
/sources/new/reddit:
post:
parameters:
- description: name
in: query
name: name
required: true
type: string
- description: url
in: query
name: url
required: true
type: string
responses: {}
summary: Creates a new reddit source to monitor.
tags:
- Source
/sources/new/twitch:
post:
parameters:
- description: name
in: query
name: name
required: true
type: string
responses: {}
summary: Creates a new twitch source to monitor.
tags:
- Source
/sources/new/youtube:
post:
parameters:
- description: name
in: query
name: name
required: true
type: string
- description: url
in: query
name: url
required: true
type: string
responses: {}
summary: Creates a new youtube source to monitor.
tags:
- Source
/subscriptions: /subscriptions:
get: get:
produces: produces:
- application/json - application/json
responses: {} responses:
"200":
description: ok
schema:
$ref: '#/definitions/routes.ListSubscriptionResults'
"400":
description: Unable to reach SQL.
schema:
$ref: '#/definitions/routes.ApiError'
"500":
description: Failed to process data from SQL.
schema:
$ref: '#/definitions/routes.ApiError'
summary: Returns the top 100 entries from the queue to be processed. summary: Returns the top 100 entries from the queue to be processed.
tags: tags:
- Subscription - Subscription
/subscriptions/byDiscordId: /subscriptions/by/SourceId:
get: get:
parameters: parameters:
- description: id - description: id
@ -401,11 +530,15 @@ paths:
type: string type: string
produces: produces:
- application/json - application/json
responses: {} responses:
"200":
description: ok
schema:
$ref: '#/definitions/routes.ListSubscriptionResults'
summary: Returns the top 100 entries from the queue to be processed. summary: Returns the top 100 entries from the queue to be processed.
tags: tags:
- Subscription - Subscription
/subscriptions/bySourceId: /subscriptions/by/discordId:
get: get:
parameters: parameters:
- description: id - description: id
@ -415,7 +548,19 @@ paths:
type: string type: string
produces: produces:
- application/json - application/json
responses: {} responses:
"200":
description: ok
schema:
$ref: '#/definitions/routes.ListSubscriptionResults'
"400":
description: Unable to reach SQL or Data problems
schema:
$ref: '#/definitions/routes.ApiError'
"500":
description: Data problems
schema:
$ref: '#/definitions/routes.ApiError'
summary: Returns the top 100 entries from the queue to be processed. summary: Returns the top 100 entries from the queue to be processed.
tags: tags:
- Subscription - Subscription
@ -430,11 +575,8 @@ paths:
responses: {} responses: {}
summary: Removes a Discord WebHook Subscription based on the Subscription ID. summary: Removes a Discord WebHook Subscription based on the Subscription ID.
tags: tags:
- Config
- Source
- Discord
- Subscription - Subscription
/subscriptions/new/discordwebhook: /subscriptions/new/discord/webhook:
post: post:
parameters: parameters:
- description: discordWebHookId - description: discordWebHookId