Aller au contenu

omniplay/itch 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/itch:1.x-dev

Lue dans les fichiers PHP du paquet au commit adc4fa19c4c5 : 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\Itch

  • ItchFactory class

    "itch": options key (a server-side API key, from the account's settings or OAuth: only for ownership and library; the pages need none), user_agent, api ("https://api.itch.io").

    3 options · 1 method

  • ItchProvider class

    itch.io: a game page's record from its public data.json (no key: the page is "creator/game", leafo/x-moon for https://leafo.itch.io/x-moon), and - with a server-side API key - whether a player owns one of your games (a download key or a purchase: /games/{id}/download_keys) and the library of the key's own account (/profile/owned-keys). itch.io has no search API.

    7 methods

Omniplay\Itch

ItchFactory class

final class ItchFactory extends ProviderFactory ItchFactory.php:17

"itch": options key (a server-side API key, from the account's settings or OAuth: only for ownership and library; the pages need none), user_agent, api ("https://api.itch.io").

Options

OptionDefault
keynull
user_agent'omniplay/1.0 (+https://github.com/glitchr-omnisense/omniplay)'
api'https://api.itch.io'

ItchFactory::__construct()

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

ItchProvider class

final class ItchProvider implements ProviderInterface, CatalogueInterface, OwnershipInterface, LibraryInterface ItchProvider.php:31

itch.io: a game page's record from its public data.json (no key: the page is "creator/game", leafo/x-moon for https://leafo.itch.io/x-moon), and - with a server-side API key - whether a player owns one of your games (a download key or a purchase: /games/{id}/download_keys) and the library of the key's own account (/profile/owned-keys). itch.io has no search API.

ItchProvider::__construct()

public function __construct(readonly JsonClient $json, readonly ?string $key = null, readonly string $api = 'https://api.itch.io')

ItchProvider::getName()

public function getName(): string

ItchProvider::getTitle()

public function getTitle(): string

ItchProvider::capabilities()

public function capabilities(): Capabilities

ItchProvider::game()

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

ItchProvider::owns()

public function owns(string $player, GameRef $game): bool

ItchProvider::library()

public function library(string $player): array