منسوخ شده است. در عوض، از سرویس پیشرفته People API استفاده کنید
فیلد شماره تلفن در مخاطب.
روش ها
روش | نوع برگشت | شرح مختصر |
---|---|---|
get Label() | Object | برچسب این فیلد را دریافت می کند. |
is Primary() | Boolean | دریافت می کند که آیا این مقدار فیلد اصلی است یا خیر. |
set As Primary() |
| این فیلد را روی اولیه قرار می دهد. |
set Label(field) |
| برچسب این فیلد را تنظیم می کند. |
set Label(label) |
| برچسب این فیلد را تنظیم می کند. |
مستندات دقیق
get Label()
برچسب این فیلد را دریافت می کند. این ممکن است یک فیلد، ExtendedField یا یک رشته باشد.
// Logs the label for all the address fields associated with contact // 'John Doe'. This method can be similarly called for any field that has // a label. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); for (let i = 0; i < addressFields.length; i++) { Logger.log(addressFields[i].getLabel()); }
بازگشت
Object
- برچسب این فیلد
مجوز
اسکریپت هایی که از این روش استفاده می کنند نیاز به مجوز با یک یا چند مورد از حوزه های زیر دارند:
-
https://www.google.com/m8/feeds
is Primary()
دریافت می کند که آیا این مقدار فیلد اصلی است یا خیر.
// Logs whether or not the first address field associated with contact // 'John Doe' is labeled as primary. This method can be similarly called // for any field. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); Logger.log(addressFields[0].isPrimary());
بازگشت
Boolean
- آیا این اولیه است
مجوز
اسکریپت هایی که از این روش استفاده می کنند نیاز به مجوز با یک یا چند مورد از حوزه های زیر دارند:
-
https://www.google.com/m8/feeds
set As Primary()
این فیلد را روی اولیه قرار می دهد.
// Sets the first address field associated with contact 'John Doe' // as primary. This method can be similarly called for any field. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); addressFields[0].setAsPrimary();
بازگشت
- این FieldValue برای زنجیره زدنPhone Field
مجوز
اسکریپت هایی که از این روش استفاده می کنند نیاز به مجوز با یک یا چند مورد از حوزه های زیر دارند:
-
https://www.google.com/m8/feeds
set Label(field)
برچسب این فیلد را تنظیم می کند.
// Sets the label to 'Work' for the first address field associated // with contact 'John Doe'. This method can be similarly called for any // field that has a label. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); addressFields[0].setLabel(ContactsApp.Field.WORK_ADDRESS);
پارامترها
نام | تایپ کنید | توضیحات |
---|---|---|
field |
| برچسب استاندارد جدید |
بازگشت
- این FieldValue برای زنجیره زدنPhone Field
مجوز
اسکریپت هایی که از این روش استفاده می کنند نیاز به مجوز با یک یا چند مورد از حوزه های زیر دارند:
-
https://www.google.com/m8/feeds
set Label(label)
برچسب این فیلد را تنظیم می کند.
// Sets the label to 'Apartment' for the first address field associated // with contact 'John Doe'. This method can be similarly called for any // field that has a label. const contacts = ContactsApp.getContactsByName('John Doe'); const addressFields = contacts[0].getAddresses(); addressFields[0].setLabel('Apartment');
پارامترها
نام | تایپ کنید | توضیحات |
---|---|---|
label | String | برچسب جدید برای این زمینه |
بازگشت
- این فیلد برای زنجیرهبندی مفید استPhone Field
مجوز
اسکریپت هایی که از این روش استفاده می کنند نیاز به مجوز با یک یا چند مورد از حوزه های زیر دارند:
-
https://www.google.com/m8/feeds