2022-06-19 22:02:44 -07:00
|
|
|
basePath: /api
|
2023-01-22 10:12:55 -08:00
|
|
|
definitions:
|
|
|
|
models.ArticleDetailsDto:
|
|
|
|
properties:
|
|
|
|
authorImage:
|
|
|
|
type: string
|
|
|
|
authorName:
|
|
|
|
type: string
|
|
|
|
description:
|
|
|
|
type: string
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
pubdate:
|
|
|
|
type: string
|
|
|
|
source:
|
|
|
|
$ref: '#/definitions/models.SourceDto'
|
|
|
|
tags:
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
type: array
|
|
|
|
thumbnail:
|
|
|
|
type: string
|
|
|
|
title:
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
video:
|
|
|
|
type: string
|
|
|
|
videoHeight:
|
|
|
|
type: integer
|
|
|
|
videoWidth:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
models.ArticleDto:
|
|
|
|
properties:
|
|
|
|
authorImage:
|
|
|
|
type: string
|
|
|
|
authorName:
|
|
|
|
type: string
|
|
|
|
description:
|
|
|
|
type: string
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
pubdate:
|
|
|
|
type: string
|
|
|
|
sourceid:
|
|
|
|
type: string
|
|
|
|
tags:
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
type: array
|
|
|
|
thumbnail:
|
|
|
|
type: string
|
|
|
|
title:
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
video:
|
|
|
|
type: string
|
|
|
|
videoHeight:
|
|
|
|
type: integer
|
|
|
|
videoWidth:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
models.DiscordQueueDetailsDto:
|
|
|
|
properties:
|
|
|
|
article:
|
|
|
|
$ref: '#/definitions/models.ArticleDetailsDto'
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
models.DiscordWebHooksDto:
|
|
|
|
properties:
|
|
|
|
ID:
|
|
|
|
type: string
|
|
|
|
channel:
|
|
|
|
type: string
|
|
|
|
enabled:
|
|
|
|
type: boolean
|
|
|
|
server:
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
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.SubscriptionDetailsDto:
|
|
|
|
properties:
|
|
|
|
discordwebhook:
|
|
|
|
$ref: '#/definitions/models.DiscordWebHooksDto'
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
source:
|
|
|
|
$ref: '#/definitions/models.SourceDto'
|
|
|
|
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.ArticleDetailsResult:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
$ref: '#/definitions/models.ArticleDetailsDto'
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.ArticleGetResults:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
$ref: '#/definitions/models.ArticleDto'
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.ArticlesListResults:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.ArticleDto'
|
|
|
|
type: array
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.GetDiscordWebhook:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
$ref: '#/definitions/models.DiscordWebHooksDto'
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.GetSource:
|
|
|
|
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.DiscordQueueDetailsDto'
|
|
|
|
type: array
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.ListDiscordWebhooks:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.DiscordWebHooksDto'
|
|
|
|
type: array
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.ListSources:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SourceDto'
|
|
|
|
type: array
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.ListSubscriptionDetails:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SubscriptionDetailsDto'
|
|
|
|
type: array
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
routes.ListSubscriptions:
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/models.SubscriptionDto'
|
|
|
|
type: array
|
|
|
|
status:
|
|
|
|
type: integer
|
|
|
|
type: object
|
2022-06-19 22:02:44 -07:00
|
|
|
info:
|
|
|
|
contact: {}
|
|
|
|
title: NewsBot collector
|
|
|
|
version: "0.1"
|
|
|
|
paths:
|
|
|
|
/articles:
|
|
|
|
get:
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ArticlesListResults'
|
2022-06-19 22:02:44 -07:00
|
|
|
summary: Lists the top 50 records
|
|
|
|
tags:
|
2022-07-12 15:28:31 -07:00
|
|
|
- Articles
|
2022-12-04 08:49:17 -08:00
|
|
|
/articles/{ID}:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
parameters:
|
|
|
|
- description: uuid
|
|
|
|
in: path
|
2023-01-22 10:12:55 -08:00
|
|
|
name: ID
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ArticleGetResults'
|
2022-06-19 22:02:44 -07:00
|
|
|
summary: Returns an article based on defined ID.
|
|
|
|
tags:
|
2022-07-12 15:28:31 -07:00
|
|
|
- Articles
|
2023-01-22 10:12:55 -08:00
|
|
|
/articles/{ID}/details:
|
2022-07-13 21:31:53 -07:00
|
|
|
get:
|
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: uuid
|
|
|
|
in: path
|
|
|
|
name: ID
|
2022-07-13 21:31:53 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ArticleDetailsResult'
|
|
|
|
summary: Returns an article and source based on defined ID.
|
2022-07-13 21:31:53 -07:00
|
|
|
tags:
|
|
|
|
- Articles
|
2023-01-30 22:34:46 -08:00
|
|
|
/articles/by/page:
|
|
|
|
get:
|
|
|
|
parameters:
|
|
|
|
- description: page number
|
|
|
|
in: query
|
|
|
|
name: page
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ArticlesListResults'
|
|
|
|
summary: List 50 items based on the requested page
|
|
|
|
tags:
|
|
|
|
- Articles
|
2023-01-22 10:12:55 -08:00
|
|
|
/articles/by/sourceid:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: Source ID UUID
|
2022-06-30 14:54:58 -07:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: id
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ArticlesListResults'
|
2022-06-19 22:02:44 -07:00
|
|
|
summary: Finds the articles based on the SourceID provided. Returns the top
|
|
|
|
50.
|
|
|
|
tags:
|
2022-07-12 15:28:31 -07:00
|
|
|
- Articles
|
2023-01-22 10:12:55 -08:00
|
|
|
/discord/webhooks:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses: {}
|
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
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
/discord/webhooks/{ID}:
|
|
|
|
delete:
|
2022-06-19 22:02:44 -07:00
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: id
|
2022-06-19 22:02:44 -07:00
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Deletes a record by ID.
|
2022-06-19 22:02:44 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
/discord/webhooks/{ID}/disable:
|
2022-12-07 22:48:31 -08:00
|
|
|
post:
|
2022-06-19 22:02:44 -07:00
|
|
|
parameters:
|
2022-12-07 22:48:31 -08:00
|
|
|
- description: id
|
2022-06-19 22:02:44 -07:00
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Disables a Webhook from being used.
|
2022-06-19 22:02:44 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
/discord/webhooks/{ID}/enable:
|
2022-06-19 22:02:44 -07:00
|
|
|
post:
|
|
|
|
parameters:
|
|
|
|
- description: id
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Enables a source to continue processing.
|
2022-06-19 22:02:44 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
/discord/webhooks/{id}:
|
|
|
|
get:
|
2022-06-19 22:02:44 -07:00
|
|
|
parameters:
|
|
|
|
- description: id
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-01-22 10:12:55 -08:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.GetDiscordWebhook'
|
|
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
2022-06-19 22:02:44 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
patch:
|
2022-07-26 13:27:34 -07:00
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: id
|
|
|
|
in: path
|
|
|
|
name: id
|
2022-07-26 13:27:34 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Updates a valid discord webhook ID based on the body given.
|
2022-07-26 13:27:34 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
/discord/webhooks/by/serverAndChannel:
|
2022-11-30 21:43:53 -08:00
|
|
|
get:
|
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: Fancy Server
|
2022-11-30 21:43:53 -08:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: server
|
2022-11-30 21:43:53 -08:00
|
|
|
required: true
|
|
|
|
type: string
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: memes
|
2022-11-30 21:43:53 -08:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: channel
|
2022-11-30 21:43:53 -08:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListDiscordWebhooks'
|
|
|
|
summary: Returns all the known web hooks based on the Server and Channel given.
|
2022-11-30 21:43:53 -08:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
/discord/webhooks/new:
|
2022-06-19 22:02:44 -07:00
|
|
|
post:
|
|
|
|
parameters:
|
|
|
|
- description: url
|
|
|
|
in: query
|
|
|
|
name: url
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: Server name
|
2022-06-19 22:02:44 -07:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: server
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: Channel name
|
2022-06-19 22:02:44 -07:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: channel
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
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
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Discord
|
|
|
|
- Webhook
|
|
|
|
/queue/discord/webhooks:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListDiscordWebHooksQueueResults'
|
2022-06-19 22:02:44 -07:00
|
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
|
|
tags:
|
|
|
|
- Queue
|
2023-01-22 10:12:55 -08:00
|
|
|
/sources:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListSources'
|
|
|
|
"400":
|
|
|
|
description: Unable to reach SQL or Data problems
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ApiError'
|
|
|
|
summary: Lists the top 50 records
|
2022-08-21 20:02:45 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
/sources/{id}:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: uuid
|
2022-08-21 20:02:45 -07:00
|
|
|
in: path
|
2022-06-19 22:02:44 -07:00
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.GetSource'
|
|
|
|
"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
|
2022-06-19 22:02:44 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
post:
|
2022-11-30 21:43:53 -08:00
|
|
|
parameters:
|
|
|
|
- description: id
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Marks a source as deleted based on its ID value.
|
2022-11-30 21:43:53 -08:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
/sources/{id}/disable:
|
2022-08-21 20:02:45 -07:00
|
|
|
post:
|
|
|
|
parameters:
|
|
|
|
- description: id
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Disables a source from processing.
|
2022-08-21 20:02:45 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
/sources/{id}/enable:
|
2022-08-21 20:02:45 -07:00
|
|
|
post:
|
|
|
|
parameters:
|
|
|
|
- description: id
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
|
|
|
summary: Enables a source to continue processing.
|
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
/sources/by/source:
|
2022-11-30 21:43:53 -08:00
|
|
|
get:
|
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: Source Name
|
2022-11-30 21:43:53 -08:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: source
|
2022-11-30 21:43:53 -08:00
|
|
|
required: true
|
|
|
|
type: string
|
2023-01-22 10:12:55 -08:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListSources'
|
|
|
|
"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
|
2022-11-30 21:43:53 -08:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: name
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: reddit
|
|
|
|
in: query
|
|
|
|
name: source
|
2022-11-30 21:43:53 -08:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.GetSource'
|
|
|
|
"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
|
2022-11-30 21:43:53 -08:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
/sources/new/reddit:
|
2022-06-19 22:02:44 -07:00
|
|
|
post:
|
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: name
|
2022-06-19 22:02:44 -07:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: name
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: url
|
2022-06-19 22:02:44 -07:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: url
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Creates a new reddit source to monitor.
|
2022-06-19 22:02:44 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
/sources/new/twitch:
|
|
|
|
post:
|
2022-06-19 22:02:44 -07:00
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: name
|
|
|
|
in: query
|
|
|
|
name: name
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Creates a new twitch source to monitor.
|
2022-06-19 22:02:44 -07:00
|
|
|
tags:
|
2023-01-22 10:12:55 -08:00
|
|
|
- Source
|
|
|
|
/sources/new/youtube:
|
|
|
|
post:
|
2022-06-19 22:02:44 -07:00
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: name
|
|
|
|
in: query
|
|
|
|
name: name
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: url
|
|
|
|
in: query
|
|
|
|
name: url
|
2022-06-19 22:02:44 -07:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
2023-01-22 10:12:55 -08:00
|
|
|
summary: Creates a new youtube source to monitor.
|
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
|
|
|
/subscriptions:
|
|
|
|
get:
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListSubscriptions'
|
|
|
|
"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
|
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
|
|
tags:
|
2022-07-12 15:28:31 -07:00
|
|
|
- Subscription
|
2023-01-22 10:12:55 -08:00
|
|
|
/subscriptions/by/SourceId:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
parameters:
|
|
|
|
- description: id
|
|
|
|
in: query
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListSubscriptions'
|
2022-06-19 22:02:44 -07:00
|
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
|
|
tags:
|
2022-07-12 15:28:31 -07:00
|
|
|
- Subscription
|
2023-01-22 10:12:55 -08:00
|
|
|
/subscriptions/by/discordId:
|
2022-06-19 22:02:44 -07:00
|
|
|
get:
|
|
|
|
parameters:
|
|
|
|
- description: id
|
|
|
|
in: query
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- application/json
|
2023-01-22 10:12:55 -08:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListSubscriptions'
|
|
|
|
"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
|
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
|
|
tags:
|
2022-07-12 15:28:31 -07:00
|
|
|
- Subscription
|
2023-01-22 10:12:55 -08:00
|
|
|
/subscriptions/details:
|
|
|
|
get:
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: ok
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/routes.ListSubscriptionDetails'
|
|
|
|
summary: Returns the top 50 entries with full deatils on the source and output.
|
|
|
|
tags:
|
|
|
|
- Subscription
|
2022-11-30 21:43:53 -08:00
|
|
|
/subscriptions/discord/webhook/delete:
|
|
|
|
delete:
|
|
|
|
parameters:
|
2023-01-22 10:12:55 -08:00
|
|
|
- description: id
|
2022-11-30 21:43:53 -08:00
|
|
|
in: query
|
2023-01-22 10:12:55 -08:00
|
|
|
name: id
|
2022-11-30 21:43:53 -08:00
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
|
|
|
summary: Removes a Discord WebHook Subscription based on the Subscription ID.
|
|
|
|
tags:
|
|
|
|
- Subscription
|
2023-01-22 10:12:55 -08:00
|
|
|
/subscriptions/discord/webhook/new:
|
2022-07-12 15:28:31 -07:00
|
|
|
post:
|
|
|
|
parameters:
|
|
|
|
- description: discordWebHookId
|
|
|
|
in: query
|
|
|
|
name: discordWebHookId
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: sourceId
|
|
|
|
in: query
|
|
|
|
name: sourceId
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
|
|
|
summary: Creates a new subscription to link a post from a Source to a DiscordWebHook.
|
|
|
|
tags:
|
|
|
|
- Subscription
|
2022-06-19 22:02:44 -07:00
|
|
|
swagger: "2.0"
|