0.2.2 • Published 8 years ago

tv-subs v0.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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

ArgumentsTypeDefaultExample
ArgumentstringLostNew 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

ArgumentsTypeDefaultExample
Argumentstringlostnew-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

ArgumentsTypeDefaultExample
Argumentstring/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

ArgumentsTypeDefaultExample
Argumentstring/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

ArgumentsTypeExample
Argumentstringhttp://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);

});
0.2.2

8 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago