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": {
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/articles": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Articles"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-02-04 20:15:10 -08:00
|
|
|
"summary": "Lists the top 25 records ordering from newest to oldest.",
|
2023-01-31 08:19:23 -08:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "page number",
|
|
|
|
"name": "page",
|
|
|
|
"in": "query"
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"$ref": "#/definitions/domain.ArticleResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-26 09:00:33 -07:00
|
|
|
"/v1/articles/by/sourceId": {
|
2022-07-13 21:31:53 -07:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-07-13 21:31:53 -07:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Articles"
|
|
|
|
],
|
2023-02-04 21:43:07 -08:00
|
|
|
"summary": "Finds the articles based on the SourceID provided. Returns the top 25.",
|
2022-07-13 21:31:53 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2024-04-28 12:32:51 -07:00
|
|
|
"description": "source id",
|
2022-07-13 21:31:53 -07:00
|
|
|
"name": "id",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
2023-02-04 21:43:07 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "integer",
|
|
|
|
"description": "Page to query",
|
|
|
|
"name": "page",
|
|
|
|
"in": "query"
|
2022-07-13 21:31:53 -07:00
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"$ref": "#/definitions/domain.ArticleResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-13 21:31:53 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/articles/{ID}": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Articles"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Returns an article based on defined ID.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2024-04-28 12:32:51 -07:00
|
|
|
"description": "int",
|
2023-01-22 10:12:55 -08:00
|
|
|
"name": "ID",
|
|
|
|
"in": "path",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"$ref": "#/definitions/domain.ArticleResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/articles/{ID}/details": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Articles"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Returns an article and source based on defined ID.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2024-04-28 12:32:51 -07:00
|
|
|
"description": "int",
|
2023-01-22 10:12:55 -08:00
|
|
|
"name": "ID",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"$ref": "#/definitions/domain.ArticleDetailedResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/discord/webhooks": {
|
2022-07-26 13:27:34 -07:00
|
|
|
"get": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-07-26 13:27:34 -07:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-02 17:36:39 -07:00
|
|
|
"DiscordWebhook"
|
2022-07-26 13:27:34 -07:00
|
|
|
],
|
2024-04-28 12:32:51 -07:00
|
|
|
"summary": "Returns the top 100",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-26 13:27:34 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/discord/webhooks/by/serverAndChannel": {
|
2022-11-30 21:43:53 -08:00
|
|
|
"get": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-11-30 21:43:53 -08:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-02 17:36:39 -07:00
|
|
|
"DiscordWebhook"
|
2022-11-30 21:43:53 -08:00
|
|
|
],
|
2023-01-22 10:12:55 -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",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "Fancy Server",
|
|
|
|
"name": "server",
|
2022-11-30 21:43:53 -08:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "memes",
|
|
|
|
"name": "channel",
|
2022-11-30 21:43:53 -08:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-11-30 21:43:53 -08:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/discord/webhooks/new": {
|
2022-06-19 22:02:44 -07:00
|
|
|
"post": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2024-05-02 17:36:39 -07:00
|
|
|
"DiscordWebhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -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",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "Server name",
|
|
|
|
"name": "server",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
2023-01-22 10:12:55 -08:00
|
|
|
},
|
2022-06-19 22:02:44 -07:00
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "Channel name",
|
|
|
|
"name": "channel",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 12:32:51 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/discord/webhooks/{ID}": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"delete": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2024-05-02 17:36:39 -07:00
|
|
|
"DiscordWebhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Deletes a record by ID.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 12:32:51 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/discord/webhooks/{ID}/disable": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"post": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2024-05-02 17:36:39 -07:00
|
|
|
"DiscordWebhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Disables a Webhook from being used.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-04-28 12:32:51 -07:00
|
|
|
"type": "integer",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "id",
|
2022-06-19 22:02:44 -07:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 12:32:51 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/discord/webhooks/{ID}/enable": {
|
2022-12-07 22:48:31 -08:00
|
|
|
"post": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2024-05-02 17:36:39 -07:00
|
|
|
"DiscordWebhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Enables a source to continue processing.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-04-28 12:32:51 -07:00
|
|
|
"type": "integer",
|
2022-06-19 22:02:44 -07:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-06-02 17:27:36 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/discord/webhooks/{id}": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"get": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2024-05-02 17:36:39 -07:00
|
|
|
"DiscordWebhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-04-28 12:32:51 -07:00
|
|
|
"type": "integer",
|
2022-06-19 22:02:44 -07:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.DiscordWebhookResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-05 10:02:17 -07:00
|
|
|
"/v1/sources": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
2024-04-28 12:32:51 -07:00
|
|
|
{
|
2024-05-05 10:02:17 -07:00
|
|
|
"Bearer": []
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Lists the top 50 records",
|
2024-04-28 19:29:49 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "page number",
|
|
|
|
"name": "page",
|
|
|
|
"in": "query"
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Unable to reach SQL or Data problems",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/by/source": {
|
2022-11-30 21:43:53 -08:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-11-30 21:43:53 -08:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-11-30 21:43:53 -08:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Lists the top 50 records based on the name given. Example: reddit",
|
2022-11-30 21:43:53 -08:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "Source Name",
|
|
|
|
"name": "source",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
2024-04-28 19:29:49 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "page number",
|
|
|
|
"name": "page",
|
|
|
|
"in": "query"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"description": "Bad Request",
|
2023-01-22 10:12:55 -08:00
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"description": "Internal Server Error",
|
2023-01-22 10:12:55 -08:00
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/by/sourceAndName": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Source"
|
|
|
|
],
|
|
|
|
"summary": "Returns a single entity by ID",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "dadjokes",
|
|
|
|
"name": "name",
|
2022-11-30 21:43:53 -08:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "reddit",
|
|
|
|
"name": "source",
|
2022-11-30 21:43:53 -08:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"description": "Bad Request",
|
2023-01-22 10:12:55 -08:00
|
|
|
"schema": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"description": "Internal Server Error",
|
2023-01-22 10:12:55 -08:00
|
|
|
"schema": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-11-30 21:43:53 -08:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/new/reddit": {
|
2022-08-21 20:02:45 -07:00
|
|
|
"post": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-08-21 20:02:45 -07:00
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-08-21 20:02:45 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Creates a new reddit source to monitor.",
|
2022-08-21 20:02:45 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "name",
|
|
|
|
"name": "name",
|
2022-08-21 20:02:45 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
2022-08-21 20:02:45 -07:00
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 19:29:49 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/new/rss": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"post": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 19:29:49 -07:00
|
|
|
"tags": [
|
|
|
|
"Source"
|
|
|
|
],
|
|
|
|
"summary": "Creates a new rss source to monitor.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
2024-07-10 07:23:01 -07:00
|
|
|
"description": "body",
|
|
|
|
"name": "request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.NewSourceParamRequest"
|
|
|
|
}
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-08-21 20:02:45 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/new/twitch": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"post": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Creates a new twitch source to monitor.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "name",
|
|
|
|
"name": "name",
|
|
|
|
"in": "query",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-06-02 17:27:36 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/new/youtube": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"post": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Creates a new youtube source to monitor.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "name",
|
|
|
|
"name": "name",
|
|
|
|
"in": "query",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
2023-01-22 10:12:55 -08:00
|
|
|
},
|
2022-11-30 21:43:53 -08:00
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
|
|
|
"in": "query",
|
2022-11-30 21:43:53 -08:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-06-02 17:27:36 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-08-21 20:02:45 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/{id}": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"get": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2022-08-21 20:02:45 -07:00
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-08-21 20:02:45 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -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
|
|
|
{
|
2024-04-28 19:29:49 -07:00
|
|
|
"type": "integer",
|
2024-07-10 07:23:01 -07:00
|
|
|
"description": "id",
|
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
|
|
|
}
|
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"description": "Bad Request",
|
2023-01-22 10:12:55 -08:00
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
2024-04-28 19:29:49 -07:00
|
|
|
"description": "Internal Server Error",
|
2023-01-22 10:12:55 -08:00
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-08-21 20:02:45 -07:00
|
|
|
"post": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-08-21 20:02:45 -07:00
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-08-21 20:02:45 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -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
|
|
|
{
|
2024-05-07 22:10:17 -07:00
|
|
|
"type": "integer",
|
2022-08-21 20:02:45 -07:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
2022-06-19 22:02:44 -07:00
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-05-07 22:10:17 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-05-07 22:10:17 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-05-07 22:10:17 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/{id}/disable": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"post": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Disables a source from processing.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-04-28 19:29:49 -07:00
|
|
|
"type": "integer",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 19:29:49 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
|
|
|
},
|
2024-05-02 17:36:39 -07:00
|
|
|
"/v1/sources/{id}/enable": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"post": {
|
2024-05-05 10:02:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2022-06-19 22:02:44 -07:00
|
|
|
"tags": [
|
2023-01-22 10:12:55 -08:00
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2023-01-22 10:12:55 -08:00
|
|
|
"summary": "Enables a source to continue processing.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
2023-01-22 10:12:55 -08:00
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
2022-06-19 22:02:44 -07:00
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 19:29:49 -07:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "ok",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.SourcesResponse"
|
2024-04-28 19:29:49 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
2024-05-07 18:19:41 -07:00
|
|
|
},
|
|
|
|
"/v1/users/login": {
|
|
|
|
"post": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Users"
|
|
|
|
],
|
|
|
|
"summary": "Logs into the API and returns a bearer token if successful",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"name": "password",
|
|
|
|
"in": "formData"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"name": "username",
|
|
|
|
"in": "formData"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.LoginResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.LoginResponse"
|
2024-05-07 18:19:41 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"$ref": "#/definitions/domain.LoginResponse"
|
2024-05-07 18:19:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-26 07:52:29 -07:00
|
|
|
"/v1/users/refresh/sessionToken": {
|
|
|
|
"post": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Users"
|
|
|
|
],
|
|
|
|
"summary": "Revokes the current session token and replaces it with a new one.",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-26 09:00:33 -07:00
|
|
|
"/v1/users/refresh/token": {
|
2024-05-07 18:19:41 -07:00
|
|
|
"post": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Users"
|
|
|
|
],
|
|
|
|
"summary": "Generates a new token",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"description": "body",
|
|
|
|
"name": "request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.RefreshTokenRequest"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.LoginResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/v1/users/register": {
|
|
|
|
"post": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Users"
|
|
|
|
],
|
|
|
|
"summary": "Creates a new user",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"name": "password",
|
|
|
|
"in": "formData"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"name": "username",
|
|
|
|
"in": "formData"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"201": {
|
|
|
|
"description": "Created",
|
2024-05-07 18:19:41 -07:00
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/v1/users/scopes/add": {
|
|
|
|
"post": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2024-05-07 18:19:41 -07:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Users"
|
|
|
|
],
|
|
|
|
"summary": "Adds a new scope to a user account",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"description": "body",
|
|
|
|
"name": "request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.UpdateScopesRequest"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/v1/users/scopes/remove": {
|
|
|
|
"post": {
|
2024-05-07 22:10:17 -07:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Bearer": []
|
|
|
|
}
|
|
|
|
],
|
2024-05-07 18:19:41 -07:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Users"
|
|
|
|
],
|
|
|
|
"summary": "Adds a new scope to a user account",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"description": "body",
|
|
|
|
"name": "request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.UpdateScopesRequest"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/domain.BaseResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 22:02:44 -07:00
|
|
|
}
|
2023-01-22 10:12:55 -08:00
|
|
|
},
|
|
|
|
"definitions": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"domain.ArticleAndSourceModel": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"article": {
|
|
|
|
"$ref": "#/definitions/domain.ArticleDto"
|
|
|
|
},
|
|
|
|
"source": {
|
|
|
|
"$ref": "#/definitions/domain.SourceDto"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"domain.ArticleDetailedResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"isError": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"payload": {
|
|
|
|
"$ref": "#/definitions/domain.ArticleAndSourceModel"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"domain.ArticleDto": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"authorImage": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"authorName": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"type": "integer"
|
2023-01-22 10:12:55 -08:00
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"isVideo": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"pubDate": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"type": "string"
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"sourceId": {
|
|
|
|
"type": "integer"
|
2023-01-22 10:12:55 -08:00
|
|
|
},
|
|
|
|
"tags": {
|
2024-04-28 12:32:51 -07:00
|
|
|
"type": "string"
|
2023-01-22 10:12:55 -08:00
|
|
|
},
|
|
|
|
"thumbnail": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"title": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"url": {
|
|
|
|
"type": "string"
|
2024-04-28 12:32:51 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"domain.ArticleResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"isError": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"message": {
|
|
|
|
"type": "string"
|
2023-01-22 10:12:55 -08:00
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"payload": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/domain.ArticleDto"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"domain.BaseResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"isError": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"domain.DiscordWebHookDto": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"channel": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"type": "string"
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"enabled": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"id": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"type": "integer"
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"server": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"url": {
|
|
|
|
"description": "Name string ` + "`" + `json:\"name\"` + "`" + `\nKey string ` + "`" + `json:\"key\"` + "`" + `",
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"domain.DiscordWebhookResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"isError": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"payload": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/domain.DiscordWebHookDto"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-07 18:19:41 -07:00
|
|
|
"domain.LoginResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"isError": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
2024-05-07 18:19:41 -07:00
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"refreshToken": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"token": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"type": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-10 07:23:01 -07:00
|
|
|
"domain.NewSourceParamRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"tags": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"url": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-07 18:19:41 -07:00
|
|
|
"domain.RefreshTokenRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"refreshToken": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"username": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-04-28 12:32:51 -07:00
|
|
|
"domain.SourceDto": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"enabled": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"id": {
|
2023-01-22 10:12:55 -08:00
|
|
|
"type": "integer"
|
2024-04-28 12:32:51 -07:00
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"source": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"tags": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"url": {
|
|
|
|
"type": "string"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-04-28 19:29:49 -07:00
|
|
|
"domain.SourcesResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-06-02 17:27:36 -07:00
|
|
|
"isError": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
2024-04-28 19:29:49 -07:00
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"payload": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/domain.SourceDto"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-07 18:19:41 -07:00
|
|
|
},
|
|
|
|
"domain.UpdateScopesRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"scopes"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"scopes": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"username": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2024-05-05 10:02:17 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"securityDefinitions": {
|
|
|
|
"Bearer": {
|
|
|
|
"description": "Type \"Bearer\" followed by a space and JWT token.",
|
|
|
|
"type": "apiKey",
|
|
|
|
"name": "Authorization",
|
|
|
|
"in": "header"
|
2023-01-22 10:12:55 -08:00
|
|
|
}
|
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)
|
|
|
|
}
|