结束时间超过10天的返还拍卖

本文关键字:拍卖 10天 时间 结束 | 更新日期: 2023-09-27 18:04:18

我的api/xml工作正常,从现在到10天结束返回拍卖,但不适合10天后结束的列表:

http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByCategory&服务版本= 1.11.0& SECURITY-APPNAME = AlexGo::::::: hiddin:::: 821 eee8& RESPONSE-DATA-FORMAT = XML& categoryId = 307, paginationInput.entriesPerPage = 100, paginationInput.pageNumber = 1, outputSelector = CategoryHistogram&排序方式= EndTime& itemFilter (0) . name = MinPrice& itemFilter (0) value = .01& itemFilter (1) . name = MaxPrice& itemFilter (1) value = 1000, itemFilter (2) . name = ListingType& itemFilter (2) value = AuctionWithBIN& itemFilter (3) . name = LocatedIn& itemFilter (3) value = US& itemFilter (4) . name = EndTimeFrom& itemFilter (4) value = 2011 - 08 - 24 - t10:23:00.000z& itemFilter (5) . name = EndTimeTo& itemFilter (5) value = 2011 - 08 - 31 - t10: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天的返还拍卖

我不太确定你的问题是什么,我尝试了相同的API,时差小于10天和大于10天。

小于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

试一下,应该可以。

对我来说。你的两个语句都不工作,我得到这个:

<findItemsByCategoryResponse><ack>Failure</ack><errorMessage><error><errorId>12</errorId><domain>Marketplace</domain><severity>Error</severity><category>Request</category><message>Invalid date/time value.</message><subdomain>Search</subdomain><parameter>END_TIME_FROM</parameter></error><error><errorId>12</errorId><domain>Marketplace</domain><severity>Error</severity><category>Request</category><message>Invalid date/time value.</message><subdomain>Search</subdomain><parameter>END_TIME_TO</parameter></error></errorMessage><version>1.11.0</version><timestamp>2011-08-06T00:28:25.501Z</timestamp></findItemsByCategoryResponse>

更新:

eBay不允许任何拍卖持续超过10天。因此,如果您试图查找从:8月24日到8月30日的拍卖,当前日期为:8月08日,您将找不到任何内容。因为如果今天拍卖,卖家最多可以在8月18日之前把它拿出来出售。

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

根据eBay DevZone查找API调用参考ItemFilterType EndTimeTo文档,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