Class: Google::Apis::PeopleV1::PeopleServiceService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::PeopleV1::PeopleServiceService
- Defined in:
- lib/google/apis/people_v1/service.rb
Overview
People API
Provides access to information about profiles and contacts.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_contact_group_get(group_fields: nil, max_members: nil, resource_names: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::BatchGetContactGroupsResponse
Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.
-
#batch_person_create_contacts(batch_create_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::BatchCreateContactsResponse
Create a batch of new contacts and return the PersonResponses for the newly created contacts.
-
#batch_person_delete_contacts(batch_delete_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Empty
Delete a batch of contacts.
-
#batch_person_update_contacts(batch_update_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::BatchUpdateContactsResponse
Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts.
-
#copy_other_contact_to_my_contacts_group(resource_name, copy_other_contact_to_my_contacts_group_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Person
Copies an "Other contact" to a new contact in the user's "myContacts" group.
-
#create_contact_group(create_contact_group_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ContactGroup
Create a new contact group owned by the authenticated user.
-
#create_person_contact(person_object = nil, person_fields: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Person
Create a new contact and return the person resource for that contact.
-
#delete_contact_group(resource_name, delete_contacts: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Empty
Delete an existing contact group owned by the authenticated user by specifying a contact group resource name.
-
#delete_person_contact(resource_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Empty
Delete a contact person.
-
#delete_person_contact_photo(resource_name, person_fields: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::DeleteContactPhotoResponse
Delete a contact's photo.
-
#get_contact_group(resource_name, group_fields: nil, max_members: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ContactGroup
Get a specific contact group owned by the authenticated user by specifying a contact group resource name.
-
#get_people(person_fields: nil, request_mask_include_field: nil, resource_names: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::GetPeopleResponse
Provides information about a list of specific people by specifying a list of requested resource names.
-
#get_person(resource_name, person_fields: nil, request_mask_include_field: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Person
Provides information about a person by specifying a resource name.
-
#initialize ⇒ PeopleServiceService
constructor
A new instance of PeopleServiceService.
-
#list_contact_groups(group_fields: nil, page_size: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListContactGroupsResponse
List all contact groups owned by the authenticated user.
-
#list_other_contacts(page_size: nil, page_token: nil, read_mask: nil, request_sync_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListOtherContactsResponse
List all "Other contacts", that is contacts that are not in a contact group.
-
#list_person_connections(resource_name, page_size: nil, page_token: nil, person_fields: nil, request_mask_include_field: nil, request_sync_token: nil, sort_order: nil, sources: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListConnectionsResponse
Provides a list of the authenticated user's contacts.
-
#list_person_directory_people(merge_sources: nil, page_size: nil, page_token: nil, read_mask: nil, request_sync_token: nil, sources: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListDirectoryPeopleResponse
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory.
-
#modify_contact_group_members(resource_name, modify_contact_group_members_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ModifyContactGroupMembersResponse
Modify the members of a contact group owned by the authenticated user.
-
#search_other_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::SearchResponse
Provides a list of contacts in the authenticated user's other contacts that matches the search query.
-
#search_person_contacts(page_size: nil, query: nil, read_mask: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::SearchResponse
Provides a list of contacts in the authenticated user's grouped contacts that matches the search query.
-
#search_person_directory_people(merge_sources: nil, page_size: nil, page_token: nil, query: nil, read_mask: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::SearchDirectoryPeopleResponse
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.
-
#update_contact_group(resource_name, update_contact_group_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ContactGroup
Update the name of an existing contact group owned by the authenticated user.
-
#update_person_contact(resource_name, person_object = nil, person_fields: nil, sources: nil, update_person_fields: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Person
Update contact data for an existing contact person.
-
#update_person_contact_photo(resource_name, update_contact_photo_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::UpdateContactPhotoResponse
Update a contact's photo.
Constructor Details
#initialize ⇒ PeopleServiceService
Returns a new instance of PeopleServiceService.
45 46 47 48 49 50 |
# File 'lib/google/apis/people_v1/service.rb', line 45 def initialize super('https://people.googleapis.com/', '', client_name: 'google-apis-people_v1', client_version: Google::Apis::PeopleV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
38 39 40 |
# File 'lib/google/apis/people_v1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
43 44 45 |
# File 'lib/google/apis/people_v1/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#batch_contact_group_get(group_fields: nil, max_members: nil, resource_names: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::BatchGetContactGroupsResponse
Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/google/apis/people_v1/service.rb', line 82 def batch_contact_group_get(group_fields: nil, max_members: nil, resource_names: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/contactGroups:batchGet', ) command.response_representation = Google::Apis::PeopleV1::BatchGetContactGroupsResponse::Representation command.response_class = Google::Apis::PeopleV1::BatchGetContactGroupsResponse command.query['groupFields'] = group_fields unless group_fields.nil? command.query['maxMembers'] = max_members unless max_members.nil? command.query['resourceNames'] = resource_names unless resource_names.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_person_create_contacts(batch_create_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::BatchCreateContactsResponse
Create a batch of new contacts and return the PersonResponses for the newly created contacts. Limited to 10 parallel requests per user.
481 482 483 484 485 486 487 488 489 490 |
# File 'lib/google/apis/people_v1/service.rb', line 481 def batch_person_create_contacts(batch_create_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/people:batchCreateContacts', ) command.request_representation = Google::Apis::PeopleV1::BatchCreateContactsRequest::Representation command.request_object = batch_create_contacts_request_object command.response_representation = Google::Apis::PeopleV1::BatchCreateContactsResponse::Representation command.response_class = Google::Apis::PeopleV1::BatchCreateContactsResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_person_delete_contacts(batch_delete_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Empty
Delete a batch of contacts. Any non-contact data will not be deleted. Limited to 10 parallel requests per user.
512 513 514 515 516 517 518 519 520 521 |
# File 'lib/google/apis/people_v1/service.rb', line 512 def batch_person_delete_contacts(batch_delete_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/people:batchDeleteContacts', ) command.request_representation = Google::Apis::PeopleV1::BatchDeleteContactsRequest::Representation command.request_object = batch_delete_contacts_request_object command.response_representation = Google::Apis::PeopleV1::Empty::Representation command.response_class = Google::Apis::PeopleV1::Empty command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_person_update_contacts(batch_update_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::BatchUpdateContactsResponse
Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Limited to 10 parallel requests per user.
544 545 546 547 548 549 550 551 552 553 |
# File 'lib/google/apis/people_v1/service.rb', line 544 def batch_person_update_contacts(batch_update_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/people:batchUpdateContacts', ) command.request_representation = Google::Apis::PeopleV1::BatchUpdateContactsRequest::Representation command.request_object = batch_update_contacts_request_object command.response_representation = Google::Apis::PeopleV1::BatchUpdateContactsResponse::Representation command.response_class = Google::Apis::PeopleV1::BatchUpdateContactsResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#copy_other_contact_to_my_contacts_group(resource_name, copy_other_contact_to_my_contacts_group_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Person
Copies an "Other contact" to a new contact in the user's "myContacts" group
342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/google/apis/people_v1/service.rb', line 342 def copy_other_contact_to_my_contacts_group(resource_name, copy_other_contact_to_my_contacts_group_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resourceName}:copyOtherContactToMyContactsGroup', ) command.request_representation = Google::Apis::PeopleV1::CopyOtherContactToMyContactsGroupRequest::Representation command.request_object = copy_other_contact_to_my_contacts_group_request_object command.response_representation = Google::Apis::PeopleV1::Person::Representation command.response_class = Google::Apis::PeopleV1::Person command.params['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_contact_group(create_contact_group_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ContactGroup
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.
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/google/apis/people_v1/service.rb', line 115 def create_contact_group(create_contact_group_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/contactGroups', ) command.request_representation = Google::Apis::PeopleV1::CreateContactGroupRequest::Representation command.request_object = create_contact_group_request_object command.response_representation = Google::Apis::PeopleV1::ContactGroup::Representation command.response_class = Google::Apis::PeopleV1::ContactGroup command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_person_contact(person_object = nil, person_fields: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::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
589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/google/apis/people_v1/service.rb', line 589 def create_person_contact(person_object = nil, person_fields: nil, sources: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/people:createContact', ) command.request_representation = Google::Apis::PeopleV1::Person::Representation command.request_object = person_object command.response_representation = Google::Apis::PeopleV1::Person::Representation command.response_class = Google::Apis::PeopleV1::Person command.query['personFields'] = person_fields unless person_fields.nil? command.query['sources'] = sources unless sources.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_contact_group(resource_name, delete_contacts: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Empty
Delete an existing contact group owned by the authenticated user by specifying a contact group resource name.
149 150 151 152 153 154 155 156 157 158 |
# File 'lib/google/apis/people_v1/service.rb', line 149 def delete_contact_group(resource_name, delete_contacts: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+resourceName}', ) command.response_representation = Google::Apis::PeopleV1::Empty::Representation command.response_class = Google::Apis::PeopleV1::Empty command.params['resourceName'] = resource_name unless resource_name.nil? command.query['deleteContacts'] = delete_contacts unless delete_contacts.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_person_contact(resource_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Empty
Delete a contact person. Any non-contact data will not be deleted.
622 623 624 625 626 627 628 629 630 |
# File 'lib/google/apis/people_v1/service.rb', line 622 def delete_person_contact(resource_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+resourceName}:deleteContact', ) command.response_representation = Google::Apis::PeopleV1::Empty::Representation command.response_class = Google::Apis::PeopleV1::Empty command.params['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_person_contact_photo(resource_name, person_fields: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::DeleteContactPhotoResponse
Delete a contact's photo.
664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/google/apis/people_v1/service.rb', line 664 def delete_person_contact_photo(resource_name, person_fields: nil, sources: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+resourceName}:deleteContactPhoto', ) command.response_representation = Google::Apis::PeopleV1::DeleteContactPhotoResponse::Representation command.response_class = Google::Apis::PeopleV1::DeleteContactPhotoResponse command.params['resourceName'] = resource_name unless resource_name.nil? command.query['personFields'] = person_fields unless person_fields.nil? command.query['sources'] = sources unless sources.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_contact_group(resource_name, group_fields: nil, max_members: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ContactGroup
Get a specific contact group owned by the authenticated user by specifying a contact group resource name.
189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/google/apis/people_v1/service.rb', line 189 def get_contact_group(resource_name, group_fields: nil, max_members: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resourceName}', ) command.response_representation = Google::Apis::PeopleV1::ContactGroup::Representation command.response_class = Google::Apis::PeopleV1::ContactGroup command.params['resourceName'] = resource_name unless resource_name.nil? command.query['groupFields'] = group_fields unless group_fields.nil? command.query['maxMembers'] = max_members unless max_members.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_people(person_fields: nil, request_mask_include_field: nil, resource_names: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::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.
The request returns a 400 error if 'personFields' is not specified.
775 776 777 778 779 780 781 782 783 784 785 786 |
# File 'lib/google/apis/people_v1/service.rb', line 775 def get_people(person_fields: nil, request_mask_include_field: nil, resource_names: nil, sources: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/people:batchGet', ) command.response_representation = Google::Apis::PeopleV1::GetPeopleResponse::Representation command.response_class = Google::Apis::PeopleV1::GetPeopleResponse command.query['personFields'] = person_fields unless person_fields.nil? command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['resourceNames'] = resource_names unless resource_names.nil? command.query['sources'] = sources unless sources.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_person(resource_name, person_fields: nil, request_mask_include_field: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::Person
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.
718 719 720 721 722 723 724 725 726 727 728 729 |
# File 'lib/google/apis/people_v1/service.rb', line 718 def get_person(resource_name, person_fields: nil, request_mask_include_field: nil, sources: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resourceName}', ) command.response_representation = Google::Apis::PeopleV1::Person::Representation command.response_class = Google::Apis::PeopleV1::Person command.params['resourceName'] = resource_name unless resource_name.nil? command.query['personFields'] = person_fields unless person_fields.nil? command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['sources'] = sources unless sources.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_contact_groups(group_fields: nil, page_size: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListContactGroupsResponse
List all contact groups owned by the authenticated user. Members of the contact groups are not populated.
235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/google/apis/people_v1/service.rb', line 235 def list_contact_groups(group_fields: nil, page_size: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/contactGroups', ) command.response_representation = Google::Apis::PeopleV1::ListContactGroupsResponse::Representation command.response_class = Google::Apis::PeopleV1::ListContactGroupsResponse command.query['groupFields'] = group_fields unless group_fields.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['syncToken'] = sync_token unless sync_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_other_contacts(page_size: nil, page_token: nil, read_mask: nil, request_sync_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListOtherContactsResponse
List all "Other contacts", that is contacts that are not in a contact group. " Other contacts" are typically auto created contacts from interactions.
400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/google/apis/people_v1/service.rb', line 400 def list_other_contacts(page_size: nil, page_token: nil, read_mask: nil, request_sync_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/otherContacts', ) command.response_representation = Google::Apis::PeopleV1::ListOtherContactsResponse::Representation command.response_class = Google::Apis::PeopleV1::ListOtherContactsResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['readMask'] = read_mask unless read_mask.nil? command.query['requestSyncToken'] = request_sync_token unless request_sync_token.nil? command.query['syncToken'] = sync_token unless sync_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_person_connections(resource_name, page_size: nil, page_token: nil, person_fields: nil, request_mask_include_field: nil, request_sync_token: nil, sort_order: nil, sources: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListConnectionsResponse
Provides a list of the authenticated user's contacts. The request returns a
400 error if personFields is not specified. The request returns a 410 error
if sync_token is specified and is expired. Sync tokens expire after 7 days
to prevent data drift between clients and the server. To handle a sync token
expired error, a request should be sent without sync_token to get all
contacts.
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 |
# File 'lib/google/apis/people_v1/service.rb', line 1138 def list_person_connections(resource_name, page_size: nil, page_token: nil, person_fields: nil, request_mask_include_field: nil, request_sync_token: nil, sort_order: nil, sources: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resourceName}/connections', ) command.response_representation = Google::Apis::PeopleV1::ListConnectionsResponse::Representation command.response_class = Google::Apis::PeopleV1::ListConnectionsResponse command.params['resourceName'] = resource_name unless resource_name.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['personFields'] = person_fields unless person_fields.nil? command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['requestSyncToken'] = request_sync_token unless request_sync_token.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['sources'] = sources unless sources.nil? command.query['syncToken'] = sync_token unless sync_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_person_directory_people(merge_sources: nil, page_size: nil, page_token: nil, read_mask: nil, request_sync_token: nil, sources: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ListDirectoryPeopleResponse
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory.
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 |
# File 'lib/google/apis/people_v1/service.rb', line 837 def list_person_directory_people(merge_sources: nil, page_size: nil, page_token: nil, read_mask: nil, request_sync_token: nil, sources: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/people:listDirectoryPeople', ) command.response_representation = Google::Apis::PeopleV1::ListDirectoryPeopleResponse::Representation command.response_class = Google::Apis::PeopleV1::ListDirectoryPeopleResponse command.query['mergeSources'] = merge_sources unless merge_sources.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['readMask'] = read_mask unless read_mask.nil? command.query['requestSyncToken'] = request_sync_token unless request_sync_token.nil? command.query['sources'] = sources unless sources.nil? command.query['syncToken'] = sync_token unless sync_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#modify_contact_group_members(resource_name, modify_contact_group_members_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ModifyContactGroupMembersResponse
Modify the members of a contact group owned by the authenticated user. The
only system contact groups that can have members added are contactGroups/
myContacts and contactGroups/starred. Other system contact groups are
deprecated and can only have contacts removed.
309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/google/apis/people_v1/service.rb', line 309 def modify_contact_group_members(resource_name, modify_contact_group_members_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resourceName}/members:modify', ) command.request_representation = Google::Apis::PeopleV1::ModifyContactGroupMembersRequest::Representation command.request_object = modify_contact_group_members_request_object command.response_representation = Google::Apis::PeopleV1::ModifyContactGroupMembersResponse::Representation command.response_class = Google::Apis::PeopleV1::ModifyContactGroupMembersResponse command.params['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_other_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::SearchResponse
Provides a list of contacts in the authenticated user's other contacts that
matches the search query. The query matches on a contact's names,
emailAddresses, and phoneNumbers fields that are from the OTHER_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/other-contacts#search_the_users_other_contacts
449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/google/apis/people_v1/service.rb', line 449 def search_other_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/otherContacts:search', ) command.response_representation = Google::Apis::PeopleV1::SearchResponse::Representation command.response_class = Google::Apis::PeopleV1::SearchResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['query'] = query unless query.nil? command.query['readMask'] = read_mask unless read_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_person_contacts(page_size: nil, query: nil, read_mask: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::SearchResponse
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
895 896 897 898 899 900 901 902 903 904 905 906 |
# File 'lib/google/apis/people_v1/service.rb', line 895 def search_person_contacts(page_size: nil, query: nil, read_mask: nil, sources: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/people:searchContacts', ) command.response_representation = Google::Apis::PeopleV1::SearchResponse::Representation command.response_class = Google::Apis::PeopleV1::SearchResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['query'] = query unless query.nil? command.query['readMask'] = read_mask unless read_mask.nil? command.query['sources'] = sources unless sources.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_person_directory_people(merge_sources: nil, page_size: nil, page_token: nil, query: nil, read_mask: nil, sources: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::SearchDirectoryPeopleResponse
Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.
951 952 953 954 955 956 957 958 959 960 961 962 963 964 |
# File 'lib/google/apis/people_v1/service.rb', line 951 def search_person_directory_people(merge_sources: nil, page_size: nil, page_token: nil, query: nil, read_mask: nil, sources: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/people:searchDirectoryPeople', ) command.response_representation = Google::Apis::PeopleV1::SearchDirectoryPeopleResponse::Representation command.response_class = Google::Apis::PeopleV1::SearchDirectoryPeopleResponse command.query['mergeSources'] = merge_sources unless merge_sources.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['query'] = query unless query.nil? command.query['readMask'] = read_mask unless read_mask.nil? command.query['sources'] = sources unless sources.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_contact_group(resource_name, update_contact_group_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::ContactGroup
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.
273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/google/apis/people_v1/service.rb', line 273 def update_contact_group(resource_name, update_contact_group_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1/{+resourceName}', ) command.request_representation = Google::Apis::PeopleV1::UpdateContactGroupRequest::Representation command.request_object = update_contact_group_request_object command.response_representation = Google::Apis::PeopleV1::ContactGroup::Representation command.response_class = Google::Apis::PeopleV1::ContactGroup command.params['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_person_contact(resource_name, person_object = nil, person_fields: nil, sources: nil, update_person_fields: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::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
1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'lib/google/apis/people_v1/service.rb', line 1020 def update_person_contact(resource_name, person_object = nil, person_fields: nil, sources: nil, update_person_fields: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+resourceName}:updateContact', ) command.request_representation = Google::Apis::PeopleV1::Person::Representation command.request_object = person_object command.response_representation = Google::Apis::PeopleV1::Person::Representation command.response_class = Google::Apis::PeopleV1::Person command.params['resourceName'] = resource_name unless resource_name.nil? command.query['personFields'] = person_fields unless person_fields.nil? command.query['sources'] = sources unless sources.nil? command.query['updatePersonFields'] = update_person_fields unless update_person_fields.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_person_contact_photo(resource_name, update_contact_photo_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PeopleV1::UpdateContactPhotoResponse
Update a contact's photo.
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 |
# File 'lib/google/apis/people_v1/service.rb', line 1056 def update_person_contact_photo(resource_name, update_contact_photo_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+resourceName}:updateContactPhoto', ) command.request_representation = Google::Apis::PeopleV1::UpdateContactPhotoRequest::Representation command.request_object = update_contact_photo_request_object command.response_representation = Google::Apis::PeopleV1::UpdateContactPhotoResponse::Representation command.response_class = Google::Apis::PeopleV1::UpdateContactPhotoResponse command.params['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |