The movie database API wrapper for JavaScript.
You can check the original documentation about The movie database API here.
You can initialize the wrapper using the init method with a object containing your api key:
var tmdb = tmdb.init({ apikey: YOUR_API_KEY });
Callbacks follows the NodeJS convention. You should check the first parameter of the callback to know if an error has ocurred. Otherwise, you will get the requested data in the second parameter of the callback.
Error hangling usually follows the format of the snippet behind this lines:
tmdb.getConfiguration(function(error, data){
if (error) {
throw (error);
}
doSomething(data);
});
init(options)
getConfiguration(callback)
getMoviesUpcoming(callback)
getMoviesNowPlaying(callback)
getMovieLatest(callback)
getMoviesTopRated(callback)
getMoviesPopular(callback)
getMovie(movieid, callback)
getMoviesSimilarTo(movieid, callback)
getMovieCredits(movieid, callback)
getMovieImages(movieid, callback)
getMovieKeywords(movieid, callback)
getMovieVideos(movieid, callback)
getMovieReviews(movieid, callback)
getMovieRating(movieid, callback)
search(query, callback)
searchMovie(query, callback)
- options (
object
) - Object with the configuration of the wrapper - options.apikey (
string
) - TMDB api key
Initialize the configuration of the wrapper
- callback (
function
) - Callback
Get the configuration of the TMDB service. Check the response
- callback (
function
) - Callback
Get the movies that are upcoming to cinemas and theaters. Check the response
- callback (
function
) - Callback
Get movies which are playing on cinemas and theaters. Check the response
- callback (
function
) - Callback where you will get an error or the data of the movie.
Get the latest movie uploaded to TMDB. Check the response
- callback (
function
) - Callback
Get movies top rated. Check the response
- callback (
function
) - Callback
Get most popular movies. Check the response
- movieid (
number
) - The movie id which you are requesting for. - callback (
function
) - Callback
Get a movie by it id. Check the response
- movieid (
number
) - The movie id which you are requesting for similar movies. - callback (
function
) - Callback
Get similar movies to a movie given its id Check the response
- movieid (
number
) - The movie id which you are requesting for its credits. - callback (
function
) - Callback
Get credits from a movie given its id. Check the response
- movieid (
number
) - Id of the movie. - callback (
function
) - Callback
Get images from a movie given its id. Check the response
- movieid (
number
) - Id of the movie. - callback (
function
) - Callback
Get keywords of a movie given its id. Check the response
- movieid (
number
) - Id of the movie. - callback (
function
) - Callback
Get videos of a movie given its id. Check the response
- movieid (
number
) - Id of the movie. - callback (
function
) - Callback
Get review of a movie given its id. Check the response
- movieid (
number
) - Id of the movie. - callback (
function
) - Callback
Get rating of a movie given its id. Check the response
- query (
object
) - Object - query.query (
string
) - Query - query.page (
number
) - Min 1, max 1000 - query.language (
string
) - Language on ISO 639-1 code - query.include_adult (
boolean
) - Flag for include adult content - callback (
function
) - Callback
Search the movie, tv show and person with a single query.
- query (
object
) - Object - query.query (
string
) - Title - query.page (
number
) - Min 1, max 1000 - query.language (
string
) - Language on ISO 639-1 code - query.include_adult (
boolean
) - Flag for include adult content - query.year (
number
) - Filter the results release dates - callback (
function
) - Callback
Search for movies by title.