mirror of
https://github.com/KevinMidboe/moviedb.git
synced 2025-10-29 17:50:25 +00:00
updated the docs
This commit is contained in:
16
Readme.md
16
Readme.md
@@ -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 |
|
||||||
|
|||||||
Reference in New Issue
Block a user