Google contacts api google contacts REST API中的查询字段
我正在尝试构建一个bash脚本,使用googlecontactsapi以编程方式管理我的googlecontacts。从api参考中,我可以看到RESTAPI以xml或json格式列出完整/单个联系人条目。但我看不到任何单独获取姓名、手机号码的过滤选项Google contacts api google contacts REST API中的查询字段,google-contacts-api,jsonparser,Google Contacts Api,Jsonparser,我正在尝试构建一个bash脚本,使用googlecontactsapi以编程方式管理我的googlecontacts。从api参考中,我可以看到RESTAPI以xml或json格式列出完整/单个联系人条目。但我看不到任何单独获取姓名、手机号码的过滤选项 https://www.google.com/m8/feeds/contacts/{userEmail}/full?alt=json 答复: { "version": "1.0", "encoding": "UTF-8",
https://www.google.com/m8/feeds/contacts/{userEmail}/full?alt=json
答复:
{
"version": "1.0",
"encoding": "UTF-8",
"entry": {
"id": {
"$t": "http://www.google.com/m8/feeds/contacts/xxxxxxxx%40gmail.com/base/xxxxxxxxxxxxxxxx"
},
"updated": {
"$t": "2019-03-16T02:56:27.686Z"
},
"category": [
{
"scheme": "http://schemas.google.com/g/2005#kind",
"term": "http://schemas.google.com/contact/2008#contact"
}
],
"title": {
"$t": "NEW_CONTACT_NAME",
"type": "text"
},
"link": [
{
}
],
"content": {
"$t": "Tets Entry!",
"type": "text"
},
"gd$organization": [
{
"rel": "http://schemas.google.com/g/2005#other",
"gd$orgName": {
"$t": "javis"
}
}
],
"gd$email": [
{
"address": "xxxxxxxxxx@gmail.com",
"rel": "http://schemas.google.com/g/2005#other"
}
],
"gd$phoneNumber": [
{
"label": "Prime",
"uri": "tel:+xx-xxxxx-xxxxx",
"$t": "+xx xxxxx xxxxx"
}
],
"gContact$groupMembershipInfo": [
{
"deleted": "false",
"href": "http://www.google.com/m8/feeds/groups/xxxxxxxx%40gmail.com/base/xxxxxxxxxxxxxxxx"
}
],
"xmlns": "http://www.w3.org/2005/Atom",
"xmlns$batch": "http://schemas.google.com/gdata/batch",
"xmlns$gContact": "http://schemas.google.com/contact/2008",
"xmlns$gd": "http://schemas.google.com/g/2005"
}
}
您能否帮助我找到解决方案,从json响应中过滤特定字段,如联系人id、姓名、号码或邮件。如果您获得了完整的对象,只需取出所需的数据即可。您是否有节省几百字节带宽的技术要求?是的,我尝试过过滤,但它不起作用,并且获取无效的_参数错误,即
错误扩展“fields”参数。找不到路径“版本”的匹配字段。
用于以下查询<代码>https://www.google.com/m8/feeds/contacts/default/full/531c64be8e85acbd?fields=version&alt=json