Twitch module
- Source:
Members
(inner, constant) firebaseFunctions
It allows to communicate with the firebase DB.
- Source:
Methods
(async, inner) actionTwitch(func, uid, param)
function tree which allows you to choose the right function
Parameters:
Name | Type | Description |
---|---|---|
func |
string | function chosen by the user |
uid |
string | uid of the user |
param |
string | It can be the name of a streamer, the name of a streamer & the number of viewers required or the name of a game. |
- Source:
Returns:
returns a bool true condition is true otherwise returns false
(async, inner) checkTopGames(uid, game, clientID)
Check if the Top Twich game is the same as the one selected by the user
Parameters:
Name | Type | Description |
---|---|---|
uid |
String | uid of the user |
game |
String | Game selected by the user |
clientID |
String | clientID token of the twitch developer account |
- Source:
Returns:
returns a bool true condition is true otherwise returns false
(async, inner) checkViewers(uid, streamerName__nbViewers, clientID)
See if the chosen streamer is live or not and have more than viewer number choose.
Parameters:
Name | Type | Description |
---|---|---|
uid |
String | uid of the user |
streamerName__nbViewers |
String | streamer name than the user has chosen and Number of viewers required |
clientID |
String | clientID token of the twitch developer account |
- Source:
Returns:
returns a bool true condition is true otherwise returns false
(inner) encodeQueryString(params)
Gets the elements of the url and encodes them to work with "éàè..." characters
Parameters:
Name | Type | Description |
---|---|---|
params |
* | params contains the elements to be added to the url. |
- Source:
(async, inner) getStreamByUserName(uid, streamerName, clientID)
See if the chosen streamer is live or not.
Parameters:
Name | Type | Description |
---|---|---|
uid |
String | uid of the user |
streamerName |
String | streamerName of the person the user has chosen |
clientID |
String | clientID token of the twitch developer account |
- Source:
Returns:
returns a bool true condition is true otherwise returns false
(inner) setUserData(twhtokens)
Sets the user data in the Firebase database.
Parameters:
Name | Type | Description |
---|---|---|
twhtokens |
Object | An object containing the Twitch API access and refresh tokens, as well as the user ID. |
- Source: