【问题标题】:Google api schema for user fields用户字段的 Google api 架构
【发布时间】:2013-04-23 11:52:17
【问题描述】:

我创建了一个软件,它可以连接到 Google 应用程序电子邮件,并允许我使用他们的信息为指定用户创建签名。在 Google 应用程序域管理中,无法编辑更多“高级”字段,如公司地址、传真、电子邮件、标题、昵称等。所以我使用了 Flash 面板,它为我提供了这种可能性。但为此,我需要将字段 api 模式添加到我的配置中,以便将 Google 字段与我的合并字段连接起来。通过在我的配置文件中添加以下内容,我设法使其适用于某些字段,例如:姓名、公司名称、电子邮件地址、所有类型的电话、职务、部门、经理、传真号码:

<string>name=Name.FullName</string>
<string>company=Organizations[Rel:http://schemas.google.com/g/2005#work].Name</string>
<string>mail=PrimaryEmail.Address</string>
<string>mobile=Phonenumbers[Rel:http://schemas.google.com/g/2005#mobile].Value</string>
<string>title=Organizations[Rel:http://schemas.google.com/g/2005#work].Title</string>
<string>department=Organizations[Rel:http://schemas.google.com/g/2005#work].Department</string>
<string>managerGA=ContactEntry.Relations[Rel:manager].Value</string>
<string>phone number=Phonenumbers[Rel:http://schemas.google.com/g/2005#work_fax].Value</string>
<string>emlHome=Emails[Rel:http://schemas.google.com/g/2005#home].Address</string>
or
<string>homeEml=Emails[Home:true].Address</string>

“=”之前的内容只是用于连接的名称,我需要的是“=”之后的内容..

我搜索了 Google 文档,但没有找到正确的 api 架构格式,例如:国家、城市、街道、昵称、照片、网站、URL、笔记、组织单位、Aka 等其他。同样在 Flash 面板中,可以添加自定义字段,如果我也可以将这些字段与我的签名模板编辑器中的合并字段连接起来,那就太好了。有人可以帮我找到正确的吗?或者我在哪里/如何找到它们?

例如,如果用户有两封家庭电子邮件,我知道如何检索第一封,但第二封的字符串应该如何?

【问题讨论】:

    标签: google-provisioning-api


    【解决方案1】:

    这是我偶然发现的一个老问题。

    该示例使用 2013 年 12 月弃用的 Profiles API。请参阅迁移指南:https://developers.google.com/admin-sdk/directory/v1/guides/migrate

    截至 2016 年,API 是 Admin SDK 的用户资源。 API 文档在这里:https://developers.google.com/admin-sdk/directory/v1/reference/users/update

    您可以使用 User.primaryEmail 作为 Google Apps 帐户的 ID/地址,并且可以遍历 User.emails[] 数组以获取任何其他电子邮件地址。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-20
      • 2021-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-25
      相关资源
      最近更新 更多