jleagle / omdb-imdb-api-client
A package to retrieve movies and TV information from IMDB using the API at omdbapi.com
Installs: 2 865
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 5
Open Issues: 0
Requires
- php: >=5.4
- jleagle/curl-wrapper: ~1.0.0
Requires (Dev)
- phpunit/phpunit: ~6.3.1
README
A package to retrieve movies and TV information from IMDB using the API at omdbapi.com with typed responses
Now that OMDB requires an API key you can set it using:
Imdb::setApiKey('xxx');
Retrieve full movie details, if you know the name or ID of the movie:
$movie = Imdb::retrieve('the matrix'); // If you need to be more specific: // This will also return Rotten Tomatoes ratings & a longer plot $movie = Imdb::retrieve('the matrix', Imdb::TYPE_MOVIE, 1999, true, true);
Search for a movie:
$movies = Imdb::search('the matrix'); // If you need to be more specific: $movies = Imdb::search('the matrix', Imdb::TYPE_MOVIE, 1999);