TwitchApi.Predictions.EndPrediction (TwitchApi v0.1.2) View Source
⛔ This module is autogenerated please do not modify manually.
Example request from twitch api docs:
descriptions:
Ends a specific Prediction for the TwitchDev channel by setting the status to be resolved.
requests:
curl -X PATCH 'https://api.twitch.tv/helix/predictions' -H'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' -H'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2' -H'Content-Type: application/json' -d'{ "broadcaster_id": "141981764", "id": "bc637af0-7766-4525-9308-4112f4cbf178", "status": "RESOLVED", "winning_outcome_id": "73085848-a94d-4040-9d21-2cb7a89374b7" }'
Example response from twitch api docs:
descriptions:
responses:
{"data":[{"id":"bc637af0-7766-4525-9308-4112f4cbf178","broadcaster_id":"141981764","broadcaster_name":"TwitchDev","broadcaster_login":"twitchdev","title":"Will we win all the games?","winning_outcome_id":"73085848-a94d-4040-9d21-2cb7a89374b7","outcomes":[{"id":"73085848-a94d-4040-9d21-2cb7a89374b7","title":"yes","users":0,"channel_points":0,"top_predictors":null,"color":"BLUE"},{"id":"86010b2e-9764-4136-9359-fd1c9c5a8033","title":"no","users":0,"channel_points":0,"top_predictors":null,"color":"PINK"}],"prediction_window":120,"status":"RESOLVED","created_at":"2021-04-28T21:48:19.480371331Z","ended_at":"2021-04-28T21:54:24.026833954Z","locked_at":"2021-04-28T21:48:34.636685705Z"}]}
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:
NEW Lock, resolve, or cancel a Channel Points Prediction.
Link to this section Types
Specs
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: String.t(), id: String.t(), status: String.t()} | nil, user_info() ) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}
Description:
NEW Lock, resolve, or cancel a Channel Points Prediction.
Required authentication:
Required authorization:
User OAuth tokenRequired scope: channel:manage:predictions