Code Monkey home page Code Monkey logo

tmdbjs's Introduction

tmdbjs

Build Status Code Climate Test Coverage Dependencies Status DevDependencies Status

The movie database API wrapper for JavaScript.

You can check the original documentation about The movie database API here.

Initialize

You can initialize the wrapper using the init method with a object containing your api key:

var tmdb = tmdb.init({ apikey: YOUR_API_KEY });

How to use:

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

API

init(options)

  • options (object) - Object with the configuration of the wrapper
  • options.apikey (string) - TMDB api key

Initialize the configuration of the wrapper

getConfiguration(callback)

  • callback (function) - Callback

Get the configuration of the TMDB service. Check the response

getMoviesUpcoming(callback)

  • callback (function) - Callback

Get the movies that are upcoming to cinemas and theaters. Check the response

getMoviesNowPlaying(callback)

  • callback (function) - Callback

Get movies which are playing on cinemas and theaters. Check the response

getMovieLatest(callback)

  • 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

getMoviesTopRated(callback)

  • callback (function) - Callback

Get movies top rated. Check the response

getMoviesPopular(callback)

  • callback (function) - Callback

Get most popular movies. Check the response

getMovie(movieid, callback)

  • movieid (number) - The movie id which you are requesting for.
  • callback (function) - Callback

Get a movie by it id. Check the response

getMoviesSimilarTo(movieid, callback)

  • 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

getMovieCredits(movieid, callback)

  • 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

getMovieImages(movieid, callback)

  • movieid (number) - Id of the movie.
  • callback (function) - Callback

Get images from a movie given its id. Check the response

getMovieKeywords(movieid, callback)

  • movieid (number) - Id of the movie.
  • callback (function) - Callback

Get keywords of a movie given its id. Check the response

getMovieVideos(movieid, callback)

  • movieid (number) - Id of the movie.
  • callback (function) - Callback

Get videos of a movie given its id. Check the response

getMovieReviews(movieid, callback)

  • movieid (number) - Id of the movie.
  • callback (function) - Callback

Get review of a movie given its id. Check the response

getMovieRating(movieid, callback)

  • movieid (number) - Id of the movie.
  • callback (function) - Callback

Get rating of a movie given its id. Check the response

search(query, callback)

  • 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.

searchMovie(query, callback)

  • 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.

tmdbjs's People

Contributors

gabrielperales avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.