UNPKG

3.1 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| searchMulti | search/multi |
44| searchPerson | search/person |
45| collectionInfo | collection/:id |
46| movieInfo | movie/:id |
47| movieAlternativeTitles | movie/:id/alternative_titles |
48| movieCredits | movie/:id/credits |
49| movieImages | movie/:id/images |
50| movieVideos | movie/:id/videos |
51| movieKeywords | movie/:id/keywords |
52| movieReleases | movie/:id/releases |
53| movieTrailers | movie/:id/trailers |
54| movieTranslations | movie/:id/translations |
55| movieSimilar | movie/:id/similar_movies |
56| personInfo | person/:id |
57| personCredits | person/:id/credits |
58| personImages | person/:id/images |
59| miscLatestMovie | latest/movie |
60| miscNowPlaying | movie/now-playing |
61| miscPopularMovies | movie/popular |
62| miscTopRatedMovies | movie/top-rated |
63| miscAddMovieRating | movie/:id/rating |
64| companyInfo | company/:id |
65| companyMovies | company/:id/movies |
66| accountInfo | account |
67| accountFavoriteMovies | account/:id/favorite_movies |
68| accoutRatedMovies | account/:id/rated_movies |
69| accountAddFavorite | account/:id/favorite |
70
71## License
72
73(The MIT License)
74
75Copyright (c) 2012 Dan Zajdband <dan.zajdband@gmail.com>
76
77Permission is hereby granted, free of charge, to any person obtaining
78a copy of this software and associated documentation files (the
79'Software'), to deal in the Software without restriction, including
80without limitation the rights to use, copy, modify, merge, publish,
81distribute, sublicense, and/or sell copies of the Software, and to
82permit persons to whom the Software is furnished to do so, subject to
83the following conditions:
84
85The above copyright notice and this permission notice shall be
86included in all copies or substantial portions of the Software.
87
88THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
89EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
90MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
91IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
92CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
93TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
94SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.