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)
asyncGets the game data for the given game ID.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | none | The game ID you want to look up. |
getGameByIdBatched(id)
asyncGets the game data for the given game ID, batching multiple calls into fewer requests as the API allows.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | none | The game ID you want to look up. |
getGameByIgdbId(igdbId)
asyncGets the game data for the given IGDB ID.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| igdbId | string | none | The IGDB ID you want to look up. |
getGameByIgdbIdBatched(igdbId)
asyncGets the game data for the given IGDB ID, batching multiple calls into fewer requests as the API allows.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| igdbId | string | none | The IGDB ID you want to look up. |
getGameByName(name)
asyncGets the game data for the given game name.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | none | The game name you want to look up. |
getGameByNameBatched(name)
asyncGets the game data for the given game name, batching multiple calls into fewer requests as the API allows.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | none | The game name you want to look up. |
getGamesByIds(ids)
asyncGets the game data for the given list of game IDs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| ids | string[] | none | The game IDs you want to look up. |
getGamesByIgdbIds(igdbIds)
asyncGets the game data for the given list of IGDB IDs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| igdbIds | string[] | none | The IGDB IDs you want to look up. |
getGamesByNames(names)
asyncGets the game data for the given list of game names.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| names | string[] | none | The game names you want to look up. |
getTopGames(pagination)
asyncGets a list of the most viewed games at the moment.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| pagination | HelixPagination | none | see below | |
| 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 | number | none | The number of results per page. |
getTopGamesPaginated()
Creates a paginator for the most viewed games at the moment.