We use this module for access to twitch API that requires an auth token
Methods
# static getAllStreamGroupsStreams()
Returns all the data regarding the current twitch streams of the users with twitch streams in the groups
Parameters:
Name | Type | Description |
---|---|---|
req.body.streamGroups |
* | the groups of streamers in the stream; |
# async inner refreshTwitchAuth()
We need to get a twitch auth token in order to get full streamer data
Tokens need to be refreshed every set interval - we validate the token on each call and if it's invalid we refresh it
Token resets every 60 days, we clear it from the cache every 30
# async inner validateTwitchAuth()
This is where we validate our token before making a call