stereoflo / tmdb-api
desc
v2.0.3
2020-03-17 10:29 UTC
Requires
- symfony/http-client: ^4.4|^5.0
Requires (Dev)
- consolidation/robo: ^1.0
- friendsofphp/php-cs-fixer: ^2.0
- phpstan/phpstan: ^0.12.5
This package is auto-updated.
Last update: 2025-03-17 21:35:39 UTC
README
How to use
Search
require_once 'vendor/autoload.php'; $common = new \TmdbApi\Common('https://api.themoviedb.org/3', '{YOU_API_KEY}'); $query = new \TmdbApi\Query('борн', true, ['language' => 'ru']); $movie = new \TmdbApi\Section\Search\Movie($query); $tmdb = new \TmdbApi\TmdbApi($common, $movie); $res = $tmdb->get(); var_dump($res);
Get movie by id
$query = new \TmdbApi\Query(2502, true, ['language' => 'ru']); $common = new \TmdbApi\Common('https://api.themoviedb.org/3', '{YOU_API_KEY}'); $query = new \TmdbApi\Query(2502, true, ['language' => 'ru']); $movie = new \TmdbApi\Section\Movie\Movie($query); $tmdb = new \TmdbApi\TmdbApi($common, $movie); $res = $tmdb->get(); var_dump($res);