已淘汰的屬性
屬性 | 類型 | 說明 |
---|---|---|
ExtendedField |
| |
Field |
| |
Gender |
| |
Month | Month | |
Priority |
| |
Sensitivity |
|
已淘汰的方法
已淘汰的方法
createContact(givenName, familyName, email)
createContact(givenName, familyName, email)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
建立新的聯絡人。
// The code below creates a new contact with the name "John Doe" and the email address // "john.doe@example.com". var contact = ContactsApp.createContact('John', 'Doe', 'john.doe@example.com');
參數
名稱 | 類型 | 說明 |
---|---|---|
givenName | String | 聯絡人的名字 |
familyName | String | 聯絡人的姓氏 |
email | String | 聯絡人的電子郵件地址 |
回攻員
:新建的「Contact」物件Contact
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
createContactGroup(name)
createContactGroup(name)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
使用指定名稱建立聯絡人群組
// The code below creates a new contact group named "Work Friends" var group = ContactsApp.createContactGroup("Work Friends");
參數
名稱 | 類型 | 說明 |
---|---|---|
name | String | 新聯絡人群組名稱 |
回攻員
:新建的聯絡人群組ContactGroup
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
deleteContact(contact)
deleteContact(contact)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
刪除聯絡人。
// The code below retrieves a contact with the email address "john.doe@example.com" // and then deletes that contact. var contact = ContactsApp.getContact('john.doe@example.com'); ContactsApp.deleteContact(contact);
參數
名稱 | 類型 | 說明 |
---|---|---|
contact |
| 要刪除的聯絡人 |
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
deleteContactGroup(group)
deleteContactGroup(group)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
刪除聯絡人群組
// The code below creates deletes the contact group named "Work Friends" var group = ContactsApp.getContactGroup("Work Friends"); ContactsApp.deleteContactGroup(group);
參數
名稱 | 類型 | 說明 |
---|---|---|
group |
| 要刪除的聯絡人群組 |
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
findByEmailAddress(email)
findByEmailAddress(email)
findContactGroup(name)
findContactGroup(name)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
尋找指定名稱的聯絡人群組。
參數
名稱 | 類型 | 說明 |
---|---|---|
name | String | 要尋找的聯絡人群組名稱 |
回攻員
:與指定名稱相符的聯絡人群組ContactGroup
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
getAllContacts()
getAllContacts()
getContact(emailAddress)
getContact(emailAddress)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
依電子郵件地址取得聯絡人。
如果多位聯絡人共用同一個電子郵件地址,這個方法會較常使用已將電子郵件地址標示為主要的聯絡人;如果沒有任何聯絡人的電子郵件地址標示為主要聯絡人,或多位聯絡人已將電子郵件地址標示為主要聯絡人,則這個方法會依照排序的聯絡人順序傳回第一個結果。
// The code below retrieves a contact with the email address "john.doe@example.com". var contact = ContactsApp.getContact('john.doe@example.com');
參數
名稱 | 類型 | 說明 |
---|---|---|
emailAddress | String | 聯絡人的電子郵件地址 |
回攻員
:包含該電子郵件地址的聯絡人Contact
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactById(id)
getContactById(id)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得此 ID 的聯絡人資訊。
// The code below retrieves the contact with the id // "http://www.google.com/m8/feeds/contacts/john.doe%40example.com/base/7c86afde08d34ca5" var id = 'http://www.google.com/m8/feeds/contacts/john.doe%40example.com/base/7c86afde08d34c'; var contact = ContactApp.getContactById(id);
參數
名稱 | 類型 | 說明 |
---|---|---|
id | String | 要擷取的聯絡人 ID |
回攻員
:相符的聯絡人或空值Contact
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactGroup(name)
getContactGroup(name)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得具有指定名稱的聯絡人群組,如果找不到任何聯絡人群組,則傳回空值。
// The code below returns the contact group with the name "Work Friends" var group = ContactsApp.getContactGroup('Work Friends');
參數
名稱 | 類型 | 說明 |
---|---|---|
name | String | 要比對的聯絡人群組名稱 |
回攻員
:相符的聯絡人群組。如果找不到相符的聯絡人群組,則為空值ContactGroup
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactGroupById(id)
getContactGroupById(id)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得具有指定 ID 的聯絡人群組,如果找不到聯絡人群組,則傳回空值。
// The code below returns the contact group with the id // "http://www.google.com/m8/feeds/groups/john.doe%40example.com/base/54eefbb093fdecb" var id = "http://www.google.com/m8/feeds/groups/john.doe%40example.com/base/54eefbb093fdecb"; var group = ContactsApp.getContactGroupById(id);
參數
名稱 | 類型 | 說明 |
---|---|---|
id | String | 要比對的聯絡人群組 ID |
回攻員
:相符的聯絡人群組。如果找不到相符的聯絡人群組,則為空值ContactGroup
另請參閱
getContactGroups()
getContactGroups()
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得使用者聯絡人群組的完整清單。
使用者可以建立聯絡人清單,也可能有聯絡人群組清單。每個聯絡人群組都可以包含聯絡人。這個方法會傳回所有聯絡人群組的清單。
// The retrieves all the contract groups for the user and then logs the group name of each // contact group. var groups = ContactsApp.getContactGroups(); for (var i = 0; i < groups.length; i++) { Logger.log(groups[i].getName()); }
回攻員
:使用者聯絡人群組的陣列ContactGroup[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContacts()
getContacts()
getContactsByAddress(query)
getContactsByAddress(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合地址的聯絡人。
// The code below returns an array of contacts where the contact's address contains // "San Francisco'. var contacts = ContactsApp.getContactsByAddress('San Francisco');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在聯絡人地址中搜尋的字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByAddress(query, label)
getContactsByAddress(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合地址條件的聯絡人,僅限特定欄位。
// The code below returns an array of contacts where the contact's address contains // "San Francisco" in the Home address field. var contacts = ContactsApp.getContactsByAddress('San Francisco', ContactsApp.Field.HOME_ADDRESS);
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在聯絡人地址中搜尋的字串 |
label |
| 用來搜尋「 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByAddress(query, label)
getContactsByAddress(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得地址相符的聯絡人 (僅限指定自訂地址標籤)。
// The code below returns an array of contacts where the contact's address contains // "San Francisco" in a custom address label (created by the user) called // "vacation". var contacts = ContactsApp.getContactsByAddress('San Francisco', 'vacation');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 根據指定的自訂地址標籤,在聯絡人地址中搜尋的字串 |
label | String | 自訂地址標籤 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByCompany(query)
getContactsByCompany(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合公司欄位的聯絡人。
// The code below returns an array of contacts where the contact's company field // contains "Google". var contacts = ContactsApp.getContactsByCompany('Google');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在聯絡人公司欄位中搜尋的字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByCustomField(query, label)
getContactsByCustomField(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合自訂欄位中特定值的聯絡人。
自訂欄位可以由字串或 ContactsApp.ExtendedField 值之一指定。
// The code below returns an array of contacts where the contact's custom field // named "Favorite Sport" contains "tennis". var contacts = ContactsApp.getContactsByCustomField('tennis', 'Favorite Sport');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | Object | 要在聯絡人自訂欄位中搜尋的字串 |
label |
| 要在當中搜尋 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByDate(month, day, label)
getContactsByDate(month, day, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合特定標準欄位指定月份和日期的聯絡人。
// The code below returns an array of contacts where the contact's "Birthday" field // contains April for the month and 19 for the day. var contacts = ContactsApp.getContactsByDate(ContactsApp.Month.APRIL, 19, ContactsApp.Field.BIRTHDAY);
參數
名稱 | 類型 | 說明 |
---|---|---|
month | Month | 要比對的月份,做為 ContactsApp.Month 中的其中一個值 |
day | Integer | 推薦日期 |
label |
| 透過 ContactsApp.Field 搜尋 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByDate(month, day, year, label)
getContactsByDate(month, day, year, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合特定標準欄位的月份、日期和年份的聯絡人。
// The code below returns an array of contacts where the contact's "Birthday" field // contains April for the month, 19 for the day, and 1950 for the year. var contacts = ContactsApp.getContactsByDate(ContactsApp.Month.APRIL, 19, 1950, ContactsApp.Field.BIRTHDAY);
參數
名稱 | 類型 | 說明 |
---|---|---|
month | Month | 要比對的月份,做為 ContactsApp.Month 中的其中一個值 |
day | Integer | 推薦日期 |
year | Integer | 要比對的年份,可以是空值 |
label |
| 透過 ContactsApp.Field 搜尋 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByDate(month, day, year, label)
getContactsByDate(month, day, year, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得與特定自訂欄位相配的月份、日期和年份。
// The code below returns an array of contacts where the contact's custom "Start Date" field // contains April for the month, 19 for the day, and 2011 for the year. var contacts = ContactsApp.getContactsByDate(ContactsApp.Month.APRIL, 19, 2011, 'Start Date');
參數
名稱 | 類型 | 說明 |
---|---|---|
month | Month | 要比對的月份,做為 ContactsApp.Month 中的其中一個值 |
day | Integer | 推薦日期 |
year | Integer | 要比對的年份,可以是空值 |
label | String | 要在當中搜尋 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByDate(month, day, label)
getContactsByDate(month, day, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合特定自訂欄位的月份和日期的聯絡人。
// The code below returns an array of contacts where the contact's custom "Start Date" field // contains April for the month and 19 for the day. var contacts = ContactsApp.getContactsByDate(ContactsApp.Month.APRIL, 19, 'Start Date');
參數
名稱 | 類型 | 說明 |
---|---|---|
month | Month | 要比對的月份,做為 ContactsApp.Month 中的其中一個值 |
day | Integer | 推薦日期 |
label | String | 要在當中搜尋 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByEmailAddress(query)
getContactsByEmailAddress(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得與電子郵件地址相符的聯絡人。
// The code below returns an array of contacts where the contact's email address contains // "john.doe@example.com'. var contacts = ContactsApp.getContactsByEmailAddress('john.doe@example.com');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在聯絡電子郵件地址中搜尋的字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByEmailAddress(query, label)
getContactsByEmailAddress(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合電子郵件地址 (僅限特定欄位) 的聯絡人。
// The code below returns an array of contacts where the contact's email address contains // "john.doe@example.com" in the Home email field. var contacts = ContactsApp.getContactsByEmailAddress('john.doe@example.com', ContactsApp.Field.HOME_EMAIL);
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在聯絡電子郵件地址中搜尋的字串 |
label |
| 用來搜尋「 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByEmailAddress(query, label)
getContactsByEmailAddress(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得與電子郵件地址相符的聯絡人,並限制於指定的自訂電子郵件地址標籤。
// The code below returns an array of contacts where the contact's email address contains // "john.doe@example.com" in a custom email address label (created by the user) called // "alternate". var contacts = ContactsApp.getContactsByEmailAddress('john.doe@example.com', 'alternate');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 根據指定的自訂電子郵件地址標籤,在聯絡電子郵件地址中搜尋的字串 |
label | String | 要在當中搜尋的自訂電子郵件地址標籤 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByGroup(group)
getContactsByGroup(group)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得指定 ContactGroup 中的聯絡人。
// The code below returns an array of contacts in the ContactGroup with the name // "Work Friends". var group = ContactsApp.getContactGroup('Work Friends'); var contacts = ContactsApp.getContactsByGroup(group);
參數
名稱 | 類型 | 說明 |
---|---|---|
group |
| 聯絡人群組 |
回攻員
:指定群組中的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByIM(query)
getContactsByIM(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得與即時通訊地址相符的聯絡人。
// The code below returns an array of contacts where the contact's instant messaging address // contains "ChatWithJohnDoe" in any instant messaging field. var contacts = ContactsApp.getContactsByIM('ChatWithJohnDoe');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 在聯絡人的即時通訊地址中搜尋這個字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByIM(query, label)
getContactsByIM(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合即時通訊地址的聯絡人,僅限特定欄位。
// The code below returns an array of contacts where the contact's instant messaging address // contains "ChatWithJohnDoe" in the AIM instant messaging field. var contacts = ContactsApp.getContactsByIM('ChatWithJohnDoe', ContactsApp.Field.AIM);
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 在聯絡人的即時通訊地址中搜尋這個字串 |
label |
| 用來搜尋「 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByIM(query, label)
getContactsByIM(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得與即時通訊地址相符的聯絡人,僅限指定的自訂即時通訊標籤。
// The code below returns an array of contacts where the contact's instant messaging address // contains "ChatWithJohnDoe" in a custom instant messaging label (created by the user) called // "eBuddy". var contacts = ContactsApp.getContactsByIM('ChatWithJohnDoe', 'eBuddy');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 這段字串用於搜尋聯絡人的即時通訊地址 (具有指定的自訂即時通訊標籤) |
label | String | 自訂即時通訊標籤 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByJobTitle(query)
getContactsByJobTitle(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合職稱欄位的聯絡人。
// The code below returns an array of contacts where the contact's job title field // contains "Product Manager". var contacts = ContactsApp.getContactsByJobTitle('Product Manager');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 聯絡人的職稱欄位中要搜尋的字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByName(query)
getContactsByName(query)
getContactsByName(query, label)
getContactsByName(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合名稱且僅限特定欄位的聯絡人。
// The code below returns an array of contacts where the contact name contains "John" // in the Given Name field. var contacts = ContactsApp.getContactsByName('John', ContactsApp.Field.GIVEN_NAME);
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要搜尋聯絡人姓名的字串 |
label |
| 用來搜尋「 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByNotes(query)
getContactsByNotes(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合附註欄位的聯絡人。
// The code below returns an array of contacts where the contact's notes field // contains "sent birthday card". var contacts = ContactsApp.getContactsByNotes('sent birthday card');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 聯絡人附註欄位中要搜尋的字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByPhone(query)
getContactsByPhone(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合電話號碼的聯絡人。
此方法會展開帶有字母的數字,因此如果您搜尋「212-555-CODE」,而聯絡人中有「212-555-2633」,反之亦然,則此方法會找出適用的聯絡人。
// The code below returns an array of contacts where the contact's phone number contains // "212-555-1234' in any phone number field. var contacts = ContactsApp.getContactsByPhone('212-555-1234');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 用於搜尋聯絡人電話號碼的字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByPhone(query, label)
getContactsByPhone(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合電話號碼,且僅限特定欄位的聯絡人。
此方法會展開帶有字母的數字,因此如果您搜尋「212-555-CODE」,而聯絡人中有「212-555-2633」,反之亦然,則此方法會找出適用的聯絡人。
// The code below returns an array of contacts where the contact's phone number contains // "212-555-1234" in the Home phone number field. var contacts = ContactsApp.getContactsByPhone('212-555-1234', ContactsApp.Field.HOME_PHONE);
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 用於搜尋聯絡人電話號碼的字串 |
label |
| 用來搜尋「 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByPhone(query, label)
getContactsByPhone(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合指定電話號碼標籤的聯絡人。
此方法會展開帶有字母的數字,因此如果您搜尋「212-555-CODE」,而聯絡人中有「212-555-2633」,反之亦然,則此方法會找出適用的聯絡人。
// The code below returns an array of contacts where the contact's phone number contains // "212-555-1234" in a custom phone number label (created by the user) called // "alternate". var contacts = ContactsApp.getContactsByPhone('212-555-1234', 'alternate');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 您要搜尋的聯絡人電話號碼 (具有指定自訂電話號碼標籤) 的字串 |
label | String | 自訂電話號碼標籤 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByUrl(query)
getContactsByUrl(query)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得符合網址的聯絡人。
// The code below returns an array of contacts where the contact's URL contains // "www.example.com' in any URL field. var contacts = ContactsApp.getContactsByUrl('www.example.com');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在聯絡人網址中搜尋的字串 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByUrl(query, label)
getContactsByUrl(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得與網址相符的聯絡人,且僅限特定欄位。
// The code below returns an array of contacts where the contact's URL contains // "www.example.com" in the Work URL field. var contacts = ContactsApp.getContactsByUrl('www.example.com', ContactsApp.Field.WORK_WEBSITE);
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在聯絡人網址中搜尋的字串 |
label |
| 用來搜尋「 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds
另請參閱
getContactsByUrl(query, label)
getContactsByUrl(query, label)
已淘汰。此函式已淘汰,不應在新的指令碼中使用。
取得與網址相符的聯絡人 (僅限指定自訂網址標籤)。
// The code below returns an array of contacts where the contact's URL contains // "www.example.com" in a custom URL label (created by the user) called // "alternate work". var contacts = ContactsApp.getContactsByUrl('www.example.com', 'alternate work');
參數
名稱 | 類型 | 說明 |
---|---|---|
query | String | 要在含有指定自訂網址標籤的聯絡人網址中搜尋的字串 |
label | String | 要在其中搜尋的自訂網址標籤 |
回攻員
:相符的聯絡人陣列Contact[]
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.google.com/m8/feeds