Contacts Service

Contacts

Deprecated. Instead, use the People API advanced service

This service allows scripts to access and modify Google Contacts, both for individual contacts and for groups.

Classes

NameBrief description
AddressFieldAddress field in a contact.
CompanyFieldCompany field in a Contact.
ContactA Contact contains the name, address, and various contact details of a contact.
ContactGroupA ContactGroup is is a group of contacts.
ContactsAppThis class allows users to access their own Google Contacts and create, remove, and update contacts listed therein.
CustomFieldA custom field in a Contact.
DateFieldA date field in a Contact.
EmailFieldAn email field in a Contact.
ExtendedFieldAn enum for extended contacts fields.
FieldAn enum for contacts fields.
GenderAn enum for contact gender.
IMFieldAn instant messaging field in a Contact.
PhoneFieldA phone number field in a Contact.
PriorityAn enum for contact priority.
SensitivityAn enum for contact sensitivity.
UrlFieldA URL field in a Contact.

AddressField

Methods

MethodReturn typeBrief description
getAddress()StringGet the address for this field.
getLabel()ObjectGets the label for this field.
isPrimary()BooleanGets whether this is the primary field value.
setAddress(address)AddressFieldSets the address of this field.
setAsPrimary()AddressFieldSets this field to primary.
setLabel(field)AddressFieldSets the label of this field.
setLabel(label)AddressFieldSets the label of this field.

CompanyField

Contact

ContactGroup

ContactsApp

CustomField

Methods

MethodReturn typeBrief description
getLabel()ObjectGets the label for this field.
setLabel(label)CustomFieldSets the label of this field.

DateField

Methods

MethodReturn typeBrief description
getLabel()ObjectGets the label for this field.
setLabel(label)DateFieldSets the label of this field.

EmailField

Methods

MethodReturn typeBrief description
getAddress()StringGet the address for this field.
getLabel()ObjectGets the label for this field.
isPrimary()BooleanGets whether this is the primary field value.
setAddress(address)EmailFieldSets the address of this field.
setAsPrimary()EmailFieldSets this field to primary.
setLabel(field)EmailFieldSets the label of this field.
setLabel(label)EmailFieldSets the label of this field.

ExtendedField

Field

Gender

IMField

Methods

MethodReturn typeBrief description
getAddress()StringGet the address for this field.
getLabel()ObjectGets the label for this field.
isPrimary()BooleanGets whether this is the primary field value.
setAddress(address)IMFieldSets the address of this field.
setAsPrimary()IMFieldSets this field to primary.
setLabel(field)IMFieldSets the label of this field.
setLabel(label)IMFieldSets the label of this field.

PhoneField

Methods

MethodReturn typeBrief description
getLabel()ObjectGets the label for this field.
isPrimary()BooleanGets whether this is the primary field value.
setAsPrimary()PhoneFieldSets this field to primary.
setLabel(field)PhoneFieldSets the label of this field.
setLabel(label)PhoneFieldSets the label of this field.

Priority

Sensitivity

UrlField

Methods

MethodReturn typeBrief description
getAddress()StringGet the address for this field.
getLabel()ObjectGets the label for this field.
isPrimary()BooleanGets whether this is the primary field value.
setAddress(address)UrlFieldSets the address of this field.
setAsPrimary()UrlFieldSets this field to primary.
setLabel(field)UrlFieldSets the label of this field.
setLabel(label)UrlFieldSets the label of this field.