PollOption

@objc(SBDPollOption)
public final class PollOption : NSObject, Codable, Injectable

Represents an option for poll

Since

4.1.0
  • Poll ID

    Declaration

    Swift

    @objc
    public let pollId: Int64
  • Option ID

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    public private(set) var voteCount: Int64 { get }
  • Unix timestamp at which the option is updated (millisecond)

    Declaration

    Swift

    @objc
    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

    @objc(getPollOptionWithParams:completionHandler:)
    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