지원 중단되었습니다. 대신 People API 고급 서비스를 사용하세요.
연락처의 채팅 메시지 필드
메서드
메서드 | 반환 유형 | 간략한 설명 |
---|---|---|
get | String | 이 필드의 주소를 가져옵니다. |
get | Object | 이 필드의 라벨을 가져옵니다. |
is | Boolean | 기본 필드 값인지 여부를 가져옵니다. |
set |
| 이 필드의 주소를 설정합니다. |
set |
| 이 필드를 기본으로 설정합니다. |
set |
| 이 필드의 라벨을 설정합니다. |
set |
| 이 필드의 라벨을 설정합니다. |
지원 중단된 메서드
메서드 | 반환 유형 | 간략한 설명 |
---|---|---|
| void | 이 채팅 메시지 필드를 삭제합니다. |
자세한 문서
getAddress()
이 필드의 주소를 가져옵니다.
// 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());
리턴
String
: 주소(문자열)
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds
getLabel()
이 필드의 라벨을 가져옵니다. 필드, 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
isPrimary()
기본 필드 값인지 여부를 가져옵니다.
// 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
setAddress(address)
이 필드의 주소를 설정합니다.
// 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');
매개변수
이름 | 유형 | 설명 |
---|---|---|
address | String | 새 주소 |
리턴
: 연결에 유용한 필드IMField
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds
setAsPrimary()
이 필드를 기본으로 설정합니다.
// 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();
리턴
: 연결을 위한 이 FieldValueIMField
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds
setLabel(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 |
| 새 표준 라벨 |
리턴
: 연결을 위한 이 FieldValueIMField
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds
setLabel(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 | 이 필드의 새 라벨 |
리턴
: 연결에 유용한 필드IMField
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds
지원 중단된 메서드
deleteIMField()
deleteIMField()
지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.
이 채팅 메시지 필드를 삭제합니다.
// Retrieves and deletes the AIM instant messaging field for contact 'John
// Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const imFields = contacts[0].getIMs(ContactsApp.Field.AIM);
imFields[0].deleteIMField();
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds