tvmaze-api-client

0.0.2 • Public • Published

tvmaze Build Status

Node wrapper for tvmaze that returns promises

Installation

npm install tvmaze --save

Usage

var TVMaze = require('tvmaze');
 
var tvm = new TVMaze();
 
// Search for a show
tvm.findShow('futurama').then( function (shows) {
  console.log(shows);
});
 
// Get a show by tvmaze id
tvm.getShow(538).then( function (show) {
  console.log(show);
});
 
// Get episodes for a show by tvmaze id
tvm.getEpisodes(538).then( function (episodes) {
  console.log(episodes);
});
 
// Get specific episode for a show by tvmaze episode id
tvm.getEpisodeById(49411).then( function (episode) {
  console.log(episode);
});
 
// Get a show by tvmaze id and include cast
tvm.getShow(538, ['cast']).then( function (show) {
  console.log(show);
});
 
// Get a show by tvmaze id and include cast and episodes
tvm.getShow(538, ['cast', 'episodes']).then( function (show) {
  console.log(show);
});
 
// Get populars tv shows (
tvm.getPopulars(20).then( function (showq) {
  console.log(showq);
});

Readme

Keywords

Package Sidebar

Install

npm i tvmaze-api-client

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

130 kB

Total Files

21

Last publish

Collaborators

  • ziishaned