Install it from npm:
$ npm install zaarrg/twitch-gql-ttvdropbot
Head over to the examples/
directory for examples.
const TwitchGQL = require("..").Init();
(async () => {
let CurrentTopStreams = await TwitchGQL.GetTopStreams();
CurrentTopStreams = CurrentTopStreams.data.streams.edges;
console.log(CurrentTopStreams);
})();
clientID
- An optional parameter to set the client ID
Initializes TwitchGQL en returns a client-object
login
- Login of the broadcaster
Gets broadcaster information.
amount
- An optional parameter to set the amount of rows you want to get
Get the current top broadcasters currently live
login
- Login of the broadcaster
Get a list of last broadcasts or videos from a broadcaster
videoID
- The video ID you want to request the access token for
Get an access token and signature to use for an m3u8 playlist
videoID
- The video ID you want to request the access token for
Get highlights/game changes of a vod
game
- The name of the Game e.g.: "tom clancy's rainbow six siege"
Get whole Directory of a Game on twitch
channelLogin
- The video ID you want to request the access token for
Get the Live Status of a streamer.
Returns True for Live, False for Offline and Null for Streamer not found.
timeout
- Timeout in ms, between the retries.
Set the Retry timeout.
amount
- The max amount of retries.
Set the maximum of Retries.
-
QueryName
- The name of a preset query in thequeries
directory
In the case thepreset
parameter is true, this is the name of a pre-set queryname from Twitch -
variables
- An optional object of variables you want to pass onto the query -
sha256Hash
- Custom Hash to get specific requests without the need for it to be implemented -
OAuth
- Ability to Provide a OAuth Token to get otherwise Inaccessible content like inventory -
preset
- (default false) iftrue
this will use provided sha256 otherwise will search -
headers
- Add more headers to the request Format: ({'Cookie': '...'}) -
integrity
- (default false) iftrue
will add the integrity check to the request
Send a raw query through GraphQL
Made by poespas ( [email protected] ) edited by Zarg for the use with TTVDropBot