updated the docs

This commit is contained in:
Dan Zajdband
2012-08-20 13:27:35 -03:00
parent e3b7260d33
commit dbe409ba68

View File

@@ -8,13 +8,9 @@ node.js library that makes the interaction with themoviedb.org V3 API easy.
## How to use ## How to use
Require MovieDB Require MovieDB and provide your themoviedb.org API KEY
var MovieDB = require('moviedb'); var MovieDB = require('moviedb')('your api key');
Create a MovieDB object with your themoviedb.org API KEY
var mdb = new MovieDB('your moviedb api key');
Use the api methods as you want, for example: Use the api methods as you want, for example:
@@ -24,12 +20,17 @@ Use the api methods as you want, for example:
or or
mdb.movieInfo({id: 666}, function(err, res){ mdb.movieInfo({id: 666}, function(err, res){
console.log(res); console.log(res);
}); });
now you can also make chain calls
mdb.searchMovie({query: 'Zoolander' }, function(err, res){
console.log(res);
}).movieInfo({id: 123}, function(err, res){
console.log(res);
});
## Available methods ## Available methods
@@ -37,6 +38,7 @@ All themoviedb.org API v3 methods included (I have plans to change this method n
| Method | API url | | Method | API url |
|:-----------:|:------------:| |:-----------:|:------------:|
| configuration | configuration |
| searchMovie | search/movie | | searchMovie | search/movie |
| searchPerson | search/person | | searchPerson | search/person |
| collectionInfo | collection/:id | | collectionInfo | collection/:id |