1.0.0 • Published 7 years ago

eztv v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

eztv

EZTV API module for Node.js

Build Status NPM version Dependency Status npm

Install

npm install eztv

Usage

import eztv from 'eztv';

const [firstShow, ...shows] = await eztv.getShows();
console.log(firstShow, shows);

const show = await eztv.getShows({ query: 'big bang' });
console.log(show);

const showWithEpisodes = await eztv.getShowEpisodes(376, 'sherlock');
console.log(showWithEpisodes.episodes);

See here for a clonable and runnable example repo

getShow(options)

Returns a promise containing a list of shows from eztv

options: An optional options object. Currently supports:

  • query: Show title to search for. If this option is ommited, all shows are returned.

showId: The show ID.

  • error: Error object or null.
  • results: Array of episodes.

Each result is an object:

{
  "id": 23,
  "slug": "the-big-bang-theory",
  "status": "break",
  "title": "The Big Bang Theory",
  "url": "/shows/23/the-big-bang-theory/"
}

getShowEpisodes(showId)

Returns a promise containing a list of episodes for a given show.

showId: The show ID, which is a number. an example show id is 376 showName: The show name, which is a string. an example show name is 'sherlock'

  • error: Error object or null.
  • results: Array of episodes.

Returns:

{
  "episodes": [...],
  "id": 23,
  "title": "The Big Bang Theory"
}

Each episode is an object:

{
  "episodeNumber": 17,
  "episodeNumber2": null,
  "extra": "HDTV x264-LOL",
  "id": 52823,
  "magnet": "magnet:?xt=urn:btih:64DZYZWMUAVLIWJUXGDI...",
  "proper": false,
  "repack": false,
  "seasonNumber": 7,
  "show": "The Big Bang Theory",
  "title": "The Big Bang Theory S07E17 HDTV x264-LOL",
  "torrentURL": "http://piratebaytorrents.info/9715961...",
  "url": "/ep/52823/the-big-bang-theory-s07e17-hdtv-x264-lol/"
}

Development

git clone https://github.com/moesalih/node-eztv
cd node-eztv
yarn
yarn test
1.0.0

7 years ago

1.0.0-0

7 years ago

0.0.11-0

7 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago