拍卖结束时间晚于10天

我的api / xml工作正常,返回拍卖从现在到10天结束,但不适用于10天后结束的商品:

http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByCategory&SERVICE-VERSION=1.11.0&SECURITY-APPNAME=AlexGo:::::::hiddin::::821eee8&RESPONSE-DATA-FORMAT = XML&的categoryId = 307&paginationInput.entriesPerPage = 100&paginationInput.pageNumber = 1&outputSelector = CategoryHistogram&中将sortOrder =结束时间&itemFilter(0)。名称= MinPrice&itemFilter(0)。价值= 0.01&itemFilter(1)。名称= MaxPrice&itemFilter(1)。价值= 1000&itemFilter(2)。名称= ListingType&itemFilter(2)。价值= AuctionWithBIN&itemFilter(3)。名称= locatedIn属性&itemFilter(3)。价值= US&itemFilter(4)。名称= EndTimeFrom&itemFilter(4)。价值= 2011-08-24T10:23:00.000Z&itemFilter(5)。命名= EndTimeTo&itemFilter(5)。价值= 2011-08-31T10:23:00.000Z

这是我下载结果的方式:

public string DownLoad(string url) { // used to build entire input StringBuilder sb = new StringBuilder(); // used on each read operation byte[] buf = new byte[32768]; try { // prepare the web page we will be asking for HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url); // execute the request HttpWebResponse response = (HttpWebResponse) request.GetResponse(); // we will read data via the response stream Stream resStream = response.GetResponseStream(); string tempString = null; int count = 0; do { // fill the buffer with data count = resStream.Read(buf, 0, buf.Length); // make sure we read some data if (count != 0) { // translate from bytes to ASCII text tempString = Encoding.ASCII.GetString(buf, 0, count); // continue building the string sb.Append(tempString); } } while (count > 0); // any more data to read? } catch (Exception) { timer1.Enabled = false; progressBar1.Visible = false; msg.ForeColor = Color.Red; msg.Text = "Please try after some time !!!"; msg.Visible = true; } // print out page source // MessageBox.Show(sb.ToString()); return sb.ToString(); } 

我不确定你的问题是什么,我尝试使用时间差小于10天且超过10天的相同API。

不到10天

 http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByCategory &SERVICE-VERSION=1.11.0 &SECURITY-APPNAME=ENTER-APP-ID-HERE &RESPONSE-DATA-FORMAT=XML &categoryId=307 &paginationInput.entriesPerPage=100 &paginationInput.pageNumber=1 &outputSelector=CategoryHistogram&sortOrder=EndTime&itemFilter%280%29.name=MinPrice&itemFilter%280%29.value=0.01&itemFilter%281%29.name=MaxPrice&itemFilter%281%29.value=10000 &itemFilter%282%29.name=ListingType&itemFilter%282%29.value=AuctionWithBIN&itemFilter%283%29.name=LocatedIn&itemFilter%283%29.value=US &itemFilter%284%29.name=EndTimeFrom&itemFilter%284%29.value=2011-08-06T07:52:48.000Z &itemFilter%285%29.name=EndTimeTo&itemFilter%285%29.value=2011-08-10T07:52:48.000Z 

超过10天

 http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByCategory &SERVICE-VERSION=1.11.0 &SECURITY-APPNAME=ENTER-APP-ID-HERE &RESPONSE-DATA-FORMAT=XML &categoryId=307 &paginationInput.entriesPerPage=100 &paginationInput.pageNumber=1 &outputSelector=CategoryHistogram&sortOrder=EndTime&itemFilter%280%29.name=MinPrice&itemFilter%280%29.value=0.01&itemFilter%281%29.name=MaxPrice&itemFilter%281%29.value=10000 &itemFilter%282%29.name=ListingType&itemFilter%282%29.value=AuctionWithBIN&itemFilter%283%29.name=LocatedIn&itemFilter%283%29.value=US &itemFilter%284%29.name=EndTimeFrom&itemFilter%284%29.value=2011-08-06T07:52:48.000Z &itemFilter%285%29.name=EndTimeTo&itemFilter%285%29.value=2011-08-30T07:52:48.000Z 

尝试一下,它应该工作。

PS:对我来说。 你的两个陈述都不起作用,我明白了:

 Failure12MarketplaceErrorRequestInvalid date/time value.SearchEND_TIME_FROM12MarketplaceErrorRequestInvalid date/time value.SearchEND_TIME_TO1.11.02011-08-06T00:28:25.501Z 

更新:

易趣不允许任何拍卖持续超过10天。 所以,如果你试图从8/24到8/30找到拍卖,当前日期我们:8/08,你将找不到任何东西。 因为如果今天列出拍卖,最多,卖家可以把它出售到08/18。

AuctionWithBIN替换为StoreInventory以从列表超过10天的商店获取结果。

根据EndTimeTo的eBay DevZone Finding API调用参考ItemFilterType文档,EndTimeTo没有声明/发布限制:

EndTimeTo将结果限制为在指定时间或之前结束的项目。

指定将来的时间。

允许值(dateTime):

以GMT指定时间。

您可以发布创建此URL的C#代码吗?


您的第一个URL参数是:第11年,第8个月,第10天

 EndTimeTo&itemFilter(5).value=11-08-10T07:52:48.000Z 

您的第二个URL参数是:第11年,第20 ,第10天

 EndTimeTo&itemFilter(5).value=11-20-10T07:52:48.000Z