getPolls

Fetches information about polls in the specified channel. If an ID string is supplied, it will be included in the query, otherwise all "ACTIVE" polls are included in the returned JSON.

Note: Must be called from inside a Fiber.

version(TwitchSupport && WithTwitchPlugin)
package
getPolls
(,
const string channelName
,
const string pollIDString = string.init
,
const string caller = __FUNCTION__
)

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

channelName string

Name of channel to fetch polls for.

pollIDString string

ID of a specific poll to get.

caller string

Name of the calling function.

Return Value

Type: auto

An arary of Voldemort TwitchPoll structs.

Throws

UnexpectedJSONException on unexpected JSON. EmptyDataJSONException if the JSON has a "data" key but it is empty.