Documentation

Google_Service_PeopleService_Resource_People extends Google_Service_Resource
in package

The "people" collection of methods.

Typical usage is: $peopleService = new Google_Service_PeopleService(...); $people = $peopleService->people;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
createContact()  : Google_Service_PeopleService_Person
Create a new contact and return the person resource for that contact. The request throws a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names (people.createContact)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
deleteContact()  : Google_Service_PeopleService_PeopleEmpty
Delete a contact person. Any non-contact data will not be deleted.
deleteContactPhoto()  : Google_Service_PeopleService_DeleteContactPhotoResponse
Delete a contact's photo. (people.deleteContactPhoto)
get()  : Google_Service_PeopleService_Person
Provides information about a person by specifying a resource name. Use `people/me` to indicate the authenticated user. The request throws a 400 error if 'personFields' is not specified. (people.get)
getBatchGet()  : Google_Service_PeopleService_GetPeopleResponse
Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user.
listDirectoryPeople()  : Google_Service_PeopleService_ListDirectoryPeopleResponse
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. (people.listDirectoryPeople)
searchDirectoryPeople()  : Google_Service_PeopleService_SearchDirectoryPeopleResponse
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.
updateContact()  : Google_Service_PeopleService_Person
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 (people.updateContact)
updateContactPhoto()  : Google_Service_PeopleService_UpdateContactPhotoResponse
Update a contact's photo. (people.updateContactPhoto)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

createContact()

Create a new contact and return the person resource for that contact. The request throws a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names (people.createContact)

public createContact(Google_Service_PeopleService_Person $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_Person
Parameters
$postBody : Google_Service_PeopleService_Person
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string personFields Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fields if not set. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers

  • photos * relations * sipAddresses * skills * urls * userDefined
opt_param

string sources Optional. A mask of what source types to return. Defaults to ReadSourceType.CONTACT and ReadSourceType.PROFILE if not set.

Return values
Google_Service_PeopleService_Person

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

deleteContact()

Delete a contact person. Any non-contact data will not be deleted.

public deleteContact(string $resourceName[, array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_PeopleEmpty

(people.deleteContact)

Parameters
$resourceName : string

Required. The resource name of the contact to delete.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_PeopleService_PeopleEmpty

deleteContactPhoto()

Delete a contact's photo. (people.deleteContactPhoto)

public deleteContactPhoto(string $resourceName[, array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_DeleteContactPhotoResponse
Parameters
$resourceName : string

Required. The resource name of the contact whose photo will be deleted.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string sources Optional. A mask of what source types to return. Defaults to ReadSourceType.CONTACT and ReadSourceType.PROFILE if not set.

opt_param

string personFields Optional. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Defaults to empty if not set, which will skip the post mutate get. Valid values are: * addresses * ageRanges * biographies

  • birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations
  • memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined
Return values
Google_Service_PeopleService_DeleteContactPhotoResponse

get()

Provides information about a person by specifying a resource name. Use `people/me` to indicate the authenticated user. The request throws a 400 error if 'personFields' is not specified. (people.get)

public get(string $resourceName[, array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_Person
Parameters
$resourceName : string

Required. The resource name of the person to provide information about. - To get information about the authenticated user, specify people/me. - To get information about a google account, specify people/{account_id}. - To get information about a contact, specify the resource name that identifies the contact as returned by people.connections.list.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string personFields Required. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

opt_param

string sources Optional. A mask of what source types to return. Defaults to ReadSourceType.PROFILE and ReadSourceType.CONTACT if not set.

opt_param

string requestMask.includeField Required. Comma-separated list of person fields to be included in the response. Each path should start with person.: for example, person.names or person.photos.

Return values
Google_Service_PeopleService_Person

getBatchGet()

Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user.

public getBatchGet([array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_GetPeopleResponse

The request throws a 400 error if 'personFields' is not specified. (people.getBatchGet)

Parameters
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string sources Optional. A mask of what source types to return. Defaults to ReadSourceType.CONTACT and ReadSourceType.PROFILE if not set.

opt_param

string requestMask.includeField Required. Comma-separated list of person fields to be included in the response. Each path should start with person.: for example, person.names or person.photos.

opt_param

string personFields Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

opt_param

string resourceNames Required. The resource names of the people to provide information about. It's repeatable. The URL query parameter should be resourceNames==&... - To get information about the authenticated user, specify people/me. - To get information about a google account, specify people/{account_id}. - To get information about a contact, specify the resource name that identifies the contact as returned by people.connections.list. You can include up to 50 resource names in one request.

Return values
Google_Service_PeopleService_GetPeopleResponse

listDirectoryPeople()

Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. (people.listDirectoryPeople)

public listDirectoryPeople([array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_ListDirectoryPeopleResponse
Parameters
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool requestSyncToken Optional. Whether the response should include next_sync_token, which can be used to get all changes since the last request. For subsequent sync requests use the sync_token param instead.

opt_param

string syncToken Optional. A sync token, received from a previous ListDirectoryPeople call. Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to ListDirectoryPeople must match the call that provided the sync token.

opt_param

int pageSize Optional. The number of people to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.

opt_param

string sources Required. Directory sources to return.

opt_param

string readMask Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events

  • externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined
opt_param

string mergeSources Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.

opt_param

string pageToken Optional. A page token, received from a previous ListDirectoryPeople call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDirectoryPeople must match the call that provided the page token.

Return values
Google_Service_PeopleService_ListDirectoryPeopleResponse

searchDirectoryPeople()

Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.

public searchDirectoryPeople([array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_SearchDirectoryPeopleResponse

(people.searchDirectoryPeople)

Parameters
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int pageSize Optional. The number of people to include in the response. Valid values are between 1 and 500, inclusive. Defaults to 100 if not set or set to 0.

opt_param

string mergeSources Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.

opt_param

string readMask Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events

  • externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined
opt_param

string query Required. Prefix query that matches fields in the person. Does NOT use the read_mask for determining what fields to match.

opt_param

string sources Required. Directory sources to return.

opt_param

string pageToken Optional. A page token, received from a previous SearchDirectoryPeople call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchDirectoryPeople must match the call that provided the page token.

Return values
Google_Service_PeopleService_SearchDirectoryPeopleResponse

updateContact()

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 (people.updateContact)

public updateContact(string $resourceName, Google_Service_PeopleService_Person $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_Person
Parameters
$resourceName : string

The resource name for the person, assigned by the server. An ASCII string with a max length of 27 characters, in the form of people/{person_id}.

$postBody : Google_Service_PeopleService_Person
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string personFields Optional. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fields if not set. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers

  • photos * relations * sipAddresses * skills * urls * userDefined
opt_param

string sources Optional. A mask of what source types to return. Defaults to ReadSourceType.CONTACT and ReadSourceType.PROFILE if not set.

opt_param

string updatePersonFields Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All updated fields will be replaced. Valid values are: * addresses * biographies * birthdays * calendarUrls * clientData

  • emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * relations * sipAddresses * urls
  • userDefined
Return values
Google_Service_PeopleService_Person

updateContactPhoto()

Update a contact's photo. (people.updateContactPhoto)

public updateContactPhoto(string $resourceName, Google_Service_PeopleService_UpdateContactPhotoRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_PeopleService_UpdateContactPhotoResponse
Parameters
$resourceName : string

Required. Person resource name

$postBody : Google_Service_PeopleService_UpdateContactPhotoRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_PeopleService_UpdateContactPhotoResponse

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results