PollOption

public final class PollOption: NSObject, Codable, Injectable

Represents an option for poll

Since

4.1.0
  • Poll ID

    Declaration

    Swift

    public let pollId: Int64
  • Option ID

    Declaration

    Swift

    public let pollOptionId: Int64
  • The text to represent the option

    Declaration

    Swift

    public let text: String
  • ID of the user who has created the option

    Declaration

    Swift

    public let createdBy: String
  • Unix timestamp at which the option is created (millisecond)

    Declaration

    Swift

    public let createdAt: Int64
  • Number of votes casted on the option

    Declaration

    Swift

    public private(set) var voteCount: Int64
  • Unix timestamp at which the option is updated (millisecond)

    Declaration

    Swift

    public let updatedAt: Int64
  • Declaration

    Swift

    public func encode(to encoder: any Encoder) throws
  • Declaration

    Swift

    public required init(from decoder: any Decoder) throws
  • Gets an option with ID.

    Declaration

    Swift

    public static func getPollOption(
        params: PollOptionRetrievalParams,
        completionHandler: @escaping PollOptionHandler
    )

    Parameters

    params

    poll option params

    completionHandler

    completion block

  • 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