+1
-1
| var allsubs = require('./lib/allsubs.js'); | ||
| console.log(allsubs.languages); | ||
| allsubs.get('matrix', 'ro', 20, function(err, subs){ | ||
| allsubs.get('the matrix', 1999, 'ro', 20, function(err, subs){ | ||
| console.log(err, subs); | ||
| }); |
+5
-3
| var http = require('http'), | ||
| parseString = require('xml2js').parseString; | ||
| exports.get = function(movie_title, language, limit, callback){ | ||
| var subs = []; | ||
| exports.get = function(movie_title, year, language, limit, callback){ | ||
| var subs = [], | ||
| path = '/api/'+(limit || 50)+'/'+encodeURIComponent(movie_title.replace(' ', '-'))+'-'+year+'-'+(language || 'en'); | ||
| var req = http.request({ | ||
| host: 'allsubs.org', | ||
| port: 80, | ||
| path: '/api/'+(limit || 50)+'/'+encodeURIComponent(movie_title)+'-'+(language || 'en'), | ||
| path: path, | ||
| method: 'GET' | ||
@@ -11,0 +13,0 @@ }, function(res) { |
+1
-1
| { | ||
| "name": "allsubs", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "A node.js module for allsubs.org API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
4486
1.45%49
2.08%