Kullanımdan kaldırıldı. Bunun yerine People API ileri seviye hizmetini kullanın.
Bir kişideki URL alanı.
Yöntemler
Yöntem | Dönüş türü | Kısa açıklama |
---|---|---|
get | String | Bu alanın adresini alın. |
get | Object | Bu alanın etiketini alır. |
is | Boolean | Bunun birincil alan değeri olup olmadığını alır. |
set |
| Bu alanın adresini belirler. |
set |
| Bu alanı birincil olarak ayarlar. |
set |
| Bu alanın etiketini ayarlar. |
set |
| Bu alanın etiketini ayarlar. |
Ayrıntılı dokümanlar
get Address()
Bu alanın adresini alın.
// Logs the address for the 'Home Address' field for contact 'John Doe'. // Can be used similarly for other fields that contain addresses. const contacts = ContactsApp.getContactsByName('John Doe'); const homeAddress = contacts[0].getAddresses(ContactsApp.Field.HOME_ADDRESS); Logger.log(homeAddress[0].getAddress());
Return
String
: Adres, dize olarak
Yetkilendirme
Bu yöntemi kullanan komut dosyalarının aşağıdaki kapsamlardan bir veya daha fazlası için yetkilendirilmesi gerekir:
-
https://www.google.com/m8/feeds
get Label()
Bu alanın etiketini alır. Bu bir Alan, Genişletilmiş Alan veya Dize olabilir.
// 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()); }
Return
Object
: Bu alanın etiketi
Yetkilendirme
Bu yöntemi kullanan komut dosyalarının aşağıdaki kapsamlardan bir veya daha fazlası için yetkilendirilmesi gerekir:
-
https://www.google.com/m8/feeds
is Primary()
Bunun birincil alan değeri olup olmadığını alır.
// 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());
Return
Boolean
: Bu cihazın birincil olup olmadığı
Yetkilendirme
Bu yöntemi kullanan komut dosyalarının aşağıdaki kapsamlardan bir veya daha fazlası için yetkilendirilmesi gerekir:
-
https://www.google.com/m8/feeds
set Address(address)
Bu alanın adresini belirler.
// Sets the address for the 'Home Address' field for contact 'John Doe'. // Can be used similarly for other fields that contain addresses. const contacts = ContactsApp.getContactsByName('John Doe'); const homeAddress = contacts[0].getAddresses(ContactsApp.Field.HOME_ADDRESS); homeAddress[0].setAddress('123 Main St, Raleigh, NC, 27601');
Parametreler
Ad | Tür | Açıklama |
---|---|---|
address | String | yeni adres |
Return
: zincirleme için yararlı olan bu alanUrl
Yetkilendirme
Bu yöntemi kullanan komut dosyalarının aşağıdaki kapsamlardan bir veya daha fazlası için yetkilendirilmesi gerekir:
-
https://www.google.com/m8/feeds
set As Primary()
Bu alanı birincil olarak ayarlar.
// 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();
Return
: zincirleme için bu FieldValueUrl
Yetkilendirme
Bu yöntemi kullanan komut dosyalarının aşağıdaki kapsamlardan bir veya daha fazlası için yetkilendirilmesi gerekir:
-
https://www.google.com/m8/feeds
set Label(field)
Bu alanın etiketini ayarlar.
// 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);
Parametreler
Ad | Tür | Açıklama |
---|---|---|
field |
| yeni standart etiket |
Return
: zincirleme için bu FieldValueUrl
Yetkilendirme
Bu yöntemi kullanan komut dosyalarının aşağıdaki kapsamlardan bir veya daha fazlası için yetkilendirilmesi gerekir:
-
https://www.google.com/m8/feeds
set Label(label)
Bu alanın etiketini ayarlar.
// 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');
Parametreler
Ad | Tür | Açıklama |
---|---|---|
label | String | bu alanın yeni etiketi |
Return
: zincirleme için yararlı olan bu alanUrl
Yetkilendirme
Bu yöntemi kullanan komut dosyalarının aşağıdaki kapsamlardan bir veya daha fazlası için yetkilendirilmesi gerekir:
-
https://www.google.com/m8/feeds