class ContactGroups extends Resource (View source)

The "contactGroups" collection of methods.

Typical usage is:

 $peopleService = new Google\Service\PeopleService(...);
 $contactGroups = $peopleService->contactGroups;

Methods

batchGet(array $optParams = [])

Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names. (contactGroups.batchGet)

create(CreateContactGroupRequest $postBody, array $optParams = [])

Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (contactGroups.create)

delete(string $resourceName, array $optParams = [])

Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

get(string $resourceName, array $optParams = [])

Get a specific contact group owned by the authenticated user by specifying a contact group resource name. (contactGroups.get)

listContactGroups(array $optParams = [])

List all contact groups owned by the authenticated user. Members of the contact groups are not populated. (contactGroups.listContactGroups)

update(string $resourceName, UpdateContactGroupRequest $postBody, array $optParams = [])

Update the name of an existing contact group owned by the authenticated user.

Details

BatchGetContactGroupsResponse batchGet(array $optParams = [])

Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names. (contactGroups.batchGet)

Parameters

array $optParams

Optional parameters.

Return Value

BatchGetContactGroupsResponse

Exceptions

Exception

ContactGroup create(CreateContactGroupRequest $postBody, array $optParams = [])

Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (contactGroups.create)

Parameters

CreateContactGroupRequest $postBody
array $optParams

Optional parameters.

Return Value

ContactGroup

Exceptions

Exception

PeopleEmpty delete(string $resourceName, array $optParams = [])

Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

(contactGroups.delete)

Parameters

string $resourceName

Required. The resource name of the contact group to delete.

array $optParams

Optional parameters.

Return Value

PeopleEmpty

Exceptions

Exception

ContactGroup get(string $resourceName, array $optParams = [])

Get a specific contact group owned by the authenticated user by specifying a contact group resource name. (contactGroups.get)

Parameters

string $resourceName

Required. The resource name of the contact group to get.

array $optParams

Optional parameters.

Return Value

ContactGroup

Exceptions

Exception

ListContactGroupsResponse listContactGroups(array $optParams = [])

List all contact groups owned by the authenticated user. Members of the contact groups are not populated. (contactGroups.listContactGroups)

Parameters

array $optParams

Optional parameters.

Return Value

ListContactGroupsResponse

Exceptions

Exception

ContactGroup update(string $resourceName, UpdateContactGroupRequest $postBody, array $optParams = [])

Update the name of an existing contact group owned by the authenticated user.

Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (contactGroups.update)

Parameters

string $resourceName

The resource name for the contact group, assigned by the server. An ASCII string, in the form of contactGroups/{contact_group_id}.

UpdateContactGroupRequest $postBody
array $optParams

Optional parameters.

Return Value

ContactGroup

Exceptions

Exception