Class PeopleResource
The "people" collection of methods.
Inherited Members
Namespace: Google.Apis.PeopleService.v1
Assembly: Google.Apis.PeopleService.v1.dll
Syntax
public class PeopleResource
Constructors
PeopleResource(IClientService)
Constructs a new resource.
Declaration
public PeopleResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Properties
Connections
Gets the Connections resource.
Declaration
public virtual PeopleResource.ConnectionsResource Connections { get; }
Property Value
Type | Description |
---|---|
PeopleResource.ConnectionsResource |
Methods
BatchCreateContacts(BatchCreateContactsRequest)
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.
Declaration
public virtual PeopleResource.BatchCreateContactsRequest BatchCreateContacts(BatchCreateContactsRequest body)
Parameters
Type | Name | Description |
---|---|---|
BatchCreateContactsRequest | body | The body of the request. |
Returns
Type | Description |
---|---|
PeopleResource.BatchCreateContactsRequest |
BatchDeleteContacts(BatchDeleteContactsRequest)
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.
Declaration
public virtual PeopleResource.BatchDeleteContactsRequest BatchDeleteContacts(BatchDeleteContactsRequest body)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteContactsRequest | body | The body of the request. |
Returns
Type | Description |
---|---|
PeopleResource.BatchDeleteContactsRequest |
BatchUpdateContacts(BatchUpdateContactsRequest)
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.
Declaration
public virtual PeopleResource.BatchUpdateContactsRequest BatchUpdateContacts(BatchUpdateContactsRequest body)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateContactsRequest | body | The body of the request. |
Returns
Type | Description |
---|---|
PeopleResource.BatchUpdateContactsRequest |
CreateContact(Person)
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.
Declaration
public virtual PeopleResource.CreateContactRequest CreateContact(Person body)
Parameters
Type | Name | Description |
---|---|---|
Person | body | The body of the request. |
Returns
Type | Description |
---|---|
PeopleResource.CreateContactRequest |
DeleteContact(string)
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.
Declaration
public virtual PeopleResource.DeleteContactRequest DeleteContact(string resourceName)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | Required. The resource name of the contact to delete. |
Returns
Type | Description |
---|---|
PeopleResource.DeleteContactRequest |
DeleteContactPhoto(string)
Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.
Declaration
public virtual PeopleResource.DeleteContactPhotoRequest DeleteContactPhoto(string resourceName)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | Required. The resource name of the contact whose photo will be deleted. |
Returns
Type | Description |
---|---|
PeopleResource.DeleteContactPhotoRequest |
Get(string)
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.
Declaration
public virtual PeopleResource.GetRequest Get(string resourceName)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | Required. The resource name of the person to provide information about. - To get information about the
authenticated user, specify |
Returns
Type | Description |
---|---|
PeopleResource.GetRequest |
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. The request returns a 400 error if 'personFields' is not
specified.
Declaration
public virtual PeopleResource.GetBatchGetRequest GetBatchGet()
Returns
Type | Description |
---|---|
PeopleResource.GetBatchGetRequest |
ListDirectoryPeople()
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.
Declaration
public virtual PeopleResource.ListDirectoryPeopleRequest ListDirectoryPeople()
Returns
Type | Description |
---|---|
PeopleResource.ListDirectoryPeopleRequest |
SearchContacts()
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
Declaration
public virtual PeopleResource.SearchContactsRequest SearchContacts()
Returns
Type | Description |
---|---|
PeopleResource.SearchContactsRequest |
SearchDirectoryPeople()
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.
Declaration
public virtual PeopleResource.SearchDirectoryPeopleRequest SearchDirectoryPeople()
Returns
Type | Description |
---|---|
PeopleResource.SearchDirectoryPeopleRequest |
UpdateContact(Person, string)
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.
Declaration
public virtual PeopleResource.UpdateContactRequest UpdateContact(Person body, string resourceName)
Parameters
Type | Name | Description |
---|---|---|
Person | body | The body of the request. |
string | resourceName | The resource name for the person, assigned by the server. An ASCII string in the form of
|
Returns
Type | Description |
---|---|
PeopleResource.UpdateContactRequest |
UpdateContactPhoto(UpdateContactPhotoRequest, string)
Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
Declaration
public virtual PeopleResource.UpdateContactPhotoRequest UpdateContactPhoto(UpdateContactPhotoRequest body, string resourceName)
Parameters
Type | Name | Description |
---|---|---|
UpdateContactPhotoRequest | body | The body of the request. |
string | resourceName | Required. Person resource name |
Returns
Type | Description |
---|---|
PeopleResource.UpdateContactPhotoRequest |