Chatterino
Twitch API

this folder describes what sort of API requests we do, what permissions are required for the requests etc

Helix

Full Helix API reference: https://dev.twitch.tv/docs/api/reference

Adding support for a new endpoint

If you're adding support for a new endpoint, these are the things you should know.

  1. Add a virtual function in the IHelix class. Naming should reflect the API name as best as possible.
  1. Override the virtual function in the Helix class.
  1. Mock the function in the MockHelix class in the tests/src/HighlightController.cpp file.
  1. (Optional) Make a new error enum for the failure callback.

For a simple example, see the updateUserChatColor function and its error enum HelixUpdateUserChatColorError. The API is used in the "/color" command in CommandController.cpp

Get Users

URL: https://dev.twitch.tv/docs/api/reference#get-users

Used in:

Get Users Follows

URL: https://dev.twitch.tv/docs/api/reference#get-users-follows

Used in:

Get Streams

URL: https://dev.twitch.tv/docs/api/reference#get-streams

Used in:

Create Clip

URL: https://dev.twitch.tv/docs/api/reference#create-clip Requires clips:edit scope

Used in:

Get Channel

URL: https://dev.twitch.tv/docs/api/reference#get-channel-information

Used in:

Update Channel

URL: https://dev.twitch.tv/docs/api/reference#modify-channel-information Requires channel:manage:broadcast scope

Used in:

Create Stream Marker

URL: https://dev.twitch.tv/docs/api/reference/#create-stream-marker Requires user:edit:broadcast scope

Used in:

Get User Block List

URL: https://dev.twitch.tv/docs/api/reference#get-user-block-list Requires user:read:blocked_users scope

Used in:

Block User

URL: https://dev.twitch.tv/docs/api/reference#block-user Requires user:manage:blocked_users scope

Used in:

Unblock User

URL: https://dev.twitch.tv/docs/api/reference#unblock-user Requires user:manage:blocked_users scope

Used in:

Search Categories

URL: https://dev.twitch.tv/docs/api/reference#search-categories

Used in:

Manage Held AutoMod Messages

URL: https://dev.twitch.tv/docs/api/reference#manage-held-automod-messages Requires moderator:manage:automod scope

Used in:

Get Cheermotes

URL: https://dev.twitch.tv/docs/api/reference/#get-cheermotes

Used in:

Get Emote Sets

URL: https://dev.twitch.tv/docs/api/reference#get-emote-sets

Not used anywhere at the moment. Could be useful in the future for loading emotes from Helix.

Get Channel Emotes

URL: https://dev.twitch.tv/docs/api/reference#get-channel-emotes

Not used anywhere at the moment.

TMI

The TMI api is undocumented.

Get Chatters

Undocumented