TwitchGameInfo interface

Information about a Twitch game

Signature:

export interface TwitchGameInfo 

Remarks

This is the same data as the Twitch API provides with the addition of:

isValid which you must check in the response to ensure the input was valid and Twitch was able to find the data

Properties

PropertyModifiersTypeDescription
boxArtUrlreadonlystringURL of an image that represents the game with place holders for the size
idreadonlystringTwitch id of the game
igdbIdreadonlystringThe id of the game on igdb.com if available
isValidreadonlyboolean

False if the request failed

Could be a service / network outage but more likely the id was invalid

namereadonlystringDisplay name of the game

TwitchGameInfo.boxArtUrl property

URL of an image that represents the game with place holders for the size

Signature:

readonly boxArtUrl: string;

Remarks

Replace the literal strings {width} and {height} returned in this url to set the size of the image

TwitchGameInfo.id property

Twitch id of the game

Signature:

readonly id: string;

TwitchGameInfo.igdbId property

The id of the game on igdb.com if available

Signature:

readonly igdbId: string;

TwitchGameInfo.isValid property

False if the request failed

Could be a service / network outage but more likely the id was invalid

Signature:

readonly isValid: boolean;

TwitchGameInfo.name property

Display name of the game

Signature:

readonly name: string;