tv-subs

0.2.2 • Public • Published

Travis Build Status Circle Build Status Appveyor Build Status Build Status io.js supported

tv-subs.com simple api

node ^4.2 and ^5.0 support

Install

npm install tv-subs

Usage

var tvsubs = require('tv-subs');

Search

Arguments Type Default Example
Argument string Lost New Girl
tvsubs.search("New Girl").then(function(data){
    console.log(data);
}).catch(function(err){
 
console.log(err);
 
});
 

output

{ "label": "New Girl 2011", "value": "new-girl" }
 

Detail

Arguments Type Default Example
Argument string lost new-girl
tvsubs.detail("new-girl").then(function(data){
    console.log(data);
}).catch(function(err){
 
console.log(err);
 
});
 

output

{
  "title": "New Girl",
  "year": "2011",
  "type": "Comedy",
  "desc": "Jessica Day is an offbeat and adorable girl in her late 20s who, after a bad breakup, moves in with three single guys. Goofy, positive, vulnerable and honest to a fault, Jess has faith in people, even when she shouldn\'t. Although she\'s dorky and awkward, she\'s comfortable in her own skin. More prone to friendships with women, she\'s not used to hanging with the boys—especially at home.",
  "season":
   [ { "title": "Season 1", "path": "/tv/new-girl/season-1/" },
     { "title": "Season 2", "path": "/tv/new-girl/season-2/" },
     { "title": "Season 3", "path": "/tv/new-girl/season-3/" },
     { "title": "Season 4", "path": "/tv/new-girl/season-4/" } ]
}
 

Season

Arguments Type Default Example
Argument string /lost/season-1 /new-girl/season-4
tvsubs.season("/new-girl/season-4").then(function(data){
    console.log(data);
}).catch(function(err){
 
console.log(err);
 
});
 

output

[{ "title": "Episode 13",
       "path": "/tv/new-girl/season-4/episode-13/" } ];
 
 

Episode

Arguments Type Default Example
Argument string /lost/season-1/episode-1 /tv/new-girl/season-4/episode-13
tvsubs.episode("/new-girl/season-4/episode-13").then(function(data){
    console.log(data);
}).catch(function(err){
 
console.log(err);
 
});
 

output

    [ { "title": "New.Girl.S04E13.HDTV.x264-KILLERS",
       "path": "/subtitles/new-girl-season-4-episode-13-arabic-624",
       "lang": "Arabic",
       "download":"http://www.tv-subs.com/subtitle/new-girl-season-4-episode-13-arabic-624.zip",
       "uploader": "anonymous" }];

download

Arguments Type Example
Argument string http://www.tv-subs.com/subtitle/new-girl-season-4-episode-13-arabic-624.zip
tvsubs.download("http://www.tv-subs.com/subtitle/new-girl-season-4-episode-13-arabic-624.zip"}).then(function(file){
    // donwload function return stream  
    file.pipe(fs.createWriteStream('subtitle.zip'));
 
}).catch(function(err){
 
console.log(err);
 
});
 
 

Readme

Keywords

none

Package Sidebar

Install

npm i tv-subs

Weekly Downloads

2

Version

0.2.2

License

MIT

Last publish

Collaborators

  • c0b41