How to change IdType in item_lookup from ASIN to ISBN?
I use Ruby library for Amazon Product Advertising (amazon-ecs) - how can I change IdType
in the item_lookup
by ASIN to ISBN?
Doing something like this:
Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images')
Not sure where to change the parameter for IdType for ISBN. I tried to post multiple locations.
Thank!
+2
source to share
2 answers
Looking at the Amazon Advertising API Document (formerly ECS) , it seems you need to specify the IdType parameter for "ISBN". I've never used this particular gem, but my guess is that the request would look something like this:
Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN')
According to the docs "All identifiers except ASINx require a SearchIndex", so you will most likely need to do this:
Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN', :search_index => 'Books')
+3
source to share