Comparing version 0.0.4 to 0.0.9
@@ -51,5 +51,3 @@ var RSH = require('./RequestSignatureHelper').RequestSignatureHelper, | ||
OperationHelper.prototype.execute = function(operation, params, callback) { | ||
if (typeof(operation) === 'undefined') { throw 'Missing operation parameter' } | ||
if (typeof(params) === 'undefined') { params = {} } | ||
OperationHelper.prototype.generateUri = function(operation, params) { | ||
params = this.generateParams(operation, params); | ||
@@ -61,4 +59,12 @@ var helper = this.getSignatureHelper(); | ||
var uri = this.baseUri + '?' + queryString; | ||
return uri; | ||
} | ||
OperationHelper.prototype.execute = function(operation, params, callback) { | ||
if (typeof(operation) === 'undefined') { throw 'Missing operation parameter' } | ||
if (typeof(params) === 'undefined') { params = {} } | ||
var uri = this.generateUri(operation, params); | ||
var host = this.endPoint; | ||
var amazonClient = http.createClient(80, host); | ||
var parser = this.parser; | ||
var request = amazonClient.request('GET', uri, {'host':host}); | ||
@@ -69,3 +75,3 @@ request.end(); | ||
response.addListener('data', function(chunk) { | ||
responseBody = responseBody + chunk; | ||
responseBody += chunk; | ||
}); | ||
@@ -72,0 +78,0 @@ response.addListener('end', function() { |
@@ -1,3 +0,2 @@ | ||
var crypto = require('crypto'), | ||
sys = require('sys'); | ||
var crypto = require('crypto'); | ||
@@ -69,10 +68,6 @@ var RSH = function(params) { | ||
/** | ||
* The following characters must not be escaped according to | ||
* RFC 3986: /^A-Za-z0-9\-_.~/ | ||
* The standard JS escape function does the following wrong: | ||
* Should escepe: "*+" | ||
* Shouldn't escape: "~" | ||
* Port of PHP rawurlencode(). | ||
*/ | ||
RSH.prototype.escape = function(x) { | ||
return escape(x).replace(/%7E/g, '~').replace(/\*/g, '%2A').replace(/\+/g, '%2B'); | ||
return encodeURIComponent(x).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A'); | ||
}; | ||
@@ -79,0 +74,0 @@ |
{ "name" : "apac" | ||
, "description" : "Amazon Product Advertising API Client for Node" | ||
, "version" : "0.0.4" | ||
, "version" : "0.0.9" | ||
, "author" : "Dustin McQuay <dmcquay@gmail.com>" | ||
, "repository" : | ||
{ "type" : "git" | ||
, "url" : "git://github.com/dmcquay/node-apac.git" | ||
, "url" : "git://github.com/joelvh/node-apac.git" | ||
} | ||
, "bugs" : { "web" : "http://github.com/dmcquay/node-apac/issues" } | ||
, "bugs" : { "url" : "http://github.com/dmcquay/node-apac/issues" } | ||
, "os" : [ "linux", "darwin", "freebsd" ] | ||
@@ -15,3 +15,3 @@ , "directories" : { "lib" : "./lib/" } | ||
{ "vows" : ">=0.5.0" | ||
, "xml2js" : "*" | ||
, "xml2js" : ">=0.1.7" | ||
} | ||
@@ -18,0 +18,0 @@ , "engines" : { "node" : ">=0.1.97" } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
14671
11
1
1
0
3
Updatedxml2js@>=0.1.7