Add/set 要联系的部门名称
Add/set Department name to contact
如何为google个联系人中的"Department"字段添加或设置值?
"Company" 和 "Job title"
没问题
var contact = ContactsApp.createContact('John', 'Doe', 'john.doe@example.com');
var company_set = contact.addCompany('Google', 'Product Manager');
// ?????
var department_set = contact.add______________('IT');
UPD:感谢@TheMaster,我设法解决了这个任务。
不错的 API 示例,您可以在此处找到 https://www.any-api.com/googleapis_com/people/docs/people/people_people_createContact
使用此站点上的示例,您可以为 API.
构建所需的正文
var reqBody = {
names: [
{
givenName: givenName,
familyName: familyName
}
],
phoneNumbers: phoneNumbers,
organizations: [
{
title: orgTitle,
department: orgDepartment
}
],
emailAddresses: [
{
value: emailAddres,
type: 'work'
}
],
addresses: [
{
city: city,
streetAddress: streetAddress,
type: 'work'
}
],
memberships: [
{
contactGroupMembership: {
contactGroupId: contactGroupsID,
contactGroupResourceName: "contactGroups/" + contactGroupsID
}
}
]
}
createContact(reqBody);
可以通过人物 API 和 Advanced Google services. When a contact is created through the api 设置 department
,人物对象可以包括 organizations[].department
如何为google个联系人中的"Department"字段添加或设置值? "Company" 和 "Job title"
没问题var contact = ContactsApp.createContact('John', 'Doe', 'john.doe@example.com');
var company_set = contact.addCompany('Google', 'Product Manager');
// ?????
var department_set = contact.add______________('IT');
UPD:感谢@TheMaster,我设法解决了这个任务。 不错的 API 示例,您可以在此处找到 https://www.any-api.com/googleapis_com/people/docs/people/people_people_createContact 使用此站点上的示例,您可以为 API.
构建所需的正文 var reqBody = {
names: [
{
givenName: givenName,
familyName: familyName
}
],
phoneNumbers: phoneNumbers,
organizations: [
{
title: orgTitle,
department: orgDepartment
}
],
emailAddresses: [
{
value: emailAddres,
type: 'work'
}
],
addresses: [
{
city: city,
streetAddress: streetAddress,
type: 'work'
}
],
memberships: [
{
contactGroupMembership: {
contactGroupId: contactGroupsID,
contactGroupResourceName: "contactGroups/" + contactGroupsID
}
}
]
}
createContact(reqBody);
可以通过人物 API 和 Advanced Google services. When a contact is created through the api 设置 department
,人物对象可以包括 organizations[].department