2015-07-10 79 views
0

https://developers.google.com/google-apps/contacts/v3/reference一起工作时,我还没有想出一种方法,只有Google才会返回gd $ email & gd $ name,而不是以下默认返回的值。从Google联系人API获取选择属性

[“id”,“gd $ etag”,“updated”,“app $ edited”,“category”,“title”,“link”,“gd $ email”,“gd $ name”]

对于我们的业务用例,我们只需要这两个属性,在响应中具有所有上述内容就可以增加Pay Load的响应,从而增加响应时间。

任何线索?

回答

0

您可以更改通过联系​​人API获得的回复。我尝试检索所有联系人,但只在回复中包含电子邮件和电话号码。

这里是请求https://www.google.com/m8/feeds/contacts/[email protected]/full栏=进入/ GD:电子邮件,进入/ GD:phoneNumber的(我试过在OAuth园地)

响应:

<entry> 
<gd:email rel="http://schemas.google.com/g/2005#other" address="[email protected]" primary="true"/> 
</entry> 
<entry> 
    <gd:phoneNumber rel="http://schemas.google.com/g/2005#mobile" uri="tel:+91-0000-000-000"> </gd:phoneNumber> 
</entry> 
<entry> 
<gd:email rel="http://schemas.google.com/g/2005#other" address="[email protected]" primary="true"/> 
</entry> 
<entry> 
    <gd:phoneNumber rel="http://schemas.google.com/g/2005#mobile">(000) 000-0001</gd:phoneNumber> 
</entry> 

让我知道,如果你的问题是没有解决。

+0

感谢您的回答。 它使用XML作为输出格式,但奇怪的是它不工作(谷歌提供400错误请求)与JSON作为输出格式。 这里的任何线索? – user3906386