DevCraft Документации
English

Getting started v1.0.0

Overview of the MyShows JSON-RPC PHP client.

PHP library for the official MyShows JSON-RPC API (https://api.myshows.me/v2/rpc/). The package devcraftclub/myshows-api-php calls methods by API section and returns typed objects.

The package composer.json does not set a version field yet. This documentation treats the first documented release as 1.0.0.

What it does

  • PHP 8.3 and newer
  • MyShowsClient facade and repositories for each API section
  • Public methods without sign-in and private methods through OAuth2
  • File cache for responses by default
  • Token file storage and access token refresh
  • Request rate limiting
  • Separate exceptions for network, JSON-RPC, sign-in, and rate limit

Sections

Short example

use DevCraftClub\MyShows\MyShowsClient;

$client = MyShowsClient::fromEnv();
$show = $client->shows()->getById(showId: 1, withEpisodes: true);

echo $show->title;

На этой странице