TwitchApi.Ads.StartCommercial (TwitchApi v0.1.2) View Source

⛔ This module is autogenerated please do not modify manually.

Example request from twitch api docs:

descriptions:

This request starts a commercial.

requests:

curl -X POST 'https://api.twitch.tv/helix/channels/commercial'
-H'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx'
-H'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'
-H'Content-Type: application/json'
--data-raw'{ "broadcaster_id": "41245072", "length": 60 }'

Example response from twitch api docs:

descriptions:

responses:

{"data":[{"length":60,"message":"","retry_after":480}]}

Link to this section Summary

Types

Map containing the user needed information for the fetch of the required user OAuth access token. You will be able to choose from one way or the other for fetching previously OAuth access tokens. :user_id field contains the user ID from twitch, e.g. 61425548 or "61425548" :user_name field constains the user name from twitch, e.g. "hiimkamiyuzu"

Functions

Description:

Starts a commercial on a specified channel.

Link to this section Types

Specs

user_info() :: %{user_id: integer() | binary()} | %{user_name: binary()}

Map containing the user needed information for the fetch of the required user OAuth access token. You will be able to choose from one way or the other for fetching previously OAuth access tokens. :user_id field contains the user ID from twitch, e.g. 61425548 or "61425548" :user_name field constains the user name from twitch, e.g. "hiimkamiyuzu"

Link to this section Functions

Link to this function

call(body_params, user_info)

View Source

Specs

call(%{broadcaster_id: String.t(), length: integer()} | nil, user_info()) ::
  {:ok, Finch.Response.t()} | {:error, Exception.t()}

Description:

Starts a commercial on a specified channel.

Required authentication:

OAuth Token required Required scope: channel:edit:commercial

Required authorization: