Google Contact API v3:如果在联系人组中进行搜索,则会忽略q参数 [英] Google Contact API v3 : q parameter is ignored if search in a contact group

查看:123
本文介绍了Google Contact API v3:如果在联系人组中进行搜索,则会忽略q参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Contact API v3. 目的是同步我的数据库和Google帐户之间的联系. 我的问题是:

I am working with Google Contact API v3. The goal is to synchronize contacts between my DB and a Google Account. My problem is :

1)当我通过不带联系人组的电子邮件地址搜索联系人时,我会得到一个不错的结果

1) when I search contact by email address without a contact group, I get one good result

这是查询:

https://www.google.com/m8/feeds/contacts/default/full?q=myemail%40hotmail.fr&max-results=1&v=3.0&access_token=XXXXXXXXX

2)当我在联系人组中进行相同的搜索时,我会获得所有联系人列表

2) when I do the same search within a contact group, I get all contacts list

这是查询:

https://www.google.com/m8/feeds/contacts/default/full?q=myemail%40hotmail.fr&group=http://www.google.com/m8/feeds/groups/factorycrm%40gmail.com/base/64e5e3218c7572e4&max-results=1&v=3.0&access_token=XXXXXXXXXXX

这是一个实际的问题,因为第二次查询将Google帐户中的所有联系人弄乱了.

This is a real problem because second query messes all contacts in Google account.

我的问题是:如何通过Google联系人组中的电子邮件地址搜索联系人?

My question is : how to search a contact by its email address within a google contact group ?

感谢

推荐答案

我也正为此绞尽脑汁.似乎在提供group时Google放弃了q参数.为了解决这个问题,我开始保留Google联系人ID并直接查询而不是通过网上论坛查询. 因此,基本上,您将不得不直接获取联系人,然后检查其组.
https://www.google.com/m8/feeds/contacts/default/full/{contact-id}

I was also cracking my brains with this one. Seems that Google drops the q parameter when the group one is provided. To resolve this, I've started keeping the Google contact ID and queried it directly instead of via the Group. So basically you're stuck with fetching the contact directly, and then checking its group.
https://www.google.com/m8/feeds/contacts/default/full/{contact-id}

这篇关于Google Contact API v3:如果在联系人组中进行搜索,则会忽略q参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆