用户字段的Google api架构

时间:2013-04-23 11:52:17

标签: google-provisioning-api

我创建了一个连接到Google应用电子邮件的软件,并允许我为指定用户创建一个包含其信息的签名。在Google应用中,域名管理无法编辑更多"高级"公司地址,传真,电子邮件,标题,昵称等字段。所以我使用Flash Panel为我提供了这种可能性。但为此我需要字段api schema将其添加到我的配置中,以便将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>

之前是什么&#34; =&#34;它只是用于连接的名称,我需要的是&#34; =&#34; ..

之后的内容

我搜索了Google文档,但我没有设法为某些字段找到正确的api架构格式,例如:国家/地区,城市,街道,昵称,照片,网站,网址,便笺,组织单位,Aka,和任何其他人。此外,在Flash面板中可以添加自定义字段,如果我可以将其与我的签名模板编辑器中的合并字段连接起来,那将会非常棒。有人可以帮助我找到正确的,或者我在哪里/如何找到它们?

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

1 个答案:

答案 0 :(得分:0)

这是我在传递中找到的一个尚未解决的问题。

该示例使用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[]数组。