GASでAmazonAPIを使用しJANからASINを取得したいのです。
現状、ASINから各種情報の取得はできるのですが、
それに、下記の2つのパラメータを追加しましたが動作しません。
IdType = "EAN"
SearchIndex ="ALL"
下記関数でundefinedとなってしまいます。(asinとありますが、第二引数にはJANが入ります。)
何か打開策をご教示ください。
function fetchAmazonData_(client, asins) { "use strict"; var params = { ResponseGroup : "OfferFull, ItemAttributes" , Condition : "New" , MerchantId : "Amazon" }; /*** Amazon API 経由でデータを取得する ***/ var response, contentText; while(true) { response = client.itemLookup(asins, params); contentText = response.getContentText(); // RequestThrottled の場合は再試行する if (contentText.match(/RequestThrottled/)){ Utilities.sleep(1000); continue; } break; }
あなたの回答
tips
プレビュー