Prediction

@Serializable
data class Prediction(val id: String, val broadcasterId: String, val broadcasterName: String, val broadcasterLogin: String, val title: String, val winningOutcomeId: String? = null, val outcomes: List<PredictionOutcome>, val predictionWindow: Int, val status: String, val createdAt: Instant, val endedAt: Instant? = null, val lockedAt: Instant? = null)

Twitch API: Prediction

Constructors

Link copied to clipboard
constructor(id: String, broadcasterId: String, broadcasterName: String, broadcasterLogin: String, title: String, winningOutcomeId: String? = null, outcomes: List<PredictionOutcome>, predictionWindow: Int, status: String, createdAt: Instant, endedAt: Instant? = null, lockedAt: Instant? = null)

Properties

Link copied to clipboard
@SerialName(value = "broadcaster_id")
val broadcasterId: String

the broadcaster's user ID.

Link copied to clipboard
@SerialName(value = "broadcaster_login")
val broadcasterLogin: String

the broadcaster's login.

Link copied to clipboard
@SerialName(value = "broadcaster_name")
val broadcasterName: String

the broadcaster's display name.

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Instant

RFC3339 timestamp of when the prediction was created.

Link copied to clipboard
@SerialName(value = "ended_at")
val endedAt: Instant?

RFC3339 timestamp of when the prediction ended; null if ongoing.

Link copied to clipboard
val id: String

the prediction ID.

Link copied to clipboard
@SerialName(value = "locked_at")
val lockedAt: Instant?

RFC3339 timestamp of when the prediction was locked; null if not locked.

Link copied to clipboard

the list of prediction outcomes.

Link copied to clipboard
@SerialName(value = "prediction_window")
val predictionWindow: Int

the prediction window in seconds.

Link copied to clipboard

the prediction status.

Link copied to clipboard

the prediction title.

Link copied to clipboard
@SerialName(value = "winning_outcome_id")
val winningOutcomeId: String?

the ID of the winning outcome; null if not resolved.