MovieDBClient(apiKey, baseUrl)

The Movie Database API Client.

new MovieDBClient(apiKey, baseUrl)

Parameters:
Name Type Description
apiKey string The movie db api key (Ref)
baseUrl string Base url for movie db api

Extends

Methods

static getInstance(apiKey) → {MovieDBClient}

Get a movie db client instance.
Parameters:
Name Type Description
apiKey string The movie db api key
Returns:
MovieDBClient

get(options) → {Promise}

Get a media(movie/series) by looking up using different params (e.g. title, imdb id, year etc.)
Parameters:
Name Type Description
options object The options based on which the movie will be fetched.
Returns:
Promise
Overrides:
Examples
get({title: 'Saw', year: 2004, type: 'movie'})
get({imdbID: 'tt12444'})

getByIMDBId(imdbID) → {Promise}

Get a media(movie/series) by IMDB ID
Parameters:
Name Type Description
imdbID string IMDB ID of the media
Returns:
Promise

getByTitleAndYear(title, year, typeopt) → {Promise}

Get a media(movie/series) by title and year
Parameters:
Name Type Attributes Default Description
title string Title of the media (movie/series)
year number The year media type(movie/series) was released (Optional).
type string <optional>
'movie' Type of the media; movie/series (Optional).
Returns:
Promise

getDetails(tmdbID, type) → {Promise}

Get details of a movie or series with given tmdb id
Parameters:
Name Type Description
tmdbID string The Movie DB ID of the media
type string The media type; movie/series
Returns:
Promise
Search for a movie/series.
Parameters:
Name Type Description
options object The options based on which the search will be conducted.
Returns:
Promise
Overrides:
Example
search({query: 'Saw', year: 2004, type: 'movie'})