core
Toggle table of contents
1.2.0
common
Platform filter
common
Switch theme
Search in API
core
core
/
com.cloudflare.realtimekit.polls
/
RtkPolls
Rtk
Polls
class
RtkPolls
:
PublicAPIEmitter
<
RtkPollsEventListener
>
RealtimeKit poll
Members
Types
Companion
Link copied to clipboard
object
Companion
Properties
items
Link copied to clipboard
val
items
:
List
<
Poll
>
Functions
add
Listener
Link copied to clipboard
fun
addListener
(
listener
:
RtkPollsEventListener
)
add
Main
Thread
Listener
Link copied to clipboard
fun
addMainThreadListener
(
listener
:
RtkPollsEventListener
)
create
Link copied to clipboard
fun
create
(
question
:
String
,
options
:
List
<
String
>
,
anonymous
:
Boolean
,
hideVotes
:
Boolean
)
:
PollsError
?
Create poll
remove
Listener
Link copied to clipboard
fun
removeListener
(
listener
:
RtkPollsEventListener
)
remove
Main
Thread
Listener
Link copied to clipboard
fun
removeMainThreadListener
(
listener
:
RtkPollsEventListener
)
to
Map
Link copied to clipboard
fun
toMap
(
)
:
List
<
Map
<
String
,
Any
?
>
>
vote
Link copied to clipboard
fun
vote
(
pollId
:
String
,
pollOption
:
PollOption
)
:
PollsError
?
Vote on poll