PollConfig

data class PollConfig(val name: String, val options: List<String>, val description: String = "", val votingVisibility: VotingVisibility = VotingVisibility.PUBLIC, val enforceUniqueVote: Boolean = true, val maxVotesAllowed: Int = 1, val allowUserSuggestedOptions: Boolean = false, val allowAnswers: Boolean = false)

The PollConfig object is used to configure a poll.

Constructors

Link copied to clipboard
constructor(name: String, options: List<String>, description: String = "", votingVisibility: VotingVisibility = VotingVisibility.PUBLIC, enforceUniqueVote: Boolean = true, maxVotesAllowed: Int = 1, allowUserSuggestedOptions: Boolean = false, allowAnswers: Boolean = false)

Properties

Link copied to clipboard
val allowAnswers: Boolean = false

If set to true, users can send answers. Default is false.

Link copied to clipboard

If set to true, users can suggest new options. Default is false.

Link copied to clipboard

The description of the poll.

Link copied to clipboard

If set to true, a user can only vote once. Default is true.

Link copied to clipboard

The maximum number of votes a user can cast. Default is 1.

Link copied to clipboard

The name of the poll.

Link copied to clipboard

The list of options for the poll.

Link copied to clipboard

The visibility of the votes. Default is VotingVisibility.PUBLIC. If set to VotingVisibility.ANONYMOUS, the votes will be anonymous.