imdb-search
A wrapper on omdb module to easy select correct wanted item with all info
Use ES6 Promise for search and get a title info.
Installation
with npm:
$ npm install --save imdb-search
or with yarn:
$ yarn add imdb-search
Example
const imdb = ; // Search for a Movie, result is an array of moviesimdb ; // We can pass year and type as optional args to get right result// Because of omdb dependency movies can have this types: `series, movie, episode`imdb ; // We can select item number in returned resultimdb ; // Get a movie with imdb idimdb ;
Methods
search(name[, year, type])
Use this method to search on imdb with name, you can pass year and type as optional arguments.
Search method return an array of movies.
Note: Each item of search array have one field namedid
(internal id), use this id to get more info.
get(id)
Use this method to get a movie from the list of movies on the last search
Note: id
value can be an internal id or imdb specific id.