twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks
Welcome

HelixGameApi

The Helix API methods that deal with games.

Overview

Can be accessed using client.helix.games on an ApiClient instance.

Example

const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const game = await api.helix.games.getGameByName('Hearthstone');

Methods

getGameById(id)

async

Retrieves the game data for the given game ID.

Parameter Type Required Default Description
id string none

The game ID you want to look up.

Return type: HelixGame | null

getGameByName(name)

async

Retrieves the game data for the given game name.

Parameter Type Required Default Description
name string none

The game name you want to look up.

Return type: HelixGame | null

getGamesByIds(ids)

async

Retrieves the game data for the given list of game IDs.

Parameter Type Required Default Description
ids Array<string> none

The game IDs you want to look up.

Return type: Array<HelixGame>

getGamesByNames(names)

async

Retrieves the game data for the given list of game names.

Parameter Type Required Default Description
names Array<string> none

The game names you want to look up.

Return type: Array<HelixGame>

getTopGames(pagination)

async

Retrieves a list of the most viewed games at the moment.

Parameter Type Required Default Description
pagination HelixPagination none
pagination.after string none

A cursor to get the following page of.

pagination.before string none

A cursor to get the previous page of.

pagination.limit string none

The number of results per page.

getTopGamesPaginated()

Creates a paginator for the most viewed games at the moment.

Return type: HelixPaginatedRequest<HelixGameData, HelixGame>