当我第一次使用Amazon产品广告API检索产品价格信息时,我得到的响应如下,
["Item"]=>
object(stdClass)#15 (3) {
["ASIN"]=>
string(10) "B0017TZY5Y"
["OfferSummary"]=>
object(stdClass)#16 (6) {
["LowestUsedPrice"]=>
object(stdClass)#17 (3) {
["Amount"]=>
int(820)
["CurrencyCode"]=>
string(3) "EUR"
["FormattedPrice"]=>
string(8) "EUR 8,20"
}
["LowestCollectiblePrice"]=>
object(stdClass)#18 (3) {
["Amount"]=>
int(3490)
["CurrencyCode"]=>
string(3) "EUR"
["FormattedPrice"]=>
string(9) "EUR 34,90"
}
["TotalNew"]=>
string(1) "0"
["TotalUsed"]=>
string(1) "6"
["TotalCollectible"]=>
string(1) "1"
["TotalRefurbished"]=>
string(1) "0"
}
["Offers"]=>
object(stdClass)#19 (3) {
["TotalOffers"]=>
int(0)
["TotalOfferPages"]=>
int(0)
["MoreOffersUrl"]=>
string(1) "0"
}
}我想知道,如何使用php从响应中检索LowestUsedPrice和LowestCollectiblePrice值。
发布于 2014-12-29 12:46:39
$YourObject->Item->OfferSummary->LowestCollectiblePrice // for LowestCollectiblePrice value
$YourObject->Item->OfferSummary->LowestUsedPrice // for LowestUsedPrice value https://stackoverflow.com/questions/27688731
复制相似问题