getUser

Fetches information about a Twitch user and returns it in the form of a Voldemort struct with nickname, display name and account ID members.

Note: Must be called from inside a Fiber.

version(TwitchSupport && WithTwitchPlugin)
package
getUser
(,
const string name = string.init
,
const ulong id = 0
,
const bool searchByDisplayName = false
,
const string caller = __FUNCTION__
)

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

name string

Optional name of user to look up, if no id given.

id ulong

Optional numeric ID of user to look up, if no name given.

searchByDisplayName bool

Whether or not to also attempt to look up name as a display name.

caller string

Name of the calling function.

Return Value

Type: auto

Voldemort aggregate struct with nickname, displayName and id members.

Throws

UnexpectedJSONException on unexpected JSON received.

See Also