views:

182

answers:

2

That's my whole question!

Doing something like this:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images')

Not sure where to change the option for the IdType to ISBN. I've tried putting it several places.

Thanks!

+1  A: 

Looking at the ECS docs, it seems you need to specify an IdType parameter of 'ISBN'. I've never used this particular gem, but I'm guessing the request would look something like this:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN')

According to the docs "All IdTypes except ASINx require a SearchIndex to be specified" so you'll most likely need to do this:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN', :search_index => 'Books')
avaynshtok
Thanks for the reply. I tried that + as many versions of the symbol :id_type I could think of. Instead, I just monkey-patched it :D
rpflo
A: 

I just monkey patched the gem's source and created a new method called item_lookup_isbn that was identical to the item_lookup except the asin part.

rpflo