PredictionResource

Twitch Helix Predictions API resource.

Note: This resource returns lists directly rather than Page/Flow because predictions are scoped to a single broadcaster and optionally filtered by specific prediction IDs. Only one prediction can be active at a time, so the result set is inherently small and auto-pagination is unnecessary.

See also

Functions

Link copied to clipboard
suspend fun create(broadcasterId: String, title: String, outcomes: List<String>, predictionWindow: Int): Prediction
Link copied to clipboard
suspend fun end(broadcasterId: String, predictionId: String, status: PredictionEndStatus, winningOutcomeId: String? = null): Prediction
Link copied to clipboard
suspend fun list(broadcasterId: String, ids: List<String> = emptyList(), first: Int = 20, after: String? = null): List<Prediction>