Poll

@Serializable
data class Poll(val pollId: String, val isExpired: Boolean, val allowsMultipleChoices: Boolean, val votesCount: Long, val options: List<PollOption>, val emojis: List<Emoji>, val expiresAt: Instant? = null, val votersCount: Long? = null, val hasVoted: Boolean? = null, val ownVotes: List<Int>? = null)

Represents a poll attached to a status.

Constructors

Link copied to clipboard
constructor(pollId: String, isExpired: Boolean, allowsMultipleChoices: Boolean, votesCount: Long, options: List<PollOption>, emojis: List<Emoji>, expiresAt: Instant? = null, votersCount: Long? = null, hasVoted: Boolean? = null, ownVotes: List<Int>? = null)

Properties

Link copied to clipboard

Whether the poll allows multiple-choice answers.

Link copied to clipboard

Custom emoji to be used for rendering poll options.

Link copied to clipboard
val expiresAt: Instant? = null

Time at which the poll will expire.

Link copied to clipboard
val hasVoted: Boolean? = null

Whether the current account has voted on this poll.

Link copied to clipboard

Whether the poll is currently expired.

Link copied to clipboard

The list of options available in this poll.

Link copied to clipboard
val ownVotes: List<Int>? = null

If hasVoted is set, the current account's vote choices.

Link copied to clipboard
Link copied to clipboard
val votersCount: Long? = null

Number of unique accounts that voted on this poll.

Link copied to clipboard

The number of votes received on this poll.