https://github.com/herenow/aws-sign-product-api
This is a signature creator for the AWS Product Advertising REST API. Dont try to use this signature method for other AWS api's!!!
https://github.com/herenow/aws-sign-product-api
Last synced: 2 months ago
JSON representation
This is a signature creator for the AWS Product Advertising REST API. Dont try to use this signature method for other AWS api's!!!
- Host: GitHub
- URL: https://github.com/herenow/aws-sign-product-api
- Owner: herenow
- License: mit
- Created: 2013-10-12T23:56:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-13T02:44:25.000Z (over 11 years ago)
- Last Synced: 2025-03-22T00:38:24.763Z (2 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AWS-Product-Advertising-API-Signature
=====================================This is a signature creator for the AWS Product Advertising REST API. Dont try to use this signature method for other AWS API's!!! It won't work.
Usage
--------------
``````
var http = require("http");
var generator = require("aws-prod-adv-signature")("YOUR ACCESS KEY", "YOUR SECRET KEY");var url = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&Operation=ItemLookup&ItemId=0679722769&ResponseGroup=ItemAttributes,Offers,Images,Reviews";
var object = generator.sign_url(url);
//object.url => signed url
//object.signature => signaturehttp.get(object.url, function(res) {
getBody(res, function(data) {
console.log(data);
});
});function getBody(res, callback) {
var data = "";
res.on("data", function(chunk) {
data += chunk;
});res.on("end", function() {
callback(data);
});}
``````