Fetches a single movie by arbitrary criteria
set of requirements to search for
options that override the Client's options
a promise yielding a movie
Searches for a movie by arbitrary criteria
set of requirements to search for
page number to return
options that override the Client's options
a promise yielding search results
Generated using TypeDoc
A client for fetching imdb information.
This is primarly useful for making many requests without having to pass a MovieOpts object to the same function over and over again.
All methods still accept an optional MovieOpts object in the case that you want to override one or more of the options. These per-method options are merged with the options that are attached to the object, and override the object-local options.
const cli = new imdb.Client({apiKey: 'xxxxxx', timeout: 30000}); cli.get({name: "The Toxic Avenger"}).then((movie) => { console.log(movie.title); }); cli.search({name: "The Toxic Avenger"}).then((search) => { for (let result of search.results) { console.log(result.title); } });