TwitchApi.HypeTrain.GetHypeTrainEvents (TwitchApi v0.1.2) View Source

⛔ This module is autogenerated please do not modify manually.

Example request from twitch api docs:

descriptions:

requests:

curl -X GET 'https://api.twitch.tv/helix/hypetrain/events?broadcaster_id=270954519&first=1'
-H'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y'
-H'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'

Example response from twitch api docs:

descriptions:

responses:

{"data":[{"id":"1b0AsbInCHZW2SQFQkCzqN07Ib2","event_type":"hypetrain.progression","event_timestamp":"2020-04-24T20:07:24Z","version":"1.0","event_data":{"broadcaster_id":"270954519","cooldown_end_time":"2020-04-24T20:13:21.003802269Z","expires_at":"2020-04-24T20:12:21.003802269Z","goal":1800,"id":"70f0c7d8-ff60-4c50-b138-f3a352833b50","last_contribution":{"total":200,"type":"BITS","user":"134247454"},"level":2,"started_at":"2020-04-24T20:05:47.30473127Z","top_contributions":[{"total":600,"type":"BITS","user":"134247450"}],"total":600}}],"pagination":{"cursor":"eyJiIjpudWxsLCJhIjp7IkN1cnNvciI6IjI3MDk1NDUxOToxNTg3NzU4ODQ0OjFiMEFzYkluQ0haVzJTUUZRa0N6cU4wN0liMiJ9fQ"}}

Link to this section Summary

Types

User ID of the broadcaster. Must match the User ID in the Bearer token if User Token is used.

Cursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response. This applies only to queries without id. If an ID is specified, it supersedes any cursor/offset combinations. The cursor value specified here is from the pagination response field of a prior query.

Maximum number of objects to return. Maximum: 100. Default: 1.

The id of the wanted event, if known

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:

Gets the information of the most recent Hype Train of the given channel ID.

Link to this section Types

Specs

broadcaster_id() :: %{broadcaster_id: String.t()}

User ID of the broadcaster. Must match the User ID in the Bearer token if User Token is used.

Specs

cursor() :: %{cursor: String.t()}

Cursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response. This applies only to queries without id. If an ID is specified, it supersedes any cursor/offset combinations. The cursor value specified here is from the pagination response field of a prior query.

Specs

first() :: %{first: integer()}

Maximum number of objects to return. Maximum: 100. Default: 1.

Specs

id() :: %{id: String.t()}

The id of the wanted event, if known

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

Specs

call(broadcaster_id() | first() | id() | cursor(), user_info()) ::
  {:ok, Finch.Response.t()} | {:error, Exception.t()}

Description:

Gets the information of the most recent Hype Train of the given channel ID.

Required authentication:

User OAuth Token Required scope: channel:read:hype_train

Required authorization: