Skip to content

jonhester/tvmaze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
});

About

Node wrapper for tvmaze that returns promises

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •