@tool extends TwitchData # CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY. class_name TwitchEndPrediction ## ## #/components/schemas/EndPredictionBody class Body extends TwitchData: ## The ID of the broadcaster that’s running the prediction. This ID must match the user ID in the user access token. @export var broadcaster_id: String: set(val): broadcaster_id = val track_data(&"broadcaster_id", val) ## The ID of the prediction to update. @export var id: String: set(val): id = val track_data(&"id", val) ## The status to set the prediction to. Possible case-sensitive values are: ## ## * RESOLVED — The winning outcome is determined and the Channel Points are distributed to the viewers who predicted the correct outcome. ## * CANCELED — The broadcaster is canceling the prediction and sending refunds to the participants. ## * LOCKED — The broadcaster is locking the prediction, which means viewers may no longer make predictions. ## ## The broadcaster can update an active prediction to LOCKED, RESOLVED, or CANCELED; and update a locked prediction to RESOLVED or CANCELED. ## ## The broadcaster has up to 24 hours after the prediction window closes to resolve the prediction. If not, Twitch sets the status to CANCELED and returns the points. @export var status: String: set(val): status = val track_data(&"status", val) ## The ID of the winning outcome. You must set this parameter if you set `status` to RESOLVED. @export var winning_outcome_id: String: set(val): winning_outcome_id = val track_data(&"winning_outcome_id", val) var response: BufferedHTTPClient.ResponseData ## Constructor with all required fields. static func create(_broadcaster_id: String, _id: String, _status: String) -> Body: var body: Body = Body.new() body.broadcaster_id = _broadcaster_id body.id = _id body.status = _status return body static func from_json(d: Dictionary) -> Body: var result: Body = Body.new() if d.get("broadcaster_id", null) != null: result.broadcaster_id = d["broadcaster_id"] if d.get("id", null) != null: result.id = d["id"] if d.get("status", null) != null: result.status = d["status"] if d.get("winning_outcome_id", null) != null: result.winning_outcome_id = d["winning_outcome_id"] return result ## ## #/components/schemas/EndPredictionResponse class Response extends TwitchData: ## A list that contains the single prediction that you updated. @export var data: Array[TwitchPrediction]: set(val): data = val track_data(&"data", val) var response: BufferedHTTPClient.ResponseData ## Constructor with all required fields. static func create(_data: Array[TwitchPrediction]) -> Response: var response: Response = Response.new() response.data = _data return response static func from_json(d: Dictionary) -> Response: var result: Response = Response.new() if d.get("data", null) != null: for value in d["data"]: result.data.append(TwitchPrediction.from_json(value)) return result