【问题】
AWS中,想要查询某个产品,一共还剩多少个可以买。
【解决过程】
1.知道是用ItemLookup。
2.参考:
【记录】申请AWS的AWSAccessKeyId(AWS Access Key ID)
找到了API的页面:
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/ProgrammingGuide.html
3.找到了:
AWS Documentation » Amazon Product Advertising API Docs » Developer Guide » Programming Guide » Returning Price and Availability Information » Returning Prices » Offer Summaries Offer SummariesThe OfferSummary response group returns summary information about offers, including:
For example, the following response snippet shows the lowest prices for an item in New and Used condition. <OfferSummary>
<LowestNewPrice>
<Amount>801</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$8.01</FormattedPrice>
</LowestNewPrice>
<LowestUsedPrice>
<Amount>799</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$7.99</FormattedPrice>
</LowestUsedPrice>
<TotalNew>45</TotalNew>
<TotalUsed>20</TotalUsed>
<TotalCollectible>0</TotalCollectible>
<TotalRefurbished>0</TotalRefurbished>
</OfferSummary> |
【总结】
用其中的TotalNew和TotalUsed,相加,即可得出还有多少个。
转载请注明:在路上 » 【已解决】查询AWS中某个产品还剩多少个数可买