Comments (12)
ItemSearch now support all the params, including BrowseNodeId.
from amazon-product-api.
+1
@masterT What about the BrowseNodeLookup support? I need to use this operation with the ResponseGroup=NewReleases
from amazon-product-api.
@Codepoet77 @masterT I just submited a PR to support the BrowseNodeLook operation
#19
from amazon-product-api.
Hi,
Also is the awstag required? I don't see it in the documentation but I see
it in the url that is built up in util.js
I'm new to aws but I think this means that we need to be an affiliate which
I would want to avoid if possible as the docs for item search don't seem to
state it is a prerequisite.
Please let me know if I'm incorrect.
Thanks,
Andrew
from amazon-product-api.
From the AWSECommerceService doc
AssociateTag
The AssociateTag parameter is a required parameter in Product Advertising API requests. When you register as an Amazon Associate, an Associate tag is sent to you by return email. An Associate tag, also known as an Associate ID, is an automatically generated unique identifier that you will need to make requests through the Product Advertising API. When you log in to the Amazon Associates website for your locale, the page that you are directed to includes a message that says "Signed in as" followed by your Associate tag.
Once a cart is associated with an Associate Tag, you must use it in every other cart operation related to that shopping cart. Otherwise, you will receive an error.
If you do not include an Associate Tag in the CartCreate request, your request will fail.
AssociateTag is locale-specific, that is, for each locale in which you want to earn Associate revenue, you must get an Associate Tag. If you try to use a US-locale Associate Tag, for example, in the JP locale, you will not earn Associate revenue.
Be careful when specifying an AssociateTag because errors are not returned for incorrect values.
from amazon-product-api.
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/BrowseNodeLookup.html
Interesting I just didnt see any mention of the AWS Tag in the sample request that is listed on this page and I actually thought that made sense because I am not trying to advertise or interact with a cart I just want to find items.
Example from this page:
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/BrowseNodeLookup.html
http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=BrowseNodeLookup&
BrowseNodeId=163357
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
Have you ever attempted to make the call without the awstag for the 3 methods that are currently supported. The documentation that you are referencing appears to be accurate for the cart method.
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/CartCreate.html
AssociateTag is documented as required field for this particular call.
According to the documentation this is not necessarily true for BrowseNodeLookup, ItemSearch and ItemLookUp. It is not listed as a required field
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemSearch.html
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/BrowseNodeLookup.html
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemLookup.html
Please let me know what you find. Would be nice to only have to supply the required fields for all 3 calls and also have the ability to supply the optional fields listed in the docs.
from amazon-product-api.
You can ignore my last question. Through trial and error and I was able to successfully make the ItemSearch call. I did have to use the awstag as you had suggested. At this point I just need access to the recent changes for BrowseNodeLookup and use of BrowseNodeId in ItemSearch.
Im new to Node.js and Express was trying to pull them down via npm using the "npm update --save" command in Expressjs app. I am assuming they are not yet available.
Thanks again for your help.
from amazon-product-api.
The PR #19 is not merge in master branch of the projet yet. When it will be merged you will be able to npm update --save
. But for the moment you can use the version in the branch of @kauegimenes but you will need to uninstall the other one. So npm uninstall amazon-product-api
and then npm install kauegimenes/amazon-product-api
from amazon-product-api.
@Codepoet77 did you set the awsTag to an empty string or you removed it from the request params?
from amazon-product-api.
@Codepoet77 @kauegimenes PR #19 is merged and published.
from amazon-product-api.
Thanks for the npm tips as I am new to github and the npm world. :)
I tried removing the awsTag from the request params. Please try it yourself though because I tested it out quickly. I initially set it to an empty string before realizing that I needed to also remove it from the URL that is being built up. So I did both but would be good to have you confirm it as well. I still find it odd that the docs explicitly state it as being required for the cartCreate but not for the itemLookup, itemSearch and browseNodeLookup.
Thanks again!
from amazon-product-api.
@Codepoet77 I would have opened another issue for this, because it is not related to this issue, but I tried it and it didn't work.
First it change generateQueryString to add the AssociateTag only when it's defined.
if (typeof credentials.awsTag != "undefined") {
params['AssociateTag'] = credentials.awsTag;
}
Without AssociateTag
var client = amazon.createClient({
awsId: process.env.AWS_ID,
awsSecret: process.env.AWS_SECRET
});
client.itemSearch({
keywords: 'Pulp fiction',
searchIndex: 'DVD',
responseGroup: 'ItemAttributes,Offers,Images',
itemPage: '3'
}, function(err, results) {
if (err) {
console.log("ERROR");
console.log(err);
} else {
console.log("SUCCESS");
console.log(results);
}
});
// result in the console
// => Success
// undefined
With blank AssociateTag
var client = amazon.createClient({
awsTag: '',
awsId: process.env.AWS_ID,
awsSecret: process.env.AWS_SECRET
});
client.itemSearch({
keywords: 'Pulp fiction',
searchIndex: 'DVD',
responseGroup: 'ItemAttributes,Offers,Images',
itemPage: '3'
}, function(err, results) {
if (err) {
console.log("=> Error");
console.log(err);
} else {
console.log("=> Success");
console.log(results);
}
});
// result in the console
// => Success
// undefined
I will close this issue. If there is anything else open a new issue. 😎
from amazon-product-api.
Related Issues (20)
- When I import this package in a Create React App project, I get a warning for pre-built javascript file.
- Is there a way to perform similarity lookup?
- You are submitting requests too quickly. Please retry your requests at a slower rate HOT 8
- No 'Access-Control-Allow-Origin' header is present on the requested resource. HOT 8
- Amazon API returns 'Request has expired'
- How to get a product page from itemlookup HOT 3
- How to get the response in TEXT JSON? HOT 1
- How to set the product images height/width programmatically?
- How to check if product shipped to specific country ?
- Search result does not contain TotalResults and TotalPages. HOT 1
- Can I pass 'Domain" parameter in CreateClient? HOT 1
- RequestThrottled: New Efficiency-Guidelines HOT 3
- Amazon Product Advertising API 5 HOT 6
- Cannot call using API key generated for Amazon.ca. HOT 1
- I have some issue in a React /Gatsby app HOT 2
- Is this possible to use on the client side? HOT 3
- [Bug] When usign * in the power prop for ItemSearch sig is invalid
- can't find the doc
- Add query for proxy server HOT 1
- CloudKit Integration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-product-api.