Voting on a poll
To register a vote on a poll, use the meeting.polls.vote()
method. This method requires the following parameters:
Param | Type | Default Value | Required | Description |
---|---|---|---|---|
pollMessage | Poll | - | yes | The poll message to vote on. |
pollOption | PollOption | - | yes | The option to vote for. |
The following snippet votes for the 1st option on the 1st poll created in the meeting.
val poll: Poll = meeting.polls.items.first()
val selectedPollOption: PollOption = poll.options.first()
val pollsError: PollsError? = meeting.polls.vote(poll.id, selectedPollOption)