Class PeopleResource
The "people" collection of methods.
Inheritance
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 |
|---|---|---|
| Google.Apis.Services.IClientService | service |
Properties
Connections
Gets the Connections resource.
Declaration
public virtual PeopleResource.ConnectionsResource Connections { get; }
Property Value
| Type | Description |
|---|---|
| PeopleResource.ConnectionsResource |
Methods
CreateContact(Person)
Create a new contact and return the person resource for that contact.
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.
Declaration
public virtual PeopleResource.DeleteContactRequest DeleteContact(string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceName | Required. The resource name of the contact to delete. |
Returns
| Type | Description |
|---|---|
| PeopleResource.DeleteContactRequest |
DeleteContactPhoto(String)
Delete a contact's photo.
Declaration
public virtual PeopleResource.DeleteContactPhotoRequest DeleteContactPhoto(string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.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 throws a 400 error if 'personFields' is not specified.
Declaration
public virtual PeopleResource.GetRequest Get(string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceName | Required. The resource name of the person to provide information about.
|
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 throws a 400 error if 'personFields' is not specified.
Declaration
public virtual PeopleResource.GetBatchGetRequest GetBatchGet()
Returns
| Type | Description |
|---|---|
| PeopleResource.GetBatchGetRequest |
UpdateContact(Person, String)
Update contact data for an existing contact person. Any non-contact data will not be modified.
The request throws a 400 error if updatePersonFields is not specified.
The request throws a 400 error if person.metadata.sources is not specified for the contact to be updated.
The request throws a 400 error with an 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 re-apply their updates to the latest
person.
Declaration
public virtual PeopleResource.UpdateContactRequest UpdateContact(Person body, string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| Person | body | The body of the request. |
| System.String | resourceName | The resource name for the person, assigned by the server. An ASCII string with a max
length of 27 characters, in the form of |
Returns
| Type | Description |
|---|---|
| PeopleResource.UpdateContactRequest |
UpdateContactPhoto(UpdateContactPhotoRequest, String)
Update a contact's photo.
Declaration
public virtual PeopleResource.UpdateContactPhotoRequest UpdateContactPhoto(UpdateContactPhotoRequest body, string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateContactPhotoRequest | body | The body of the request. |
| System.String | resourceName | Required. Person resource name |
Returns
| Type | Description |
|---|---|
| PeopleResource.UpdateContactPhotoRequest |