Read from the package's own PHP files at the commit adc4fa19c4c5: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
ItchFactoryclass"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
ItchProviderclassitch.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
| Option | Default | |
|---|---|---|
key | null | |
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(): stringItchProvider::getTitle()
public function getTitle(): stringItchProvider::capabilities()
public function capabilities(): CapabilitiesItchProvider::game()
public function game(GameRef $ref, ?string $language = null, ?string $country = null): ?GameItchProvider::owns()
public function owns(string $player, GameRef $game): boolItchProvider::library()
public function library(string $player): array