Poll

data class Poll(id: String?)

A poll included in a Tweet is not a primary object on any endpoint, but can be found and expanded in the Tweet object. The object is available for expansion with ?expansions=attachments.poll_ids to get the condensed object with only default fields. Use the expansion with the field parameter: poll.fields when requesting additional fields to complete the object.

Constructors

Link copied to clipboard
fun Poll(id: String? = null)

Types

Link copied to clipboard
class Options

Properties

Link copied to clipboard
@SerializedName(value = "duration_minutes")
var durationMinutes: Int? = 0

Specifies the total duration of this poll.

Link copied to clipboard
@SerializedName(value = "end_datetime")
var endDateTime: String? = null

Specifies the end date and time for this poll.

Link copied to clipboard
@SerializedName(value = "id")
var id: String? = null

Unique identifier of the expanded poll.

Link copied to clipboard
@SerializedName(value = "options")
var options: ArrayList<Poll.Options>? = null

Contains objects describing each choice in the referenced poll.

Link copied to clipboard
@SerializedName(value = "voting_status")
var votingStatus: String? = null

Indicates if this poll is still active and can receive votes, or if the voting is now closed.