Husqy API socials module
General
Endpoints related to general Husqy Modules Socials.
GET - /modules/socials/
Home endpoint for the Modules Socials Husqy API. Returns only success message displaying that it is the Modules Socials Husqy API route.
GET - /modules/socials/settings
Get the settings of the socials module for the specified guild.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to check the status of |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
PUT - /modules/socials/settings
Endpoint to change the settings of the reactionroles module for the specified guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to change the socials module settings for |
monitor_reddit | yes | boolean | If the reddit monitor component should be enabled |
monitor_rss | yes | boolean | If the rss monitor component should be enabled |
monitor_twitch | yes | boolean | If the twitch monitor component should be enabled |
monitor_youtube | yes | boolean | If the youtube monitor component should be enabled |
- BadRequestError
- SettingsError
- ModuleDisabledError
- InternalServerError
- DatabaseError
DELETE - /modules/socials/settings/delete
Delete all settings of the socials module for a specified guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to delete the settings from |
Possible errors:
- BadRequestError
Status
Endpoints related to the status of the module
GET - /modules/socials/status
Get the status of the socials module for the specified guild.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to check the status of |
Possible errors:
- BadRequestError
- SettingsError
POST - /modules/socials/enable
Endpoint to enable the socials module for the specified guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to enable the socials module for |
Possible errors:
- BadRequestError
- SettingsError
- ModuleEnabledError
- DatabaseError
POST - /modules/socials/disable
Endpoint to disable the socials module for the specified guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to disable the socials module for |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
Entries
Endpoints related to socials entries to monitor
Reddit
GET - /modules/socials/entries/reddit
Returns a list of monitored subreddits for the specified guild.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to get the subreddits from |
page | no | integer | The page number to get (default = 1) |
page_size | no | integer | The amount of entries to return in one page (default = 10) |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- InternalServerError
POST - /modules/socials/entries/reddit
Endpoint to create a new subreddit entry in a guild to monitor.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to create the subreddit monitor entry in |
subreddit | yes | string | The name of the subreddit to monitor |
target_channel_id | yes | integer | The ID of the channel where to post updates for this entry |
mention_everyone | yes | boolean | If @everyone needs to be mentioned so everyone gets a notification |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
- Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/reddit
Endpoint to delete a subreddit entry in a guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to delete the subreddit from |
subreddit | yes | string | The name of the subreddit to stop monitoring |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
Twitch
GET - /modules/socials/entries/twitch
Returns a list of monitored twitch accounts for the specified guild.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to get the twitch accounts from |
page | no | integer | The page number to get (default = 1) |
page_size | no | integer | The amount of entries to return in one page (default = 10) |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- InternalServerError
POST - /modules/socials/entries/twitch
Endpoint to create a new twitch account entry in a guild to monitor.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to create the twitch account entry in |
twitch_account | yes | string | The name of the twitch account to monitor |
target_channel_id | yes | integer | The ID of the channel where to post updates for this entry |
mention_everyone | yes | boolean | If @everyone needs to be mentioned so everyone gets a notification |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
- Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/twitch
Endpoint to delete a twitch account entry in a guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to delete the twitch account entry from |
twitch_account | yes | string | The name of the twitch account to stop monitoring |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
RSS
GET - /modules/socials/entries/rss
Returns a list of monitored rss feeds for the specified guild.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to get the rss feeds from |
page | no | integer | The page number to get (default = 1) |
page_size | no | integer | The amount of entries to return in one page (default = 10) |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- InternalServerError
POST - /modules/socials/entries/rss
Endpoint to create a new rss feed entry in a guild to monitor.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to create the RSS feed entry in |
rss_feed | yes | string | The URL of the rss feed to monitor |
target_channel_id | yes | integer | The ID of the channel where to post updates for this entry |
mention_everyone | yes | boolean | If @everyone needs to be mentioned so everyone gets a notification |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
- Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/rss
Endpoint to delete a RSS feed entry in a guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to delete the RSS feed from |
rss_feed | yes | string | The URL of the rss feed to stop monitoring |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
YouTube
GET - /modules/socials/entries/youtube
Returns a list of monitored YouTube channels for the specified guild.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to get the YouTube channels from |
page | no | integer | The page number to get (default = 1) |
page_size | no | integer | The amount of entries to return in one page (default = 10) |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- InternalServerError
POST - /modules/socials/entries/youtube
Endpoint to create a new YouTube channel entry in a guild to monitor.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to create the YouTube channel entry in |
youtube_channel_handle | yes | string | The @handle of the channel to monitor. F.e. @dualipa |
target_channel_id | yes | integer | The ID of the channel where to post updates for this entry |
mention_everyone | yes | boolean | If @everyone needs to be mentioned so everyone gets a notification |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
- Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /modules/socials/entries/youtube
Endpoint to delete a YouTube channel entry in a guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to delete the YouTube channel entry from |
youtube_channel_handle | yes | string | The @handle of the YouTube channel to stop monitoring |
Possible errors:
- BadRequestError
- SettingsError
- ModuleDisabledError
- DatabaseError
Sending Entry updates
Endpoints related to sending socials entries updates
Reddit
POST - /modules/socials/entries/send/reddit
Do not use this endpoint yourself! Husqy will send updates when needed.
Endpoint to make subreddit updates be sent in the channel.
Body data (JSON):
field | required | type | description |
---|---|---|---|
subreddit | yes | string | The name of the subreddit that has an update |
url | yes | string | The URL of the post in that subreddit |
Possible errors:
- BadRequestError
Twitch
POST - /modules/socials/entries/send/twitch
Do not use this endpoint yourself! Husqy will send updates when needed.
Endpoint to make twitch account updates be sent in the channel.
Body data (JSON):
field | required | type | description |
---|---|---|---|
twitch_account | yes | string | The name of the twitch account that has gone live |
Possible errors:
- BadRequestError
RSS
POST - /modules/socials/entries/send/rss
Do not use this endpoint yourself! Husqy will send updates when needed.
Endpoint to make RSS feed updates be sent in the channel.
Body data (JSON):
field | required | type | description |
---|---|---|---|
rss_feed_url | yes | string | The URL of the rss feed that has an update |
entry_title | yes | string | The title of the new entry in the RSS feed |
entry_description | yes | string | The description of the new entry in the RSS feed |
Possible errors:
- BadRequestError
YouTube
POST - /modules/socials/entries/send/youtube
Do not use this endpoint yourself! Husqy will send updates when needed.
Endpoint to make YouTube channel updates be sent in the channel.
Body data (JSON):
field | required | type | description |
---|---|---|---|
uploads_playlist_id | yes | string | The ID of the uploads playlist that has been checked |
video_id | yes | string | The ID of the video that has been uploaded |
video_title | yes | string | The title of the video that has been uploaded |
Possible errors:
- BadRequestError
Meme
Endpoints related to memes
POST - /modules/socials/meme/send
Endpoint to send a random meme to a channel (a message needs to be present!).
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to send the meme in |
channel_id | yes | integer | The ID of the channel where the message to edit is located |
message_id | yes | integer | The ID of the message to edit with the random meme |
Possible errors:
- BadRequestError
- SettingsError
- Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
Socials monitor handler
Endpoints related to the Socials module monitor microservice for handling socials entries
GET - /modules/socials/handler
Home endpoint for the Modules Socials Monitor API. Returns only success message displaying that it is the Modules Socials Monitor Husqy API route.
Reddit
POST - /modules/socials/handler/monitor/reddit/refresh-filter
Do not use this endpoint yourself! Husqy will refresh this automatically.
Endpoint to refresh the subreddit filter.
Body data (JSON):
field | required | type | description |
---|---|---|---|
action_type | yes | string | The action to apply to the filter. Can be "add" or "remove" |
subreddit | yes | string | The name of the subreddit to add or remove to/from the filter |
Possible errors:
- BadRequestError
Twitch
POST - /modules/socials/handler/monitors/twitch/refresh-filter
Do not use this endpoint yourself! Husqy will refresh this automatically.
Endpoint to refresh the twitch filter.
Body data (JSON):
field | required | type | description |
---|---|---|---|
action_type | yes | string | The action to apply to the filter. Can be "add" or "remove" |
twitch_account | yes | string | The name of the twitch account to add or remove to/from the filter |
Possible errors:
- BadRequestError
YouTube
GET - /modules/socials/handler/monitors/youtube/get-uploads-playlist-id
Do not use this endpoint yourself! Husqy will get the uploads playlist ID automatically.
Endpoint to get the uploads playlist ID from a channel.
Query string parameters:
field | required | type | description |
---|---|---|---|
channel_handle | yes | string | The @handle of the channel to get the uploads playlist ID for. F.e. @dualipa |
Possible errors:
- BadRequestError
Memes
Endpoints related to memes
GET - /modules/socials/handler/meme/get
An endpoint to get the URL and title of a random meme.
Do not use this endpoint yourself! Please use the /meme
command or the /modules/socials/meme/send
endpoint.
Privacy
Endpoints related to privacy and the socials modules
GET - /modules/socials/privacy/get-user-entries
Do not use this endpoint yourself! This endpoint will be used by Husqy's Privacy configurator (/privacy
) command.
Endpoint to get the amount of references in socials to your user.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to get the specified references in |
privacy_member_id | yes | integer | The ID of the member who wants to check their references |
Possible errors:
- BadRequestError
- ForbiddenError
- InternalServerError
DELETE - /modules/socials/privacy/delete-user-entries
Do not use this endpoint yourself! This endpoint will be used by Husqy's Privacy configurator (/privacy
) command.
Endpoint to delete the references in socials to your user.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to delete the specified references in |
privacy_member_id | yes | integer | The ID of the member who wants to remove their references |
Possible errors:
- BadRequestError
- ForbiddenError
- InternalServerError