【问题标题】:eBay GetMyeBaySelling API call not returning specified fields onlyeBay GetMyeBaySelling API 调用仅返回指定字段
【发布时间】:2015-07-30 12:05:34
【问题描述】:

我使用带有沙盒的 eBay SDK 921 API。

我想获取我所有的项目 ID(我有很多项目,我想提高性能),我使用以下代码:

GetMyeBaySellingCall apicall = new GetMyeBaySellingCall(this.Context);
apicall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll);
apicall.ApiRequest.OutputSelector = new StringCollection(new string[] { "ItemID" });
apicall.GetMyeBaySelling();
var sellerlist = apicall.ActiveListReturn.ItemArray.ToArray();

但是GetMyeBaySelling方法返回了Items的所有字段

你能帮我弄到ItemIDs

【问题讨论】:

    标签: .net performance ebay-api ebay-net-sdk


    【解决方案1】:

    documentation for the OutputSelector 字段状态(已添加重点)

    您不必指定字段的完整路径除非您指定的字段可以在多个容器中返回

    由于GetMyeBaySelling 返回多个项目,因此字段ItemID 将在多个容器中返回。因此,您必须指定完整路径。

    apicall.ApiRequest.OutputSelector = new StringCollection(new string[] { "ActiveList.ItemArray.Item.ItemID" });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-12
      • 1970-01-01
      相关资源
      最近更新 更多