私はすべての製品の価格を12.50から11.50の間にしようとしています。AmazonProductAPIへのリクエストにNode-APACを使用しています。リクエストのコードは次のとおりです。
exports.search = function(req, res){
OperationHelper = require('apac').OperationHelper;
var opHelper = new OperationHelper({
awsId: process.env.AMZ_ACCESS_KEY_CODE,
awsSecret: process.env.AMZ_SECRET_ACCESS_KEY,
assocId: process.env.AMZ_ASSOCIATE_ID
});
opHelper.execute('ItemSearch', {
'SearchIndex': 'All',
'Keywords': ' ',
'MaximumPrice': 12.50,
'MinimumPrice': 11.50,
'ResponseGroup': 'Medium'
}, function(error, results) {
res.send(results);
});
};
応答は、結果をMediumResponseGroupに制限しません。あなたはここで完全な応答のいくつかを見ることができます(それは巨大です)。構造は次のとおりです。
{
ItemSearchResponse: {
$: {...},
OperationRequest: [...],
Items: [
{
Request: [...],
TotalResults: [...],
TotalPages: [...],
MoreSearchResultsUrl: [...],
Item: [
{
ASIN: [...],
DetailPageURL: [...],
ItemLinks: [...],
SmallImage: [...],
MediumImage: [...],
LargeImage: [...],
ImageSets: [...],
ItemAttributes: [...],
OfferSummary: [...]
},
{...},
{...},
{...},
{...}
]
}
]
}
}
ドキュメントに記載されている内容をMediumResponseGroupに含める必要があるということは返されません。それは不必要な他のものの束を返しています。どんな助けでも大歓迎です!
注:価格帯に合わない商品も返品されます。これらの問題は関連している可能性があります。そこにあるヒントは役に立ちます。