View Source TwitchAPI (hello_twitch_api v0.1.0)
Twitch API.
Summary
Functions
Build a base Req.Request.t/0
for Twitch API requests.
Create an eventsub subscription using. https://dev.twitch.tv/docs/api/reference/#create-eventsub-subscription
Handle the result of a request to Twitch.
List EventSub Subscriptions. https://dev.twitch.tv/docs/api/reference/#get-eventsub-subscriptions
Types
Functions
@spec client(TwitchAPI.Auth.t()) :: Req.Request.t()
Build a base Req.Request.t/0
for Twitch API requests.
Link to this function
create_eventsub_websocket_subscription(auth, session_id, type, version, condition)
View Source@spec create_eventsub_websocket_subscription( TwitchAPI.Auth.t(), session_id :: String.t(), type :: String.t(), version :: String.t(), condition :: map() ) :: response()
Create an eventsub subscription using. https://dev.twitch.tv/docs/api/reference/#create-eventsub-subscription
Authorization
- If you use webhooks to receive events, the request must specify an app access token. The request will fail if you use a user access token.
- If you use WebSockets to receive events, the request must specify a user access token. The request will fail if you use an app access token. The token may include any scopes.
@spec handle_response({:ok, Req.Response.t()} | {:error, term()}, pos_integer()) :: response()
Handle the result of a request to Twitch.
@spec list_eventsub_subscriptions(TwitchAPI.Auth.t(), body_params()) :: response()
List EventSub Subscriptions. https://dev.twitch.tv/docs/api/reference/#get-eventsub-subscriptions
Authorization
- If you use webhooks to receive events, the request must specify an app access token. The request will fail if you use a user access token.
- If you use WebSockets to receive events, the request must specify a user access token. The request will fail if you use an app access token. The token may include any scopes.
@spec update_custom_reward( TwitchAPI.Auth.t(), broadcaster_id :: String.t(), reward_id :: String.t(), body_params() ) :: response()
Update Custom Reward https://dev.twitch.tv/docs/api/reference/#update-custom-reward
Authorization
- Requires user access token with
channel:manage:redemptions
scope.