phoet / asin

:books: :package: Amazon Simple INterface - Support for ItemLookup, SimilarityLookup, Search, BrowseNode and Cart Operations
http://asin.herokuapp.com/
167 stars 59 forks source link

ItemAttributes Missing? #4

Closed kale closed 13 years ago

kale commented 13 years ago

This code: https://gist.github.com/880611

Produces the below output. It seems like I'm not getting back the expected ItemAttributes.


D, [2011-03-21T21:55:33.830684 #11869] DEBUG -- : calling with params={:Operation=>:ItemLookup, :ItemId=>"020161622X"}
I, [2011-03-21T21:55:33.830975 #11869]  INFO -- : performing rest call to url='http://webservices.amazon.com/onca/xml?AWSAccessKeyId=...'
D, [2011-03-21T21:55:33.831260 #11869] DEBUG -- : HTTPI executes HTTP GET using the httpclient adapter
D, [2011-03-21T21:55:34.073197 #11869] DEBUG -- : got response='<?xml version="1.0" ?><ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2005-10-05"><OperationRequest><RequestId>3454bf50-6233-4bd8-9c9b-120fd6ddc8e6</RequestId><Arguments><Argument Name="Operation" Value="ItemLookup"></Argument><Argument Name="Service" Value="AWSECommerceService"></Argument><Argument Name="ItemId" Value="020161622X"></Argument><Argument Name="AWSAccessKeyId" Value="KEY"></Argument><Argument Name="Timestamp" Value="2011-03-22T01:55:33Z"></Argument><Argument Name="Signature" Value="SIGNATURE"></Argument></Arguments><RequestProcessingTime>0.0078060000000000</RequestProcessingTime></OperationRequest><Items><Request><IsValid>True</IsValid><ItemLookupRequest><Condition>New</Condition><DeliveryMethod>Ship</DeliveryMethod><IdType>ASIN</IdType><MerchantId>Amazon</MerchantId><OfferPage>1</OfferPage><ItemId>020161622X</ItemId><ResponseGroup>Small</ResponseGroup><ReviewPage>1</ReviewPage></ItemLookupRequest></Request><Item><ASIN>020161622X</ASIN><DetailPageURL>http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X%3FSubscriptionId%3DAKIAIJ7ILTHT3NAFDDPQ%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D020161622X</DetailPageURL><ItemAttributes><Author>Andrew Hunt</Author><Author>David Thomas</Author><Manufacturer>Addison-Wesley Professional</Manufacturer><ProductGroup>Book</ProductGroup><Title>The Pragmatic Programmer: From Journeyman to Master</Title></ItemAttributes></Item></Items></ItemLookupResponse>'

{"Author"=>["Andrew Hunt", "David Thomas"],
 "Manufacturer"=>"Addison-Wesley Professional",
 "ProductGroup"=>"Book",
 "Title"=>"The Pragmatic Programmer: From Journeyman to Master"}
phoet commented 13 years ago

this is correct.

amazon offers a flag to change the scope of parameters returned:

client.lookup '020161622X', :ResponseGroup => :Medium

please have a look into the amazon aws api to see the gory details: http://docs.amazonwebservices.com/AWSEcommerceService/4-0/