【问题标题】:how to change dotNetOpenAuth GoogleAddressBook sample to retrieve more than 25 contacts?如何更改 dotNetOpenAuth GoogleAddressBook 示例以检索超过 25 个联系人?
【发布时间】:2011-02-28 00:44:51
【问题描述】:

您建议我如何继续更改 GoogleAddressBook 示例以检索 > 25 个联系人?

Google 建议在 http://code.google.com/apis/contacts/docs/2.0/developers_guide_dotnet.html#retrieving_without_query 上使用 AutoPaging=true

如果这仍然有效,我该如何在提供的 DotNetOpenAuth 示例中传递此参数?

【问题讨论】:

    标签: .net gdata-api dotnetopenauth google-contacts-api


    【解决方案1】:

    AutoPaging 属性就是这样:一个属性。它不是查询参数,除非您使用 Google .NET 库(据我所知不使用 OAuth),否则此属性不可用。

    latest version of the protocol documentation for Google Contacts 声明:

    注意:Feed 可能不包含用户的所有联系人,因为返回的结果数量存在默认限制。有关详细信息,请参阅Retrieving contacts using query parameters 中的 max-results 查询参数。

    Another documentation page 解释说还有一个start-index 参数,因此如果您愿意,您仍然可以一次检索联系人块。

    所以看起来您需要做的就是在您发出的请求中添加?max-results=500 或其他一些大数字。我已经 updated the DotNetOpenAuth sample 让这一切变得简单。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-24
      • 2011-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多