UNPKG

1.43 kBMarkdownView Raw
1MovieDB
2=======
3[![Build Status](https://travis-ci.org/impronunciable/moviedb.svg?branch=master)](https://travis-ci.org/impronunciable/moviedb)
4[![NPM version](https://badge.fury.io/js/moviedb.svg)](http://badge.fury.io/js/moviedb)
5[![Dependency Status](https://img.shields.io/david/impronunciable/moviedb.svg)](https://david-dm.org/impronunciable/moviedb)
6[![npm](https://img.shields.io/npm/dm/moviedb.svg?maxAge=2592000)]()
7
8**Deprecation notice:** This package is no longer maintained. Please use the [moviedb-promise](https://github.com/grantholle/moviedb-promise) package.
9
10node.js library that makes the interaction with themoviedb.org V3 API easy.
11
12## Installation
13```bash
14npm install moviedb --save
15```
16## Usage
17
18Require MovieDB and provide your themoviedb.org API KEY
19```js
20const MovieDB = require('moviedb')('your api key');
21```
22Use the api methods as you want, for example:
23```js
24mdb.searchMovie({ query: 'Alien' }, (err, res) => {
25 console.log(res);
26});
27```
28or
29```js
30mdb.movieInfo({ id: 666}, (err, res) => {
31 console.log(res);
32});
33```
34now you can also make chain calls
35```js
36mdb
37 .searchMovie({ query: 'Zoolander' }, (err, res) => {
38 console.log(res);
39 })
40 .movieInfo({ id: 123 }, (err, res) => {
41 console.log(res);
42 });
43```
44## Available methods
45
46All themoviedb.org API v3 methods included. Endpoint methods are included on [a wiki page](https://github.com/impronunciable/moviedb/wiki/Library-endpoints)