UNPKG

3.03 kBMarkdownView Raw
1# MovieDB
2
3node.js library that makes the interaction with themoviedb.org V3 API easy.
4
5## How to install
6
7 npm install moviedb
8
9## How to use
10
11Require MovieDB and provide your themoviedb.org API KEY
12
13 var MovieDB = require('moviedb')('your api key');
14
15Use the api methods as you want, for example:
16
17 mdb.searchMovie({query: 'Alien' }, function(err, res){
18 console.log(res);
19 });
20
21or
22
23 mdb.movieInfo({id: 666}, function(err, res){
24 console.log(res);
25 });
26
27now you can also make chain calls
28
29 mdb.searchMovie({query: 'Zoolander' }, function(err, res){
30 console.log(res);
31 }).movieInfo({id: 123}, function(err, res){
32 console.log(res);
33 });
34
35## Available methods
36
37All themoviedb.org API v3 methods included (I have plans to change this method names, stay tuned):
38
39| Method | API url |
40|:-----------:|:------------:|
41| configuration | configuration |
42| searchMovie | search/movie |
43| searchPerson | search/person |
44| collectionInfo | collection/:id |
45| movieInfo | movie/:id |
46| movieAlternativeTitles | movie/:id/alternative_titles |
47| movieCasts | movie/:id/casts |
48| movieImages | movie/:id/keywords |
49| movieKeywords | movie/:id/keywords |
50| movieReleases | movie/:id/releases |
51| movieTrailers | movue/:id/trailers |
52| movieTranslations | movie/:id/translations |
53| movieSimilar | movie/:id/similar_movies |
54| personInfo | person/:id |
55| personCredits | person/:id/credits |
56| personImages | person/:id/images |
57| miscLatestMovie | latest/movie |
58| miscNowPlaying | movue/now-playing |
59| miscPopularMovies | movie/popular |
60| miscTopRatedMovies | movie/top-rated |
61| miscAddMovieRating | movie/:id/rating |
62| companyInfo | company/:id |
63| companyMovies | company/:id/movies |
64| accountInfo | account |
65| accountFavoriteMovies | account/:id/favorite_movies |
66| accoutRatedMovies | account/:id/rated_movies |
67| accountAddFavorite | account/:id/favorite |
68
69## License
70
71(The MIT License)
72
73Copyright (c) 2012 Dan Zajdband <dan.zajdband@gmail.com>
74
75Permission is hereby granted, free of charge, to any person obtaining
76a copy of this software and associated documentation files (the
77'Software'), to deal in the Software without restriction, including
78without limitation the rights to use, copy, modify, merge, publish,
79distribute, sublicense, and/or sell copies of the Software, and to
80permit persons to whom the Software is furnished to do so, subject to
81the following conditions:
82
83The above copyright notice and this permission notice shall be
84included in all copies or substantial portions of the Software.
85
86THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
87EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
88MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
89IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
90CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
91TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
92SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.