Migrate /color command to Helix API (#3988)

This commit is contained in:
pajlada
2022-09-16 23:15:28 +02:00
committed by GitHub
parent c6ebb70e05
commit 4f1976b1be
9 changed files with 270 additions and 0 deletions
+12
View File
@@ -6,6 +6,18 @@ this folder describes what sort of API requests we do, what permissions are requ
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](../../../controllers/commands/CommandController.cpp)
### Get Users
URL: https://dev.twitch.tv/docs/api/reference#get-users