GroupChannelPoll extension

GroupChannelPoll

on

Methods

addPollOption({required int pollId, required String optionText}) Future<Poll>
Adds an option with optionText to this poll.
closePoll({required int pollId}) Future<Poll>
Closes this poll.
deletePoll({required int pollId}) Future<void>
Deletes this poll.
deletePollOption({required int pollId, required int pollOptionId}) Future<void>
Deletes this poll option.
getPollChangeLogsSinceTimestamp(int timestamp) Future<PollChangeLogs>
Requests poll change logs after given timestamp.
getPollChangeLogsSinceToken(String? token) Future<PollChangeLogs>
Requests poll change logs after given token.
updatePoll({required int pollId, required PollUpdateParams params}) Future<Poll>
Updates fields of this poll with given params.
updatePollOption({required int pollId, required int pollOptionId, required String optionText}) Future<Poll>
Updates optionText fields of this poll option.
votePoll({required int pollId, required List<int> pollOptionIds}) Future<PollVoteEvent>
Vote on pollOptionIds. This operation overrides previous vote actions, so to update previous vote, pass new pollOptionIds as parameter. To cancel votes, pass an empty list as pollOptionIds.