0.1.7 • Published 10 years ago

tmdb-client v0.1.7

Weekly downloads
6
License
BSD
Repository
github
Last release
10 years ago

tmdb-client

the movie database api for client

NPM

note

module compative with the movie database api version 3

the movie database api version 3 document tmdb-api-v3

using for synchronous the movie database with other database. so almost api has removed because it not neccessary

installation

# use node package manager
npm install tmdb-client

usage

import module

var TmdbClient = require('tmdb-client');

create an instance of tmdb client

// using default api
var tmdbClient = new TmdbClient();

// using custom api
// using when 
//  - tmdb change api url, not change api params and response
//  - you want to use your api key
var api = {
    host: <string>, // url to endpoint api
    key: <string>, // api key
    path: <object> // object contain pair key: value, it is relative path to api
};
var tmdbClient = new TmdbClient(api);

find movie with selector

var selector = {
    pageIndex: <number> // index of page [1, 1000]
};

tmdbClient.findMovie(selector, function(error, items) {});

find movie with identity

var id = <number>;

tmdb.findMovieById(id, function(error, item) {});

count number of movie

// first item is selector and not suport now
tmdb.movieSize({}, function(error, size) {});

find tv with selector

var selector = {
    pageIndex: <number> // index of page [1, 1000]
};

tmdbClient.findTv(selector, function(error, items) {});

find tv with identity

var id = <number>;

tmdb.findTvById(id, function(error, item) {});

count number of tv

// first item is selector and not suport now
tmdb.tvSize({}, function(error, size) {});

find season of tv

var tvId = <number>;
var seasonNumber = <number>;
tmdb.findTvSeason(tvId, seasonNumber, function(error, season) {});

find episode of season

var tvId = <number>;
var seasonNumber = <number>;
var episodeNumber = <number>;
tmdb.findTvSeason(tvId, seasonNumber, epNumber, function(error, episode) {});

next api (pending)

development

# clone form revision system control 
# require ssh-key, please contact with owner to get one
git clone git@github.com:thelordofthetimes/tmdb-client.git
cd tmdb-client

# install dependency module
npm install

# run test
npm test

# write code and more..

# update revision system control
git add .
git commit -am '<message>'
git push
0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago