async-bot / imdb-plugin
IMDB plugin
dev-master
2019-11-29 10:54 UTC
Requires
- php: ^7.4
- amphp/amp: ^2.2.0
- amphp/log: ^1.0
- async-bot/core: dev-master
Requires (Dev)
- infection/infection: ^0.13.4
- maglnet/composer-require-checker: ^2.0
- phpunit/phpunit: ^8.3
- slevomat/coding-standard: ^5.0.4
- squizlabs/php_codesniffer: ^3.4.2
This package is auto-updated.
Last update: 2024-11-29 05:57:15 UTC
README
Usage
<?php declare(strict_types=1); use Amp\Http\Client\Client; use AsyncBot\Plugin\Imdb\Plugin; use AsyncBot\Plugin\Imdb\ValueObject\ApiKey; use function Amp\Promise\wait; require_once __DIR__ . '/vendor/autoload.php'; $httpClient = new \AsyncBot\Core\Http\Client(new Client()); // search title by imdb id var_dump(wait((new Plugin($httpClient, new ApiKey('YOUR_API_KEY')))->getByImdbId('tt3896198'))); // search title by title var_dump(wait((new Plugin($httpClient, new ApiKey('YOUR_API_KEY')))->searchByTitle('pulp fiction')));