Poll Post
To create a poll post, you need to create a poll first and then attach the newly created poll to a post by passing pollId in data property.
Create a Poll
It allows you to create a poll with these inputs:
question - a question which can be up to 500 characters
answers - a set of two to ten answers. Each answer can be up to 200 characters.
answerType - indicates whether the poll allows multiple choices. The default type is
AnswerType.SINGLE
The available options are
AnswerType.SINGLE
andAnswerType.MULTIPLE
. You can select either one or more than one optionclosedIn - a time window indicating how long this poll will take. By default, the
closedIn
value is set to 30 days if the user does not set a value for it.
Create Poll Post
Vote Poll
This API allows you to vote only once and it cannot be undone. However, you can have multiple choices if the poll type is .multiple
.
Close a Poll
Only the owner/creator of a poll can close a poll before the closing time.
Delete a Poll
Only the owner/creator of a poll can close a poll before the closing time.
Observe Poll
As well as getting a poll, you may also interact with a poll using an observer pattern through observePoll.
Last updated