Aller au contenu

omniplay/gog 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 réel
Licence
MIT
composer require omniplay/gog:1.x-dev

Lue dans les fichiers PHP du paquet au commit 0fdc5989844c : 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\Gog

  • GogFactory class

    "gog": no key; options locale ("en-US"), country ("US"), currency ("USD": the search's prices; a record's price is the country's own), user_agent, api, catalog.

    6 options · 1 method

  • GogProvider class

    GOG's catalogue, with no key: a product's record (api.gog.com/products, with its description, and its price in a country from /prices) and the store's search (catalog.gog.com). These are the endpoints GOG's own store and GOG Galaxy use; GOG publishes no API terms for them. No ownership: GOG offers no way for a third party to read a player's library.

    6 methods

Omniplay\Gog

GogFactory class

final class GogFactory extends ProviderFactory GogFactory.php:17

"gog": no key; options locale ("en-US"), country ("US"), currency ("USD": the search's prices; a record's price is the country's own), user_agent, api, catalog.

Options

OptionDefault
locale'en-US'
country'US'
currency'USD'
user_agent'omniplay/1.0 (+https://github.com/glitchr-omnisense/omniplay)'
api'https://api.gog.com'
catalog'https://catalog.gog.com'

GogFactory::__construct()

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

GogProvider class

final class GogProvider implements ProviderInterface, SearchInterface, CatalogueInterface GogProvider.php:30

GOG's catalogue, with no key: a product's record (api.gog.com/products, with its description, and its price in a country from /prices) and the store's search (catalog.gog.com). These are the endpoints GOG's own store and GOG Galaxy use; GOG publishes no API terms for them. No ownership: GOG offers no way for a third party to read a player's library.

GogProvider::__construct()

public function __construct(readonly JsonClient $json, readonly string $locale = 'en-US', readonly string $country = 'US', readonly string $currency = 'USD', readonly string $api = 'https://api.gog.com', readonly string $catalog = 'https://catalog.gog.com')

GogProvider::getName()

public function getName(): string

GogProvider::getTitle()

public function getTitle(): string

GogProvider::capabilities()

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

GogProvider::game()

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