Skip to content

Commit 969fd58

Browse files
SeanSean
Sean
authored and
Sean
committed
Pull down larger images.
1 parent 6089562 commit 969fd58

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/amazon_product_api/lookup_response.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def item_attrs
2727

2828
price_cents: hash.dig('ItemAttributes', 'ListPrice', 'Amount').to_i,
2929

30-
image_url: hash.dig('SmallImage', 'URL') || '',
31-
image_width: hash.dig('SmallImage', 'Width') || '',
32-
image_height: hash.dig('SmallImage', 'Height') || '',
30+
image_url: hash.dig('LargeImage', 'URL') || '',
31+
image_width: hash.dig('LargeImage', 'Width') || '',
32+
image_height: hash.dig('LargeImage', 'Height') || '',
3333

3434
title: hash.dig('ItemAttributes', 'Title'),
3535
detail_page_url: hash['DetailPageURL']

lib/amazon_product_api/search_response.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def item_attrs_from(hash)
4646
price_cents: hash.dig('ItemAttributes', 'ListPrice', 'Amount').to_i,
4747
price: hash.dig('OfferSummary', 'LowestNewPrice', 'FormattedPrice') || '$0.00',
4848

49-
image_url: hash.dig('SmallImage', 'URL') || '',
50-
image_width: hash.dig('SmallImage', 'Width') || '',
51-
image_height: hash.dig('SmallImage', 'Height') || '',
49+
image_url: hash.dig('LargeImage', 'URL') || '',
50+
image_width: hash.dig('LargeImage', 'Width') || '',
51+
image_height: hash.dig('LargeImage', 'Height') || '',
5252

5353
title: hash.dig('ItemAttributes', 'Title'),
5454
detail_page_url: hash['DetailPageURL']

0 commit comments

Comments
 (0)