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


I was just a monkey who paid for the gem source and created a new method called item_lookup_isbn that was identical to item_lookup except for the asin part.



+1


source


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







All Articles