简体   繁体   English

为什么我没有从 eBay 获得产品价格的响应?

[英]Why don't I get product price in responce from eBay?

I get ebay product information this way:我通过以下方式获取 ebay 产品信息:

http://open.api.ebay.com/shopping?
   callname=FindProducts&
   responseencoding=XML&
   appid=YourAppIDHere&
   siteid=0&
   version=525&
   QueryKeywords=harry%20potter&
   AvailableItemsOnly=true&
   MaxEntries=2

But I don't get product price in responce.但我没有得到相应的产品价格。 Should I shange the request parameters?我应该修改请求参数吗? Or may be I should use another method of ebay Web services to get this information?或者我应该使用 ebay 网络服务的另一种方法来获取这些信息?

The response is回应是

<FindProductsResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2012-11-30T06:54:54.713Z</Timestamp>
<Ack>Success</Ack>
<Build>E799_CORE_BUNDLED_15523174_R1</Build>
<Version>799</Version>
<ApproximatePages>700</ApproximatePages>
<MoreResults>true</MoreResults>
<PageNumber>1</PageNumber>
<Product>
<DomainName>DVDs</DomainName>
<DetailsURL>
http://syicatalogs.ebay.com/ws/eBayISAPI.dll?PageSyiProductDetails&IncludeAttributes=1&ShowAttributesTable=1&ProductMementoString=119128:2:1049:4276619924:441341764:7a3b4632d7a0c4ee860c374349c61b36:1:1:1:5000000672733
</DetailsURL>
<DisplayStockPhotos>true</DisplayStockPhotos>
<ProductID type="Reference">110258144</ProductID>
<ProductID type="UPC">883929182879</ProductID>
<ItemSpecifics>
<NameValueList>
<Name>Movie Rating</Name>
<Value>PG-13 (MPAA)</Value>
</NameValueList>
<NameValueList>
<Name>Genre</Name>
<Value>Childrens</Value>
</NameValueList>
<NameValueList>
<Name>Format</Name>
<Value>DVD</Value>
</NameValueList>
<NameValueList>
<Name>Work Name</Name>
<Value>Harry Potter: Complete 8-Film Collection</Value>
</NameValueList>
<NameValueList>
<Name>Region Code</Name>
<Value>Region 1</Value>
</NameValueList>
</ItemSpecifics>
<ReviewCount>195</ReviewCount>
<StockPhotoURL>
http://i.ebayimg.com/00/$(KGrHqV,!g0E6ZCwQ)wpBOuWbUNB,g~~_6.JPG?set_id=89040003C1
</StockPhotoURL>
<Title>
Harry Potter: Complete 8-Film Collection (DVD, 2011, 8-Disc Set)
</Title>
</Product>
<Product>
<DomainName>DVDs</DomainName>
<DetailsURL>
http://syicatalogs.ebay.com/ws/eBayISAPI.dll?PageSyiProductDetails&IncludeAttributes=1&ShowAttributesTable=1&ProductMementoString=119128:2:1049:1597262630:429151180:bf834db05cfb5150fe073087ebe92117:1:1:1:1415162318
</DetailsURL>
<DisplayStockPhotos>true</DisplayStockPhotos>
<ProductID type="Reference">99846530</ProductID>
<ProductID type="UPC">883929139446</ProductID>
<ItemSpecifics>
<NameValueList>
<Name>Movie Rating</Name>
<Value>PG-13 (MPAA)</Value>
</NameValueList>
<NameValueList>
<Name>Genre</Name>
<Value>Science-Fiction/Fantasy</Value>
</NameValueList>
<NameValueList>
<Name>Director</Name>
<Value>David Yates</Value>
</NameValueList>
<NameValueList>
<Name>Format</Name>
<Value>DVD</Value>
</NameValueList>
<NameValueList>
<Name>Work Name</Name>
<Value>Harry Potter and the Deathly Hallows: Part I</Value>
</NameValueList>
<NameValueList>
<Name>Region Code</Name>
<Value>Region 1</Value>
</NameValueList>
<NameValueList>
<Name>Producer</Name>
<Value>David Heyman</Value>
</NameValueList>
</ItemSpecifics>
<ReviewCount>163</ReviewCount>
<StockPhotoURL>
http://i.ebayimg.com/00/$(KGrHqF,!l0E2DwP)(v!BNo16imfYQ~~_6.JPG?set_id=89040003C1
</StockPhotoURL>
<Title>
Harry Potter and the Death

Check this Link : Getting Item Descriptions and Item Specifics http://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html#sampledescriptionitemspecifics检查此链接获取项目描述和项目细节http://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html#sampledescriptionitemspecifics

URL format (HTTP GET). URL 格式 (HTTP GET)。 See also the non-wrapped version of this URL.另请参阅此 URL 的非包装版本。 For results in a format other than XML, specify a different value for responseencoding.对于 XML 以外格式的结果,请为 responseencoding 指定不同的值。

http://open.api.ebay.com/shopping?
   callname=GetSingleItem&
   responseencoding=XML&
   appid=YourAppIDHere&
   siteid=0&
   version=515&
   ItemID=180126682091&
   IncludeSelector=Description,ItemSpecifics

You have to pass ItemID to get Detailed Description .您必须通过 ItemID 才能获得详细说明

Going by this info it seems like certain values have a conditional occurrence in the response.通过此信息,似乎某些值在响应中具有条件发生。 So maybe you may need to check if price is firstly returned or not by the response and if not, query another api with say the product id value.因此,也许您可​​能需要检查响应是否首先返回了价格,如果没有,请使用产品 ID 值查询另一个 api。 HTH.哈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM