Google API v3 retrieving all contacts

谁说我不能喝 提交于 2019-12-03 22:46:37

问题


I'm writing a code (in Java) that let me get all contacts from my google account, using google API v3. My problem is that after I successfully authorize access to account I get contacts only from "Most Contacted" group. As feedURL I'm using https://www.google.com/m8/feeds/contacts/default/full/ according to this tutorial. Basically my code is copy-paste of this example, so how can I get all my contacts?


回答1:


In the documentation https://developers.google.com/google-apps/contacts/v3/#retrieving_all_contacts there is a note saying "The feed may not contain all of the user's contacts, because there's a default limit on the number of results returned" You can use query parameter to manage the information https://developers.google.com/google-apps/contacts/v3/#retrieving_contacts_using_query_parameters. Here you can find the parameters for these requests https://developers.google.com/google-apps/contacts/v3/reference#Parameters. The parameter max-results is probably the one you need.




回答2:


The correct parameter is max-results



来源:https://stackoverflow.com/questions/27269848/google-api-v3-retrieving-all-contacts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!