/node-opensubtitles-api

Node Opensubtitles API to make search for your subtitles in OpenSubtitles.org!

Primary LanguageJavaScriptMIT LicenseMIT

Node Opensubtitles APIBuild Status

Node Opensubtitles API to make search for your subtitles in OpenSubtitles.org!

API

Available:

Login - Get token from the opensubtitles.org

opensubtitles.login()
.then(function(token){
	// make magic! =)
}, function(err){
	// Error login =(
});

Logout - Release token from the opensubtitles.org

opensubtitles.logout(token)
.then(function(res){
	// Bye bye magic! =/
}, function(err){
	// Error logout =(
});

Search - Open search

opensubtitles.search(token, {
	q: {
		'sublanguageid':  'pob',
		'query':          'The Walking Dead',
		'tag':            ''
	},
	limit: 1 // max limit: 500
})
.then(function(result){
	// make magic! =)
}, function(err){
	// Error search =(
});

COMING SOON:

Search by File

opensubtitles.searchByFile()
.then(function(result){

}, function(err){

});

Search by Tag

opensubtitles.searchByTag()
.then(function(result){

}, function(err){

});

Search Episode with details

opensubtitles.searchEpisode()
.then(function(result){

}, function(err){

});

Tests

coming soon