James Tombleson
79f3383fdc
* made the swagger uri based on env * updated swagger to reflect the dynamic uri * updated extamples
352 lines
7.4 KiB
YAML
352 lines
7.4 KiB
YAML
basePath: /api
|
|
info:
|
|
contact: {}
|
|
title: NewsBot collector
|
|
version: "0.1"
|
|
paths:
|
|
/articles:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Lists the top 50 records
|
|
tags:
|
|
- Articles
|
|
/articles/{id}:
|
|
get:
|
|
parameters:
|
|
- description: uuid
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns an article based on defined ID.
|
|
tags:
|
|
- Articles
|
|
/articles/by/sourceid:
|
|
get:
|
|
parameters:
|
|
- description: Source ID UUID
|
|
in: query
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Finds the articles based on the SourceID provided. Returns the top
|
|
50.
|
|
tags:
|
|
- Articles
|
|
/articles/by/tag:
|
|
get:
|
|
parameters:
|
|
- description: Tag name
|
|
in: query
|
|
name: tag
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Finds the articles based on the SourceID provided. Returns the top
|
|
50.
|
|
tags:
|
|
- Articles
|
|
/config/sources:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Lists the top 50 records
|
|
tags:
|
|
- Config
|
|
- Source
|
|
/config/sources/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: id
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses: {}
|
|
summary: Deletes a record by ID.
|
|
tags:
|
|
- Config
|
|
- Source
|
|
get:
|
|
parameters:
|
|
- description: uuid
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns a single entity by ID
|
|
tags:
|
|
- Config
|
|
- Source
|
|
/config/sources/{id}/disable:
|
|
post:
|
|
parameters:
|
|
- description: id
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses: {}
|
|
summary: Disables a source from processing.
|
|
tags:
|
|
- Config
|
|
- Source
|
|
/config/sources/{id}/enable:
|
|
post:
|
|
parameters:
|
|
- description: id
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses: {}
|
|
summary: Enables a source to continue processing.
|
|
tags:
|
|
- Config
|
|
- Source
|
|
/config/sources/new/reddit:
|
|
post:
|
|
parameters:
|
|
- description: name
|
|
in: query
|
|
name: name
|
|
required: true
|
|
type: string
|
|
- description: url
|
|
in: query
|
|
name: url
|
|
required: true
|
|
type: string
|
|
responses: {}
|
|
summary: Creates a new reddit source to monitor.
|
|
tags:
|
|
- Config
|
|
- Source
|
|
- Reddit
|
|
/config/sources/new/twitch:
|
|
post:
|
|
parameters:
|
|
- description: name
|
|
in: query
|
|
name: name
|
|
required: true
|
|
type: string
|
|
- description: url
|
|
in: query
|
|
name: url
|
|
required: true
|
|
type: string
|
|
- description: tags
|
|
in: query
|
|
name: tags
|
|
required: true
|
|
type: string
|
|
responses: {}
|
|
summary: Creates a new twitch source to monitor.
|
|
tags:
|
|
- Config
|
|
- Source
|
|
- Twitch
|
|
/config/sources/new/youtube:
|
|
post:
|
|
parameters:
|
|
- description: name
|
|
in: query
|
|
name: name
|
|
required: true
|
|
type: string
|
|
- description: url
|
|
in: query
|
|
name: url
|
|
required: true
|
|
type: string
|
|
- description: tags
|
|
in: query
|
|
name: tags
|
|
required: true
|
|
type: string
|
|
responses: {}
|
|
summary: Creates a new youtube source to monitor.
|
|
tags:
|
|
- Config
|
|
- Source
|
|
- YouTube
|
|
/discord/queue:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
tags:
|
|
- Debug
|
|
- Discord
|
|
- Queue
|
|
/discord/webhooks:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
tags:
|
|
- Config
|
|
- Discord
|
|
- Webhook
|
|
/discord/webhooks/byId:
|
|
get:
|
|
parameters:
|
|
- description: id
|
|
in: query
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
tags:
|
|
- Config
|
|
- Discord
|
|
- Webhook
|
|
/discord/webhooks/new:
|
|
post:
|
|
parameters:
|
|
- description: url
|
|
in: query
|
|
name: url
|
|
required: true
|
|
type: string
|
|
- description: Server name
|
|
in: query
|
|
name: server
|
|
required: true
|
|
type: string
|
|
- description: Channel name
|
|
in: query
|
|
name: channel
|
|
required: true
|
|
type: string
|
|
responses: {}
|
|
summary: Creates a new record for a discord web hook to post data to.
|
|
tags:
|
|
- Config
|
|
- Discord
|
|
- Webhook
|
|
/hello/{who}:
|
|
get:
|
|
parameters:
|
|
- description: Who
|
|
in: path
|
|
name: who
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- text/plain
|
|
responses: {}
|
|
summary: Responds back with "Hello x" depending on param passed in.
|
|
tags:
|
|
- Debug
|
|
/helloworld:
|
|
get:
|
|
produces:
|
|
- text/plain
|
|
responses: {}
|
|
summary: Responds back with "Hello world!"
|
|
tags:
|
|
- Debug
|
|
/ping:
|
|
get:
|
|
produces:
|
|
- text/plain
|
|
responses: {}
|
|
summary: Sends back "pong". Good to test with.
|
|
tags:
|
|
- Debug
|
|
/settings/{key}:
|
|
get:
|
|
parameters:
|
|
- description: Settings Key value
|
|
in: path
|
|
name: key
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns a object based on the Key that was given.
|
|
tags:
|
|
- Settings
|
|
/subscriptions:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
tags:
|
|
- Config
|
|
- Subscription
|
|
/subscriptions/byDiscordId:
|
|
get:
|
|
parameters:
|
|
- description: id
|
|
in: query
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
tags:
|
|
- Config
|
|
- Subscription
|
|
/subscriptions/bySourceId:
|
|
get:
|
|
parameters:
|
|
- description: id
|
|
in: query
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses: {}
|
|
summary: Returns the top 100 entries from the queue to be processed.
|
|
tags:
|
|
- Config
|
|
- Subscription
|
|
/subscriptions/new/discordwebhook:
|
|
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:
|
|
- Config
|
|
- Source
|
|
- Discord
|
|
- Subscription
|
|
swagger: "2.0"
|