endPoll

Ends a Twitch poll, putting it in either a "TERMINATED" or "ARCHIVED" state.

Note: Must be called from inside a Fiber.

version(TwitchSupport && WithTwitchPlugin)
package
endPoll
(,
const string channelName
,
const string pollID
,
const bool terminate
,
const string caller = __FUNCTION__
)

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

channelName string

Name of channel whose poll to end.

pollID string

ID of the specific poll to end.

terminate bool

If set, ends the poll by putting it in a "TERMINATED" state. If unset, ends it in an "ARCHIVED" way.

caller string

Name of the calling function.

Return Value

Type: auto

The JSONValue of the first response returned when ending the poll.

Throws

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