Skip to content

Instantly share code, notes, and snippets.

@gen1321
Created June 5, 2016 06:15
Show Gist options
  • Save gen1321/8b42537925fcfafa6555fdafd8cb352c to your computer and use it in GitHub Desktop.
Save gen1321/8b42537925fcfafa6555fdafd8cb352c to your computer and use it in GitHub Desktop.
pry(main)> >> AmzLookUp.item_lookup(query:{'ItemId' => 'B000CST01A' , 'ResponseGroup' => 'OfferFull'}).to_h["ItemLookupResponse"]["Items"]["Item"]
eGroup' => 'OfferFull'}).to_h["ItemLookupResponse"]["Items"]["Item"]
=> {"ASIN"=>"B000CST01A",
"OfferSummary"=>
{"LowestNewPrice"=>{"FormattedPrice"=>"Too low to display"},
"LowestUsedPrice"=>
{"Amount"=>"1515", "CurrencyCode"=>"USD", "FormattedPrice"=>"$15.15"},
"TotalNew"=>"24",
"TotalUsed"=>"1",
"TotalCollectible"=>"0",
"TotalRefurbished"=>"0"},
"Offers"=>
{"TotalOffers"=>"1",
"TotalOfferPages"=>"1",
"MoreOffersUrl"=>
"http://www.amazon.com/gp/offer-listing/B000CST01A%3FSubscriptionId%3DAKIAI42PXZ2Q3M2SUVBQ%26tag%3Dmborisbeginin-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3DB000CST01A",
"Offer"=>
{"Merchant"=>{"Name"=>"AAA Security Depot"},
"OfferAttributes"=>{"Condition"=>"New"},
"OfferListing"=>
{"OfferListingId"=>
"to2ljGxlMlfURlZFCYaLkJfz4iV4gImnM98rrNCRwa4N1Ft7EyRVjzpOVMobTavJzQM1XFo%2F4UY4qHP1pGiTxXzdr56G5q3G0erVcWUQvOCeopqoDF%2FWIW120ApTek%2BwM9qbjw%2FmldLzCOAa0M05cA%3D%3D",
"Price"=>
{"Amount"=>"2200", "CurrencyCode"=>"USD", "FormattedPrice"=>"$22.00"},
"Availability"=>"Usually ships in 1-2 business days",
"AvailabilityAttributes"=>
{"AvailabilityType"=>"now",
"MinimumHours"=>"24",
"MaximumHours"=>"48"},
"IsEligibleForSuperSaverShipping"=>"0",
"IsEligibleForPrime"=>"0"}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment