Migrate /color command to Helix API (#3988)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user