Skip to main content

Games

FunctionReturns
getGamesByIdsPromise<Array<Game>>
getGamesByNamesPromise<Array<Game>>
getGamesByIgdbIdsPromise<Array<Game>>
getGameByIdPromise<Game | null>
getGameByNamePromise<Game | null>
getGameByIgdbIdPromise<Game | null>
getGameByIdBatchedPromise<Game | null>
getGameByNameBatchedPromise<Game | null>
getGameByIgdbIdBatchedPromise<Game | null>
getTopGamesPromise<PaginatedResult<Game>>

Functions​

getGamesByIds​

twitch.game.getGamesByIds(gameIds: Array<string>): Promise<Array<Game>>

getGamesByNames​

twitch.game.getGamesByNames(gameNames: Array<string>): Promise<Array<Game>>

getGamesByIgdbIds​

twitch.game.getGamesByIgdbIds(igdbIds: Array<string>): Promise<Array<Game>>

getGameById​

twitch.game.getGameById(gameId: string): Promise<Game | null>

getGameByName​

twitch.game.getGameByName(gameName: string): Promise<Game | null>

getGameByIgdbId​

twitch.game.getGameByIgdbId(igdbId: string): Promise<Game | null>

getGameByIdBatched​

twitch.game.getGameByIdBatched(gameId: string): Promise<Game | null>

getGameByNameBatched​

twitch.game.getGameByNameBatched(gameName: string): Promise<Game | null>

getGameByIgdbIdBatched​

twitch.game.getGameByIgdbIdBatched(igdbId: string): Promise<Game | null>

getTopGames​

twitch.game.getTopGames(pagination?: Pagination): Promise<PaginatedResult<Game>>

Types​

Game​

type Game = {
id: string
name: string
boxArtUrl: string
igdbId: string
}

PaginatedResult​

type PaginatedResult<T> = {
data: Array<T>
cursor?: string
}

Pagination​

interface Pagination {
limit?: number
after?: string
before?: string
}