basePath: /api definitions: domain.ArticleAndSourceModel: properties: article: $ref: '#/definitions/domain.ArticleDto' source: $ref: '#/definitions/domain.SourceDto' type: object domain.ArticleDetailedResponse: properties: message: type: string payload: $ref: '#/definitions/domain.ArticleAndSourceModel' type: object domain.ArticleDto: properties: authorImage: type: string authorName: type: string description: type: string id: type: integer isVideo: type: boolean pubDate: type: string sourceId: type: integer tags: type: string thumbnail: type: string title: type: string url: type: string type: object domain.ArticleResponse: properties: message: type: string payload: items: $ref: '#/definitions/domain.ArticleDto' type: array type: object domain.BaseResponse: properties: message: type: string type: object domain.DiscordWebHookDto: properties: channel: type: string enabled: type: boolean id: type: integer server: type: string url: description: |- Name string `json:"name"` Key string `json:"key"` type: string type: object domain.DiscordWebhookResponse: properties: message: type: string payload: items: $ref: '#/definitions/domain.DiscordWebHookDto' type: array type: object domain.SourceDto: properties: enabled: type: boolean id: type: integer name: type: string source: type: string tags: type: string url: type: string type: object domain.SourcesResponse: properties: message: type: string payload: items: $ref: '#/definitions/domain.SourceDto' type: array type: object 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.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 v1.ApiError: properties: message: type: string status: type: integer type: object v1.ListDiscordWebHooksQueueResults: properties: message: type: string payload: items: $ref: '#/definitions/models.DiscordQueueDetailsDto' type: array status: type: integer type: object v1.ListSubscriptionDetails: properties: message: type: string payload: items: $ref: '#/definitions/models.SubscriptionDetailsDto' type: array status: type: integer type: object v1.ListSubscriptions: properties: message: type: string payload: items: $ref: '#/definitions/models.SubscriptionDto' type: array status: type: integer type: object info: contact: {} title: NewsBot collector version: "0.1" paths: /v1/articles: get: parameters: - description: page number in: query name: page type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.ArticleResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Lists the top 25 records ordering from newest to oldest. tags: - Articles /v1/articles/{ID}: get: parameters: - description: int in: path name: ID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.ArticleResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Returns an article based on defined ID. tags: - Articles /v1/articles/{ID}/details: get: parameters: - description: int in: path name: ID required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.ArticleDetailedResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Returns an article and source based on defined ID. tags: - Articles /v1/articles/by/sourceid: get: parameters: - description: source id in: query name: id required: true type: string - description: Page to query in: query name: page type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.ArticleResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Finds the articles based on the SourceID provided. Returns the top 25. tags: - Articles /v1/discord/webhooks: get: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.DiscordWebhookResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Returns the top 100 tags: - DiscordWebhook /v1/discord/webhooks/{ID}: delete: parameters: - description: id in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/domain.DiscordWebhookResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Deletes a record by ID. tags: - DiscordWebhook /v1/discord/webhooks/{ID}/disable: post: parameters: - description: id in: path name: id required: true type: integer responses: "200": description: OK schema: $ref: '#/definitions/domain.DiscordWebhookResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Disables a Webhook from being used. tags: - DiscordWebhook /v1/discord/webhooks/{ID}/enable: post: parameters: - description: id in: path name: id required: true type: integer responses: {} summary: Enables a source to continue processing. tags: - DiscordWebhook /v1/discord/webhooks/{id}: get: parameters: - description: id in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.DiscordWebhookResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Returns the top 100 entries from the queue to be processed. tags: - DiscordWebhook /v1/discord/webhooks/by/serverAndChannel: get: parameters: - description: Fancy Server in: query name: server required: true type: string - description: memes in: query name: channel required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/domain.DiscordWebhookResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Returns all the known web hooks based on the Server and Channel given. tags: - DiscordWebhook /v1/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: "200": description: OK schema: $ref: '#/definitions/domain.DiscordWebhookResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Creates a new record for a discord web hook to post data to. tags: - DiscordWebhook /v1/queue/discord/webhooks: get: produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/v1.ListDiscordWebHooksQueueResults' summary: Returns the top 100 entries from the queue to be processed. tags: - Queue /v1/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 /v1/sources: get: parameters: - description: page number in: query name: page type: string produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Unable to reach SQL or Data problems schema: $ref: '#/definitions/domain.BaseResponse' summary: Lists the top 50 records tags: - Source /v1/sources/{id}: get: parameters: - description: uuid in: path name: id required: true type: integer produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Returns a single entity by ID tags: - Source post: parameters: - description: id in: path name: id required: true type: string responses: {} summary: Marks a source as deleted based on its ID value. tags: - Source /v1/sources/{id}/disable: post: parameters: - description: id in: path name: id required: true type: integer responses: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Disables a source from processing. tags: - Source /v1/sources/{id}/enable: post: parameters: - description: id in: path name: id required: true type: string responses: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Enables a source to continue processing. tags: - Source /v1/sources/by/source: get: parameters: - description: Source Name in: query name: source required: true type: string - description: page number in: query name: page type: string produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: 'Lists the top 50 records based on the name given. Example: reddit' tags: - Source /v1/sources/by/sourceAndName: get: parameters: - description: dadjokes in: query name: name required: true type: string - description: reddit in: query name: source required: true type: string produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Returns a single entity by ID tags: - Source /v1/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: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Creates a new reddit source to monitor. tags: - Source /v1/sources/new/rss: post: parameters: - description: Site Name in: query name: name required: true type: string - description: RSS Url in: query name: url required: true type: string responses: "200": description: ok schema: $ref: '#/definitions/domain.SourcesResponse' "400": description: Bad Request schema: $ref: '#/definitions/domain.BaseResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/domain.BaseResponse' summary: Creates a new rss source to monitor. tags: - Source /v1/sources/new/twitch: post: parameters: - description: name in: query name: name required: true type: string responses: {} summary: Creates a new twitch source to monitor. tags: - Source /v1/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 responses: {} summary: Creates a new youtube source to monitor. tags: - Source /v1/subscriptions: get: produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/v1.ListSubscriptions' "400": description: Unable to reach SQL. schema: $ref: '#/definitions/v1.ApiError' "500": description: Failed to process data from SQL. schema: $ref: '#/definitions/v1.ApiError' summary: Returns the top 100 entries from the queue to be processed. tags: - Subscription /v1/subscriptions/by/SourceId: get: parameters: - description: id in: query name: id required: true type: string produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/v1.ListSubscriptions' summary: Returns the top 100 entries from the queue to be processed. tags: - Subscription /v1/subscriptions/by/discordId: get: parameters: - description: id in: query name: id required: true type: string produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/v1.ListSubscriptions' "400": description: Unable to reach SQL or Data problems schema: $ref: '#/definitions/v1.ApiError' "500": description: Data problems schema: $ref: '#/definitions/v1.ApiError' summary: Returns the top 100 entries from the queue to be processed. tags: - Subscription /v1/subscriptions/details: get: produces: - application/json responses: "200": description: ok schema: $ref: '#/definitions/v1.ListSubscriptionDetails' summary: Returns the top 50 entries with full deatils on the source and output. tags: - Subscription /v1/subscriptions/discord/webhook/delete: delete: parameters: - description: id in: query name: id required: true type: string responses: {} summary: Removes a Discord WebHook Subscription based on the Subscription ID. tags: - Subscription /v1/subscriptions/discord/webhook/new: 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 swagger: "2.0"