SBDPollOption Class Reference

Inherits from NSObject
Conforms to NSCopying
SBDMappable
Declared in SBDPollOption.h

Overview

Represents an option for poll

  pollId

Poll id

@property (atomic, assign, readonly) long long pollId

Declared In

SBDPollOption.h

  optionId

Option id

@property (atomic, assign, readonly) long long optionId

Declared In

SBDPollOption.h

  text

The text to represent the option

@property (nonatomic, strong, readonly) NSString *text

Declared In

SBDPollOption.h

  voteCount

Number of votes casted on the option

@property (atomic, assign, readonly) NSInteger voteCount

Declared In

SBDPollOption.h

  createdBy

ID of the user who has created the option

@property (nonatomic, strong, readonly) NSString *createdBy

Declared In

SBDPollOption.h

  createdAt

Unix timestamp at which the option is created (millisecond)

@property (atomic, assign, readonly) long long createdAt

Declared In

SBDPollOption.h

  updatedAt

Unix timestamp at which the option is updated (millisecond)

@property (atomic, assign, readonly) long long updatedAt

Declared In

SBDPollOption.h

  lastVotedAt

Unix timestamp at which last vote occurs either cast or cancel (millisecond)

@property (atomic, assign, readonly) long long lastVotedAt

Declared In

SBDPollOption.h

  partialVoters

Users who casted the vote on this option, this field is only available when you fetch poll with showPartialVoters option

@property (nonatomic, strong, nullable, readonly) NSArray<SBDUser*> *partialVoters

Declared In

SBDPollOption.h

– init

- (nonnull instancetype)init

+ getWithPollId:optionId:channelUrl:completionHandler:

Gets an option with id

+ (void)getWithPollId:(long long)pollId optionId:(long long)optionId channelUrl:(NSString *)channelUrl completionHandler:(SBDPollOptionHandler)completionHandler

Parameters

pollId

poll id

optionId

option id

channelUrl

channelUrl that poll is belonged to

completionHandler

completion block

Declared In

SBDPollOption.h

– updateWithText:completionHandler:

Update this option with text

- (void)updateWithText:(NSString *)text completionHandler:(SBDPollHandler)completionHandler

Parameters

text

option text

completionHandler

completion block

Declared In

SBDPollOption.h

– deleteWithCompletionHandler:

Deletes this option

- (void)deleteWithCompletionHandler:(nullable SBDErrorHandler)completionHandler

Parameters

completionHandler

completion block

Declared In

SBDPollOption.h