开发者

how to change dotNetOpenAuth GoogleAddressBook sample to retrieve more than 25 contacts?

开发者 https://www.devze.com 2023-01-02 03:27 出处:网络
How do you suggest I proceed in changing the GoogleAddressBook sample to retrieve > 25 contacts? Google suggests using AutoPaging=true on http://code.google.com/apis/contacts/docs/2.0/developers_guid

How do you suggest I proceed in changing the GoogleAddressBook sample to retrieve > 25 contacts?

Google suggests using AutoPaging=true on http://code.google.com/apis/contacts/docs/2.0/developers_guide_dotnet.html#retrieving_without_query

If this is still valid, how can I go about passing this parameter in the DotNetOpenAuth sample prov开发者_StackOverflowided?


The AutoPaging property is just that: a property. It isn't a query parameter, and this property isn't available unless you're using the Google .NET library (which to my knowledge doesn't use OAuth).

The latest version of the protocol documentation for Google Contacts states:

Note: The feed may not contain all of the user's contacts, because there's a default limit on the number of results returned. For more information, see the max-results query parameter in Retrieving contacts using query parameters.

Another documentation page explains that there is also a start-index parameter, so you can still retrieve blocks of contacts at a time if you so choose.

So it looks like all you need to do is add ?max-results=500 or some other high number to the request you send out. I've updated the DotNetOpenAuth sample to make this easy.

0

精彩评论

暂无评论...
验证码 换一张
取 消