【问题标题】:Google People API notes fieldGoogle People API 备注字段
【发布时间】:2021-06-17 23:15:08
【问题描述】:

我想知道如何从 Google people API 获取“notes”字段。 documentation 中没有等价物。我尝试了“传记”,但当我调用 API 获取姓名、电子邮件等时,它没有返回任何注释。

几年前我看到过这个question,但我知道 API 已经发生了一些变化,希望有人知道答案。

谢谢!

【问题讨论】:

    标签: google-api google-people-api


    【解决方案1】:

    回答

    biographies 字段仍然代表notes

    如何查看?

    1. 创建一个使用具体字符串设置注释的联系人,即Hey, I'am a note

    2. 致电people.connections.list

      • 资源名称 = people/me
      • personFields = names
    3. 获取resourceName 以便以后使用

    4. 致电people.get

      • 资源名称 = resource from point 3
      • personFields = biographies
    5. 检查biographies 字段,它看起来像:

      "biographies": [
        {
          "metadata": {
            "primary": true,
            "source": {
              "type": "CONTACT",
              "id": "randomId"
            }
          },
          "value": "Hey, I'am a note",
          "contentType": "TEXT_PLAIN"
        }
    

    参考文献

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-06-09
      • 2018-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-02
      • 2019-04-20
      相关资源
      最近更新 更多