Skip to main content

Games - Get

Description

Gets game information by game ID or name.

You may get up to 100 categories or games by specifying their ID or name. You may specify all IDs, all names, or a combination of IDs and names. If you specify a combination of IDs and names, the total number of IDs and names must not exceed 100.

Method Definition

@RequestLine("GET /games?id={id}&name={name}&igdb_id={igdb_id}")
@Headers("Authorization: Bearer {token}")
HystrixCommand<GameList> getGames(
@Param("token") String authToken,
@Param("id") List<String> id,
@Param("name") List<String> name,
@Param("igdb_id") List<String> igdbId
);

Required Parameters (at least one)

NameTypeDescription
idstringGame ID. At most 100 id values can be specified
namestringGame name. The name must be an exact match. For instance, “Pokemon” will not return a list of Pokemon games; instead, query the specific Pokemon game(s) in which you are interested. At most 100 name values can be specified.
igdb_idstringThe IGDB ID of the game to get. Maximum: 100. The endpoint ignores duplicate and invalid IDs or IDs that weren’t found.

Optional Parameters

NameTypeDescription
authTokenstringUser or App Auth Token

Code-Snippets

GameList resultList = twitchClient.getHelix().getGames(Arrays.asList(overwatchGameId), null, null).execute();

resultList.getGames().forEach(game -> {
System.out.println("Game ID: " + game.getId() + " is " + game.getName());
});