jleagle/omdb-imdb-api-client

A package to retrieve movies and TV information from IMDB using the API at omdbapi.com

0.2.0 2017-10-02 22:24 UTC

This package is auto-updated.

Last update: 2021-02-09 05:36:01 UTC


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);