TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixGameApi

The Helix API methods that deal with games.

Overview

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

Example

const api = new ApiClient({ authProvider });
const game = await api.games.getGameByName('Hearthstone');

Methods

getGameById(id)

async

Gets the game data for the given game ID.

ParameterTypeRequiredDefaultDescription
idstringnone

The game ID you want to look up.

Return type: HelixGame | null

getGameByIdBatched(id)

async

Gets the game data for the given game ID, batching multiple calls into fewer requests as the API allows.

ParameterTypeRequiredDefaultDescription
idstringnone

The game ID you want to look up.

Return type: HelixGame | null

getGameByIgdbId(igdbId)

async

Gets the game data for the given IGDB ID.

ParameterTypeRequiredDefaultDescription
igdbIdstringnone

The IGDB ID you want to look up.

Return type: HelixGame | null

getGameByIgdbIdBatched(igdbId)

async

Gets the game data for the given IGDB ID, batching multiple calls into fewer requests as the API allows.

ParameterTypeRequiredDefaultDescription
igdbIdstringnone

The IGDB ID you want to look up.

Return type: HelixGame | null

getGameByName(name)

async

Gets the game data for the given game name.

ParameterTypeRequiredDefaultDescription
namestringnone

The game name you want to look up.

Return type: HelixGame | null

getGameByNameBatched(name)

async

Gets the game data for the given game name, batching multiple calls into fewer requests as the API allows.

ParameterTypeRequiredDefaultDescription
namestringnone

The game name you want to look up.

Return type: HelixGame | null

getGamesByIds(ids)

async

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

ParameterTypeRequiredDefaultDescription
idsstring[]none

The game IDs you want to look up.

Return type: HelixGame[]

getGamesByIgdbIds(igdbIds)

async

Gets the game data for the given list of IGDB IDs.

ParameterTypeRequiredDefaultDescription
igdbIdsstring[]none

The IGDB IDs you want to look up.

Return type: HelixGame[]

getGamesByNames(names)

async

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

ParameterTypeRequiredDefaultDescription
namesstring[]none

The game names you want to look up.

Return type: HelixGame[]

getTopGames(pagination)

async

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

ParameterTypeRequiredDefaultDescription
paginationHelixPaginationnonesee below
pagination.afterstringnone

A cursor to get the following page of.

pagination.beforestringnone

A cursor to get the previous page of.

pagination.limitnumbernone

The number of results per page.

getTopGamesPaginated()

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

Return type: HelixPaginatedRequest<HelixGameData, HelixGame>