PollDetails

public final class PollDetails: NSObject, Codable

Represents a poll details information

Since

4.1.0
  • An additional text to accompany the poll. Can be used to provide explanations for incorrect quiz answers

    Declaration

    Swift

    public private(set) var data: PollData?
  • Number of voters who casted a vote on the poll.

    Declaration

    Swift

    public private(set) var voterCount: Int
  • Possible options for which a user can vote.

    Declaration

    Swift

    public private(set) var options: [PollOption]
  • Current user’s voted option list.

    Declaration

    Swift

    public private(set) var votedOptionIds: [Int]
  • User ID who creates this poll.

    Declaration

    Swift

    public let createdBy: String?
  • Whether to allow user-suggested options.

    Declaration

    Swift

    public let allowUserSuggestion: Bool
  • Whether to allow multiple vote casting.

    Declaration

    Swift

    public let allowMultipleVotes: Bool
  • Unix timestamp at which the poll is created (millisecond).

    Declaration

    Swift

    public let createdAt: Int64
  • Unix timestamp at which the poll is updated (millisecond).

    Declaration

    Swift

    public let updatedAt: Int64
  • Unix timestamp at which the poll has closed or will close (second).

    Declaration

    Swift

    public let closeAt: Int64
  • Whether the poll is closed.

    Declaration

    Swift

    public internal(set) var status: PollStatus
  • Encodes this object.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance

  • Default constructor.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    Decoder instance

  • Compares this object with given other object.

    Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool

    Parameters

    object

    Any instance

    Return Value

    true if same otherwise false