People
class People extends Resource (View source)
The "people" collection of methods.
Typical usage is:
$peopleService = new Google\Service\PeopleService(...);
$people = $peopleService->people;
Methods
Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.batchCreateContacts)
Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.batchDeleteContacts)
Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: biographies birthdays * genders
- names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.createContact)
Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.deleteContact)
Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention. (people.deleteContactPhoto)
Provides information about a person by specifying a resource name. Use
people/me
to indicate the authenticated user. The request returns a 400
error if 'personFields' is not specified. (people.get)
Provides information about a list of specific people by specifying a list of
requested resource names. Use people/me
to indicate the authenticated user.
Provides a list of domain profiles and domain contacts in the authenticated
user's domain directory. When the sync_token
is specified, resources
deleted since the last sync will be returned as a person with
PersonMetadata.deleted
set to true. When the page_token
or sync_token
is specified, all other request parameters must match the first call. Writes
may have a propagation delay of several minutes for sync requests.
Provides a list of contacts in the authenticated user's grouped contacts that
matches the search query. The query matches on a contact's names
,
nickNames
, emailAddresses
, phoneNumbers
, and organizations
fields
that are from the CONTACT source. IMPORTANT: Before searching, clients
should send a warmup request with an empty query to update the cache. See
https://developers.google.com/people/v1/contacts#search_the_users_contacts
(people.searchContacts)
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.
Update contact data for an existing contact person. Any non-contact data will
not be modified. Any non-contact data in the person to update will be
ignored. All fields specified in the update_mask
will be replaced. The
server returns a 400 error if person.metadata.sources
is not specified for
the contact to be updated or if there is no contact source. The server
returns a 400 error with reason "failedPrecondition"
if
person.metadata.sources.etag
is different than the contact's etag, which
indicates the contact has changed since its data was read. Clients should get
the latest person and merge their updates into the latest person. The server
returns a 400 error if memberships
are being updated and there are no
contact group memberships specified on the person. The server returns a 400
error if more than one field is specified on a field that is a singleton for
contact sources: biographies birthdays genders names Mutate requests
for the same user should be sent sequentially to avoid increased latency and
failures. (people.updateContact)
Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
Details
BatchCreateContactsResponse
batchCreateContacts(BatchCreateContactsRequest $postBody, array $optParams = [])
Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.batchCreateContacts)
PeopleEmpty
batchDeleteContacts(BatchDeleteContactsRequest $postBody, array $optParams = [])
Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.batchDeleteContacts)
BatchUpdateContactsResponse
batchUpdateContacts(BatchUpdateContactsRequest $postBody, array $optParams = [])
Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
(people.batchUpdateContacts)
Person
createContact(Person $postBody, array $optParams = [])
Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: biographies birthdays * genders
- names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.createContact)
PeopleEmpty
deleteContact(string $resourceName, array $optParams = [])
Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures. (people.deleteContact)
DeleteContactPhotoResponse
deleteContactPhoto(string $resourceName, array $optParams = [])
Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention. (people.deleteContactPhoto)
Person
get(string $resourceName, array $optParams = [])
Provides information about a person by specifying a resource name. Use
people/me
to indicate the authenticated user. The request returns a 400
error if 'personFields' is not specified. (people.get)
GetPeopleResponse
getBatchGet(array $optParams = [])
Provides information about a list of specific people by specifying a list of
requested resource names. Use people/me
to indicate the authenticated user.
The request returns a 400 error if 'personFields' is not specified. (people.getBatchGet)
ListDirectoryPeopleResponse
listDirectoryPeople(array $optParams = [])
Provides a list of domain profiles and domain contacts in the authenticated
user's domain directory. When the sync_token
is specified, resources
deleted since the last sync will be returned as a person with
PersonMetadata.deleted
set to true. When the page_token
or sync_token
is specified, all other request parameters must match the first call. Writes
may have a propagation delay of several minutes for sync requests.
Incremental syncs are not intended for read-after-write use cases. See example usage at List the directory people that have changed. (people.listDirectoryPeople)
SearchResponse
searchContacts(array $optParams = [])
Provides a list of contacts in the authenticated user's grouped contacts that
matches the search query. The query matches on a contact's names
,
nickNames
, emailAddresses
, phoneNumbers
, and organizations
fields
that are from the CONTACT source. IMPORTANT: Before searching, clients
should send a warmup request with an empty query to update the cache. See
https://developers.google.com/people/v1/contacts#search_the_users_contacts
(people.searchContacts)
SearchDirectoryPeopleResponse
searchDirectoryPeople(array $optParams = [])
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.
(people.searchDirectoryPeople)
Person
updateContact(string $resourceName, Person $postBody, array $optParams = [])
Update contact data for an existing contact person. Any non-contact data will
not be modified. Any non-contact data in the person to update will be
ignored. All fields specified in the update_mask
will be replaced. The
server returns a 400 error if person.metadata.sources
is not specified for
the contact to be updated or if there is no contact source. The server
returns a 400 error with reason "failedPrecondition"
if
person.metadata.sources.etag
is different than the contact's etag, which
indicates the contact has changed since its data was read. Clients should get
the latest person and merge their updates into the latest person. The server
returns a 400 error if memberships
are being updated and there are no
contact group memberships specified on the person. The server returns a 400
error if more than one field is specified on a field that is a singleton for
contact sources: biographies birthdays genders names Mutate requests
for the same user should be sent sequentially to avoid increased latency and
failures. (people.updateContact)
UpdateContactPhotoResponse
updateContactPhoto(string $resourceName, UpdateContactPhotoRequest $postBody, array $optParams = [])
Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
(people.updateContactPhoto)