We are now verified! Husqy is now a verified bot in Discord making us visible in the app discovery and enabling bigger trust to users!
Want to help us translate the Husqy responses? We can't do it without you! Please visit our translations repo!
Skip to main content

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:

fieldrequiredtypedescription
guild_idyesintegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to change the socials module settings for
monitor_reddityesbooleanIf the reddit monitor component should be enabled
monitor_rssyesbooleanIf the rss monitor component should be enabled
monitor_twitchyesbooleanIf the twitch 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):

fieldrequiredtypedescription
guild_idyesintegerThe 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:

fieldrequiredtypedescription
guild_idyesintegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe 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:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the subreddits from
pagenointegerThe page number to get (default = 1)
page_sizenointegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the reactionrole in
subreddityesstringThe name of the subreddit to monitor
target_channel_idyesintegerThe ID of the channel where to post updates for this entry
mention_everyoneyesbooleanIf @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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the reactionrole in
subreddityesstringThe 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:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the twitch accounts from
pagenointegerThe page number to get (default = 1)
page_sizenointegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the reactionrole in
twitch_accountyesstringThe name of the twitch account to monitor
target_channel_idyesintegerThe ID of the channel where to post updates for this entry
mention_everyoneyesbooleanIf @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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the reactionrole in
twitch_accountyesstringThe 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:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the rss feeds from
pagenointegerThe page number to get (default = 1)
page_sizenointegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the reactionrole in
rss_feedyesstringThe URL of the rss feed to monitor
target_channel_idyesintegerThe ID of the channel where to post updates for this entry
mention_everyoneyesbooleanIf @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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the reactionrole in
rss_feedyesstringThe URL of the rss feed 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
danger

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):

fieldrequiredtypedescription
subreddityesstringThe name of the subreddit that has an update
urlyesstringThe URL of the post in that subreddit

Possible errors:

  • BadRequestError
  • InternalServerError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},

Twitch

POST - /modules/socials/entries/send/twitch
danger

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):

fieldrequiredtypedescription
twitch_accountyesstringThe name of the twitch account that has gone live

Possible errors:

  • BadRequestError
  • InternalServerError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},

RSS

POST - /modules/socials/entries/send/rss
danger

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):

fieldrequiredtypedescription
rss_feed_urlyesstringThe URL of the rss feed that has an update
entry_titleyesstringThe title of the new entry in the RSS feed
entry_descriptionyesstringThe description of the new entry in the RSS feed

Possible errors:

  • BadRequestError
  • InternalServerError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},

Entries Handlers

Endpoints related to the handlers handling the social entries

Reddit

GET - /modules/socials/services/reddit

Home endpoint for the Modules Socials Reddit Entries Husqy API. Returns only success message displaying that it is the Modules Socials Reddit Entries Husqy API route.

POST - /modules/socials/services/reddit/refresh-filter
danger

Do not use this endpoint yourself! Husqy will refresh this automatically.

Endpoint to make RSS feed updates be sent in the channel.

Body data (JSON):

fieldrequiredtypedescription
action_typeyesstringThe action to apply to the filter. Can be "add" or "remove"
subreddityesstringThe name of the subreddit to add or remove to/from the filter

Possible errors:

  • BadRequestError

Twitch

GET - /modules/socials/services/twitch

Home endpoint for the Modules Socials Twitch Entries Husqy API. Returns only success message displaying that it is the Modules Socials Twitch Entries Husqy API route.

POST - /modules/socials/services/twitch/refresh-filter
danger

Do not use this endpoint yourself! Husqy will refresh this automatically.

Endpoint to make RSS feed updates be sent in the channel.

Body data (JSON):

fieldrequiredtypedescription
action_typeyesstringThe action to apply to the filter. Can be "add" or "remove"
twitch_accountyesstringThe name of the twitch account to add or remove to/from the filter

Possible errors:

  • BadRequestError

RSS

GET - /modules/socials/services/rss

Home endpoint for the Modules Socials RSS Entries Husqy API. Returns only success message displaying that it is the Modules Socials RSS Entries Husqy API route.

Meme

Endpoints related to memes

Endpoint to send a random meme to a channel (a message needs to be present!).

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to send the meme in
channel_idyesintegerThe ID of the channel where the message to edit is located
message_idyesintegerThe ID of the message to edit with the random meme
member_idyesintegerThe member requesting the meme

Possible errors:

  • BadRequestError
  • SettingsError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},

Meme handlers

Endpoints related to memes

GET - /modules/socials/services/meme/get

An endpoint to get the URL and title of a random meme.

danger

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
danger

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:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the specified references in
privacy_member_idyesintegerThe ID of the member who wants to check their references

Possible errors:

  • BadRequestError
  • ForbiddenError
  • InternalServerError
DELETE - /modules/socials/privacy/delete-user-entries
danger

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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the specified references in
privacy_member_idyesintegerThe ID of the member who wants to remove their references

Possible errors:

  • BadRequestError
  • ForbiddenError
  • InternalServerError