startValidator

Starts a validator routine.

This will validate the API access token and output to the terminal for how much longer it is valid. It will call delegates based upon what it finds.

Note: Must be called from within a Fiber.

version(TwitchSupport && WithTwitchPlugin)
private
void
startValidator
(,
const string authToken
,
const string what
,
void delegate
(
Duration
)
onFirstValidationDg = null
,
void delegate
(
ulong
)
onIDKnownDg = null
,
void delegate
()
onExpiryDg = null
)

Parameters

plugin TwitchPlugin

The current TwitchPlugin.

authToken string

Twitch authorisation key to validate.

what string

A string description (noun) describing the key being validated.

onFirstValidationDg void delegate
(
Duration
)

Delegate to call when the first validation is done.

onIDKnownDg void delegate
(
ulong
)

Delegate to call when the user ID is known.

onExpiryDg void delegate
()

Delegate to call when the token is expired.