Aller au contenu

omniplay/igdb Référence de l’API

Étage
Fournisseur · Omniplay
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Vérifié en partie
Licence
MIT
composer require omniplay/igdb:1.x-dev

Lue dans les fichiers PHP du paquet au commit 11592554ed5b : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omniplay\Igdb

  • IgdbFactory class

    "igdb": options client_id and client_secret (required: a Twitch application's), api, token_url, images.

    5 options · 1 method

  • IgdbProvider class

    IGDB, Twitch's games database: an application token got from Twitch with the client credentials and kept until it expires; search and a game's record by Apicalypse queries; a game found by its IGDB number or by its Steam or GOG number (external_games); its identifiers on the stores.

    6 methods · 1 constant

Omniplay\Igdb

IgdbFactory class

final class IgdbFactory extends ProviderFactory IgdbFactory.php:13

"igdb": options client_id and client_secret (required: a Twitch application's), api, token_url, images.

Options

OptionDefault
api'https://api.igdb.com/v4'
token_url'https://id.twitch.tv/oauth2/token'
images'https://images.igdb.com/igdb/image/upload'
client_idrequired
client_secretrequired

IgdbFactory::__construct()

public function __construct(readonly ?HttpClientInterface $http = null)

IgdbProvider class

final class IgdbProvider implements ProviderInterface, SearchInterface, CatalogueInterface IgdbProvider.php:29

IGDB, Twitch's games database: an application token got from Twitch with the client credentials and kept until it expires; search and a game's record by Apicalypse queries; a game found by its IGDB number or by its Steam or GOG number (external_games); its identifiers on the stores.

const SOURCES = [1 => 'steam', 5 => 'gog', 26 => 'epic', 30 => 'itch']

IGDB's external game sources: the store each number belongs to.

IgdbProvider::__construct()

public function __construct(readonly JsonClient $json, readonly string $clientId, readonly string $clientSecret, readonly string $api = 'https://api.igdb.com/v4', readonly string $tokenUrl = 'https://id.twitch.tv/oauth2/token', readonly string $images = 'https://images.igdb.com/igdb/image/upload')

IgdbProvider::getName()

public function getName(): string

IgdbProvider::getTitle()

public function getTitle(): string

IgdbProvider::capabilities()

public function capabilities(): Capabilities
public function search(Query $query): array

IgdbProvider::game()

public function game(GameRef $ref, ?string $language = null, ?string $country = null): ?Game