File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class PAAPI
77 Market = Struct . new ( :host , :region )
88 MARKETS = {
99 au : Market . new ( 'webservices.amazon.com.au' , 'us-west-2' ) ,
10- br : Market . new ( 'webservices.amazon.com.br' 'us-east-1' ) ,
10+ br : Market . new ( 'webservices.amazon.com.br' , 'us-east-1' ) ,
1111 ca : Market . new ( 'webservices.amazon.ca' , 'us-east-1' ) ,
1212 fr : Market . new ( 'webservices.amazon.fr' , 'eu-west-1' ) ,
1313 de : Market . new ( 'webservices.amazon.de' , 'eu-west-1' ) ,
@@ -39,7 +39,11 @@ def get_items(asin, locale)
3939 "Images.Primary.Large" ,
4040 "ItemInfo.ByLineInfo" ,
4141 "ItemInfo.Title" ,
42- "Offers.Listings.Price"
42+ "OffersV2.Listings.Price" ,
43+ "OffersV2.Listings.MerchantInfo" ,
44+ "OffersV2.Listings.Availability" ,
45+ "OffersV2.Listings.Condition" ,
46+ "OffersV2.Listings.IsBuyBoxWinner"
4347 ]
4448 } . to_json
4549 time_stamp = Time . now . utc . strftime ( "%Y%m%dT%H%M%SZ" )
Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ def amazon_label( item )
7676
7777def amazon_price ( item )
7878 begin
79- item [ "Offers" ] [ "Listings" ] [ 0 ] [ "Price" ] [ "DisplayAmount" ]
79+ # OffersV2 API response structure
80+ item [ "OffersV2" ] [ "Listings" ] [ 0 ] [ "Price" ] [ "Money" ] [ "DisplayAmount" ]
8081 rescue
8182 '(no price)'
8283 end
You can’t perform that action at this time.
0 commit comments