TwitchApi.Predictions.GetPredictions (TwitchApi v0.1.2) View Source

⛔ This module is autogenerated please do not modify manually.

Example request from twitch api docs:

descriptions:

Returns information for a specific Prediction created for the TwitchDev channel.

requests:

curl -X GET 'https://api.twitch.tv/helix/predictions?broadcaster_id=55696719&id=d6676d5c-c86e-44d2-bfc4-100fb48f0656'
-H'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y'
-H'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'

Example response from twitch api docs:

descriptions:

responses:

{"data":[{"id":"d6676d5c-c86e-44d2-bfc4-100fb48f0656","broadcaster_id":"55696719","broadcaster_name":"TwitchDev","broadcaster_login":"twitchdev","title":"Will there be any leaks today?","winning_outcome_id":null,"outcomes":[{"id":"021e9234-5893-49b4-982e-cfe9a0aaddd9","title":"Yes","users":0,"channel_points":0,"top_predictors":null,"color":"BLUE"},{"id":"ded84c26-13cb-4b48-8cb5-5bae3ec3a66e","title":"No","users":0,"channel_points":0,"top_predictors":null,"color":"PINK"}],"prediction_window":600,"status":"ACTIVE","created_at":"2021-04-28T16:03:06.320848689Z","ended_at":null,"locked_at":null}],"pagination":{}}

Link to this section Summary

Types

Cursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.

The broadcaster running Predictions. Provided broadcaster_id must match the user_id in the user OAuth token.Maximum: 1

Maximum number of objects to return.Maximum: 20. Default: 20.

ID of a Prediction. Filters results to one or more specific Predictions. Not providing one or more IDs will return the full list of Predictions for the authenticated channel.Maximum: 100

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:

NEW Get information about all Channel Points Predictions or specific Channel Points Predictions for a Twitch channel.

Link to this section Types

Specs

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

Cursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.

Specs

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

The broadcaster running Predictions. Provided broadcaster_id must match the user_id in the user OAuth token.Maximum: 1

Specs

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

Maximum number of objects to return.Maximum: 20. Default: 20.

Specs

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

ID of a Prediction. Filters results to one or more specific Predictions. Not providing one or more IDs will return the full list of Predictions for the authenticated channel.Maximum: 100

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() | id() | after_query_param() | first(), user_info()) ::
  {:ok, Finch.Response.t()} | {:error, Exception.t()}

Description:

NEW Get information about all Channel Points Predictions or specific Channel Points Predictions for a Twitch channel.

Required authentication:

Required authorization:

User OAuth tokenRequired scope: channel:read:predictions