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)
asyncRetrieves 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)
asyncRetrieves 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)
asyncRetrieves 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)
asyncRetrieves 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)
asyncRetrieves 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. |
Return type: HelixPaginatedResult<HelixGame>
getTopGamesPaginated()
Creates a paginator for the most viewed games at the moment.
Return type: HelixPaginatedRequest<HelixGameData, HelixGame>