Gmail Contact api

▼魔方 西西 提交于 2019-11-27 14:08:04

问题


For my application I need to import the Gmail Address book, which I am able to do by following "Gmail Contact API".

Recently Gmail added some of the new fields(i.e. Birthday,Website etc) which are not the part of xml. The gmail api docs mention that the new added field is part of XML namespace http://schemas.google.com/contact/2008, but I am unable to figure it out that how to fetch new fields using this name space which I am able to extract.

http://code.google.com/apis/contacts/docs/3.0/reference.html#gContactNamespace


回答1:


I'm not certain what the problem you are having is. You linked to the page that contains all the information on the new API structure. Everything is the same as before. If you want to fetch these new fields, all you have to do is add the new fields to your calls. Below are all the names of the new fields: alt text http://www.m1cr0sux0r.com/newFields.png




回答2:


You need to upgrade to the latest version of the client library: Migrate to Google API 3.0

Currently only the Protocol and Java client library have been updated to use the new v3.0 api.

If you're using the Java client, you can use getWhen() on the Birthday: JavaDoc Birthday




回答3:


When working on the Perl module WWW::Contact::GoogleContactsAPI, I wrote:

my $url = "http://www.google.com/m8/feeds/contacts/default/full"
    . "?max-results=9999&alt=json";
$url .= "&v=3.0"; # Gives more fields

That last line appends "&v=3.0" to the URL, which tells Google to return the extra fields.




回答4:


You can use this component : http://www.johnvey.com/features/gmailapi/



来源:https://stackoverflow.com/questions/1158784/gmail-contact-api

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