Coder Social home page Coder Social logo

node-eztv's Introduction

eztv

EZTV API module for Node.js

Install

npm install eztv --save

Use

var eztv = require('eztv');
eztv.getShows({query: 'big bang'}, function(error, results) {
	// Do stuff...
}

Methods

getShows(options, callback)

Returns a list of shows.

options: An optional options object. Currently supports:

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

callback: A function that takes two parameters:

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

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, callback)

Returns a list of episodes for a given show.

showId: The show ID.

callback: A function that takes two parameters:

  • 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:64DZYZWMUAVLIWJUXGDIK4QGAAIN7SL6&dn=The.Big.Bang.Theory.S07E17.HDTV.x264-LOL&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.istole.it:80&tr=udp://open.demonii.com:80&tr=udp://tracker.coppersurfer.tk:80",
	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/The_Big_Bang_Theory_S07E17_HDTV_x264-LOL.9715961.TPB.torrent",
	url: "/ep/52823/the-big-bang-theory-s07e17-hdtv-x264-lol/"
}

node-eztv's People

Contributors

moesalih avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.