1 | # MovieDB
|
2 |
|
3 | node.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 |
|
11 | Require MovieDB and provide your themoviedb.org API KEY
|
12 |
|
13 | var MovieDB = require('moviedb')('your api key');
|
14 |
|
15 | Use the api methods as you want, for example:
|
16 |
|
17 | mdb.searchMovie({query: 'Alien' }, function(err, res){
|
18 | console.log(res);
|
19 | });
|
20 |
|
21 | or
|
22 |
|
23 | mdb.movieInfo({id: 666}, function(err, res){
|
24 | console.log(res);
|
25 | });
|
26 |
|
27 | now 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 |
|
37 | All themoviedb.org API v3 methods included. Endpoint methods are included on [a wiki page](https://github.com/impronunciable/moviedb/wiki/Library-endpoints)
|
38 |
|
39 | ## License
|
40 | =======
|
41 |
|
42 | (The MIT License)
|
43 |
|
44 | Copyright (c) 2012 Dan Zajdband <dan.zajdband@gmail.com>
|
45 |
|
46 | Permission is hereby granted, free of charge, to any person obtaining
|
47 | a copy of this software and associated documentation files (the
|
48 | 'Software'), to deal in the Software without restriction, including
|
49 | without limitation the rights to use, copy, modify, merge, publish,
|
50 | distribute, sublicense, and/or sell copies of the Software, and to
|
51 | permit persons to whom the Software is furnished to do so, subject to
|
52 | the following conditions:
|
53 |
|
54 | The above copyright notice and this permission notice shall be
|
55 | included in all copies or substantial portions of the Software.
|
56 |
|
57 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
58 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
59 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
60 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
61 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
62 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
63 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|