2022-06-19 22:02:44 -07:00
|
|
|
{
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
|
|
|
"title": "NewsBot collector",
|
|
|
|
"contact": {},
|
|
|
|
"version": "0.1"
|
|
|
|
},
|
|
|
|
"basePath": "/api",
|
|
|
|
"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": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/articles/{id}": {
|
|
|
|
"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": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/config/sources": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Lists the top 50 records",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/config/sources/new/reddit": {
|
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source",
|
|
|
|
"Reddit"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"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": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source",
|
|
|
|
"Twitch"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Creates a new twitch source to monitor.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "name",
|
|
|
|
"name": "name",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "tags",
|
|
|
|
"name": "tags",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/config/sources/new/youtube": {
|
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source",
|
|
|
|
"YouTube"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"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
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "tags",
|
|
|
|
"name": "tags",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/config/sources/{id}": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns a single entity by ID",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "uuid",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
},
|
|
|
|
"delete": {
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Deletes a record by ID.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/config/sources/{id}/disable": {
|
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Disables a source from processing.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "id",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/config/sources/{id}/enable": {
|
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Source"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"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": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Debug",
|
2022-06-19 22:02:44 -07:00
|
|
|
"Discord",
|
|
|
|
"Queue"
|
|
|
|
],
|
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/discord/webhooks": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
2022-06-19 22:02:44 -07:00
|
|
|
"Discord",
|
2022-07-12 15:28:31 -07:00
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/discord/webhooks/byId": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
2022-06-19 22:02:44 -07:00
|
|
|
"Discord",
|
2022-07-12 15:28:31 -07:00
|
|
|
"Webhook"
|
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
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/discord/webhooks/new": {
|
|
|
|
"post": {
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
2022-06-19 22:02:44 -07:00
|
|
|
"Discord",
|
2022-07-12 15:28:31 -07:00
|
|
|
"Webhook"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Creates a new record for a discord web hook to post data to.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "url",
|
|
|
|
"name": "url",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Server name",
|
|
|
|
"name": "server",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
2022-07-12 15:28:31 -07:00
|
|
|
"description": "Channel name",
|
2022-06-19 22:02:44 -07:00
|
|
|
"name": "channel",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/hello/{who}": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"text/plain"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Debug"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Responds back with \"Hello x\" depending on param passed in.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Who",
|
|
|
|
"name": "who",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/helloworld": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"text/plain"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Debug"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Responds back with \"Hello world!\"",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/ping": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"text/plain"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Debug"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Sends back \"pong\". Good to test with.",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/settings/{key}": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Settings"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
2022-07-12 15:28:31 -07:00
|
|
|
"summary": "Returns a object based on the Key that was given.",
|
2022-06-19 22:02:44 -07:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Settings Key value",
|
|
|
|
"name": "key",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/subscriptions": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"Subscription"
|
2022-06-19 22:02:44 -07:00
|
|
|
],
|
|
|
|
"summary": "Returns the top 100 entries from the queue to be processed.",
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/subscriptions/byDiscordId": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"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
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/subscriptions/bySourceId": {
|
|
|
|
"get": {
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-07-12 15:28:31 -07:00
|
|
|
"Config",
|
|
|
|
"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
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {}
|
|
|
|
}
|
2022-07-12 15:28:31 -07:00
|
|
|
},
|
|
|
|
"/subscriptions/new/discordwebhook": {
|
|
|
|
"post": {
|
|
|
|
"tags": [
|
|
|
|
"Config",
|
|
|
|
"Source",
|
|
|
|
"Discord",
|
|
|
|
"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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|