getTwitchData

By following a passed URL, queries Twitch servers for an entity (user or channel).

version(TwitchSupport && WithTwitchPlugin)
package
getTwitchData
(,
const string url
,
const string caller = __FUNCTION__
)

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

url string

The URL to follow.

caller string

Name of the calling function.

Return Value

Type: auto

A singular user or channel regardless of how many were asked for in the URL. If nothing was found, an exception is thrown instead.

Throws

EmptyDataJSONException if the "data" field is empty for some reason. UnexpectedJSONException on unexpected JSON. TwitchQueryException on other JSON errors.