1
我一直在四處尋找試圖找到eBay Shopping API的.NET版本。 有沒有?用於.NET的eBay購物API?
我一直在四處尋找試圖找到eBay Shopping API的.NET版本。 有沒有?用於.NET的eBay購物API?
您所提供的鏈接狀態:
支持的功能
格式:XML,SOAP,名稱值,JSON
協議:HTTP GET(REST)和POST」
這是一個web服務,你不需要特定的「.Net API」,只需撥打網頁並處理返回值即可。
示例使用上this page
var xml = http://open.api.ebay.com/shopping?callname=FindProducts&responseencoding=XML&appid=YourAppId&siteid=0&QueryKeywords=harry%20potter&AvailableItemsOnly=true&MaxEntries=2&version=787
//parse the xml...
信息,當然,你將需要使用有效的數據。如果您嘗試使用此作爲的是你會得到一個錯誤的XML響應:
<FindProductsResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2012-09-09T07:03:43.405Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Application ID invalid.</ShortMessage>
<LongMessage>Application ID invalid.</LongMessage>
<ErrorCode>1.20</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Build>E789_CORE_BUNDLED_15285085_R1</Build>
<Version>789</Version>
</FindProductsResponse>
然而這整個的一點是,你通過查詢字符串發送eBay的一些數據和他們返回你的XML。
這是上面例子中使用的url。