InterfacePoll

Represents a poll attached to a status.

interface Poll {
    expired: boolean;
    expiresAt?: null | string;
    id: string;
    multiple: boolean;
    options: PollOption[];
    ownVotes?: null | number[];
    voted?: boolean;
    votersCount?: null | number;
    votesCount: number;
}

Properties

expired: boolean

Is the poll currently expired?

expiresAt?: null | string

When the poll ends.

id: string

The ID of the poll in the database.

multiple: boolean

Does the poll allow multiple-choice answers?

options: PollOption[]

Possible answers for the poll.

ownVotes?: null | number[]

When called with a user token, which options has the authorized user chosen? Contains an array of index values for options.

voted?: boolean

When called with a user token, has the authorized user voted?

votersCount?: null | number

How many unique accounts have voted on a multiple-choice poll.

votesCount: number

How many votes have been received.