2022-06-19 22:02:44 -07:00
|
|
|
// Package docs GENERATED BY SWAG; DO NOT EDIT
|
|
|
|
// This file was generated by swaggo/swag
|
|
|
|
package docs
|
|
|
|
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
|
|
|
|
const docTemplate = `{
|
|
|
|
"schemes": {{ marshal .Schemes }},
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
|
|
|
"description": "{{escape .Description}}",
|
|
|
|
"title": "{{.Title}}",
|
|
|
|
"contact": {},
|
|
|
|
"version": "{{.Version}}"
|
|
|
|
},
|
|
|
|
"host": "{{.Host}}",
|
|
|
|
"basePath": "{{.BasePath}}",
|
|
|
|
"paths": {
|
|
|
|
"/articles": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Articles"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Lists the top 50 records",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-06-30 14:54:58 -07:00
|
|
|
"/articles/by/sourceid": {
|
2022-07-13 21:31:53 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Articles"
|
|
|
|
],
|
|
|
|
"summary": "Finds the articles based on the SourceID provided. Returns the top 50.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Source ID UUID",
|
|
|
|
"name": "id",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/articles/by/tag": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Articles"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Finds the articles based on the SourceID provided. Returns the top 50.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-07-13 15:52:25 -07:00
|
|
|
"description": "Tag name",
|
2022-07-13 21:31:53 -07:00
|
|
|
"name": "tag",
|
2022-06-30 14:54:58 -07:00
|
|
|
"in": "query",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-04 08:49:17 -08:00
|
|
|
"/articles/{ID}": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Articles"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns an article based on defined ID.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "uuid",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/discord/webhooks": {
|
2022-07-26 13:27:34 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-07-26 13:27:34 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
2022-07-26 13:27:34 -07:00
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/discord/webhooks/by/serverAndChannel": {
|
2022-11-30 21:43:53 -08:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-11-30 21:43:53 -08:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Returns all the known web hooks based on the Server and Channel given.",
|
2022-11-30 21:43:53 -08:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "Fancy Server",
|
|
|
|
"name": "server",
|
2022-11-30 21:43:53 -08:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "memes",
|
|
|
|
"name": "channel",
|
2022-11-30 21:43:53 -08:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/discord/webhooks/new": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Creates a new record for a discord web hook to post data to.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "Server name",
|
|
|
|
"name": "server",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Channel name",
|
|
|
|
"name": "channel",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/discord/webhooks/{id}": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
2022-12-11 09:48:44 -08:00
|
|
|
},
|
|
|
|
"delete": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Deletes a record by ID.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
2022-12-11 09:48:44 -08:00
|
|
|
},
|
|
|
|
"patch": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Updates a valid discord webhook ID based on the body given.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "id",
|
2022-06-19 22:02:44 -07:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
2022-12-11 09:48:44 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"/discord/webhooks/{id}/disable": {
|
2022-12-07 22:47:10 -08:00
|
|
|
"post": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Disables a Webhook from being used.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/discord/webhooks/{id}/enable": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Discord",
|
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Enables a source to continue processing.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/hello/{who}": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"text/plain"
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Debug"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Responds back with \"Hello x\" depending on param passed in.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "Who",
|
|
|
|
"name": "who",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/helloworld": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"text/plain"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Debug"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Responds back with \"Hello world!\"",
|
2022-06-19 22:02:44 -07:00
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/ping": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"text/plain"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Debug"
|
|
|
|
],
|
|
|
|
"summary": "Sends back \"pong\". Good to test with.",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/queue/discord/webhooks": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Queue"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
2022-12-11 09:48:44 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/routes.ListDiscordWebHooksQueueResults"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/settings/{key}": {
|
2022-11-30 21:43:53 -08:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Settings"
|
2022-11-30 21:43:53 -08:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Returns a object based on the Key that was given.",
|
2022-11-30 21:43:53 -08:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "Settings Key value",
|
|
|
|
"name": "key",
|
|
|
|
"in": "path",
|
2022-11-30 21:43:53 -08:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/sources": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2022-08-21 20:02:45 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-08-21 20:02:45 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"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",
|
2022-08-21 20:02:45 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "Source Name",
|
|
|
|
"name": "source",
|
2022-08-21 20:02:45 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
2022-12-11 09:48:44 -08:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/routes.ListSourcesResults"
|
|
|
|
}
|
2022-08-21 20:02:45 -07:00
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"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": [
|
2022-08-21 20:02:45 -07:00
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "dadjokes",
|
|
|
|
"name": "name",
|
2022-08-21 20:02:45 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "reddit",
|
|
|
|
"name": "source",
|
2022-08-21 20:02:45 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/sources/new/reddit": {
|
|
|
|
"post": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Creates a new reddit source to monitor.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "name",
|
|
|
|
"name": "name",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
|
|
|
"in": "query",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
2022-12-11 09:48:44 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"/sources/new/twitch": {
|
|
|
|
"post": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Creates a new twitch source to monitor.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "name",
|
|
|
|
"name": "name",
|
|
|
|
"in": "query",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
2022-08-21 20:02:45 -07:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
2022-12-11 09:48:44 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"/sources/new/youtube": {
|
|
|
|
"post": {
|
2022-11-30 21:43:53 -08:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-11-30 21:43:53 -08:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Creates a new youtube source to monitor.",
|
2022-11-30 21:43:53 -08:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "name",
|
|
|
|
"name": "name",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
|
|
|
"in": "query",
|
2022-11-30 21:43:53 -08:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
2022-08-21 20:02:45 -07:00
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/sources/{id}": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2022-08-21 20:02:45 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-08-21 20:02:45 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Returns a single entity by ID",
|
2022-08-21 20:02:45 -07:00
|
|
|
"parameters": [
|
2022-06-19 22:02:44 -07:00
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "uuid",
|
2022-08-21 20:02:45 -07:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
2022-08-21 20:02:45 -07:00
|
|
|
}
|
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-08-21 20:02:45 -07:00
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-08-21 20:02:45 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Marks a source as deleted based on its ID value.",
|
2022-08-21 20:02:45 -07:00
|
|
|
"parameters": [
|
2022-06-19 22:02:44 -07:00
|
|
|
{
|
|
|
|
"type": "string",
|
2022-08-21 20:02:45 -07:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/sources/{id}/disable": {
|
|
|
|
"post": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Disables a source from processing.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/sources/{id}/enable": {
|
|
|
|
"post": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2022-12-11 09:48:44 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"summary": "Enables a source to continue processing.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-12-11 09:48:44 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/subscriptions": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Subscription"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
2022-12-11 09:48:44 -08:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/subscriptions/by/SourceId": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Subscription"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/routes.ListSubscriptionResults"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"/subscriptions/by/discordId": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Subscription"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2022-12-11 09:48:44 -08:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
2022-07-12 15:28:31 -07:00
|
|
|
},
|
2023-01-21 12:20:33 -08:00
|
|
|
"/subscriptions/details": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Subscription"
|
|
|
|
],
|
|
|
|
"summary": "Returns the top 50 entries with full deatils on the source and output.",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/routes.ListSubscriptionDetails"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-11-30 21:43:53 -08:00
|
|
|
"/subscriptions/discord/webhook/delete": {
|
|
|
|
"delete": {
|
|
|
|
"tags": [
|
|
|
|
"Subscription"
|
|
|
|
],
|
|
|
|
"summary": "Removes a Discord WebHook Subscription based on the Subscription ID.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-21 12:20:33 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
2022-11-30 21:43:53 -08:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
2023-01-21 12:20:33 -08:00
|
|
|
"/subscriptions/discord/webhook/new": {
|
2022-07-12 15:28:31 -07:00
|
|
|
"post": {
|
|
|
|
"tags": [
|
|
|
|
"Subscription"
|
|
|
|
],
|
|
|
|
"summary": "Creates a new subscription to link a post from a Source to a DiscordWebHook.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "discordWebHookId",
|
|
|
|
"name": "discordWebHookId",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "sourceId",
|
|
|
|
"name": "sourceId",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
2022-12-11 09:48:44 -08:00
|
|
|
},
|
|
|
|
"definitions": {
|
|
|
|
"models.DiscordQueueDto": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"articleId": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-01-21 12:20:33 -08:00
|
|
|
"models.DiscordWebHooksDto": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"ID": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"channel": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"enabled": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"server": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"url": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-01-21 12:20:33 -08:00
|
|
|
"models.SubscriptionDetails": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"discordwebhook": {
|
|
|
|
"$ref": "#/definitions/models.DiscordWebHooksDto"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"source": {
|
|
|
|
"$ref": "#/definitions/models.SourceDto"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-12-11 09:48:44 -08:00
|
|
|
"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": {
|
2023-01-21 12:20:33 -08:00
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"routes.ListSubscriptionDetails": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"payload": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/models.SubscriptionDetails"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"status": {
|
2022-12-11 09:48:44 -08:00
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"routes.ListSubscriptionResults": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"payload": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/models.SubscriptionDto"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
}`
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
var SwaggerInfo = &swag.Spec{
|
|
|
|
Version: "0.1",
|
2022-07-14 09:59:55 -07:00
|
|
|
Host: "",
|
2022-06-19 22:02:44 -07:00
|
|
|
BasePath: "/api",
|
|
|
|
Schemes: []string{},
|
|
|
|
Title: "NewsBot collector",
|
|
|
|
Description: "",
|
|
|
|
InfoInstanceName: "swagger",
|
|
|
|
SwaggerTemplate: docTemplate,
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
|
|
}
|