google-apis-people_v1 0.4.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/google/apis/people_v1.rb +1 -1
- data/lib/google/apis/people_v1/classes.rb +182 -1
- data/lib/google/apis/people_v1/gem_version.rb +3 -3
- data/lib/google/apis/people_v1/representations.rb +89 -0
- data/lib/google/apis/people_v1/service.rb +108 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abc7aff9bafebe345b0b19c4797e1687a15c5d2a6173da1898ea6609a9a73c8f
|
4
|
+
data.tar.gz: a212950118a793824a2f5b2fbbad70df97045d0266cbb14af2f05967c37a6426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cc0d9fcb5fc33348b172b056c7e6f6c334b1bba5f8f18a14d4a0ec78c980836849e74478b592bd926a99e8165ac9ff54055fbd76ed08055d6b27d2608813df7
|
7
|
+
data.tar.gz: 24bb8e2163dad4bd1bd7c73ceccbe66f3d6641c11f86c676178f4ca167b35696ab7eea91b0d56b88f028a7aaeb8aeefe3de89e8c2eafcade99fd2ed5477757fa
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Release history for google-apis-people_v1
|
2
2
|
|
3
|
+
### v0.9.0 (2021-04-21)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210419
|
6
|
+
|
7
|
+
### v0.8.0 (2021-03-31)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210330
|
10
|
+
|
11
|
+
### v0.7.0 (2021-03-24)
|
12
|
+
|
13
|
+
* Regenerated from discovery document revision 20210322
|
14
|
+
|
15
|
+
### v0.6.0 (2021-03-16)
|
16
|
+
|
17
|
+
* Regenerated from discovery document revision 20210315
|
18
|
+
* Regenerated using generator version 0.2.0
|
19
|
+
|
20
|
+
### v0.5.0 (2021-03-04)
|
21
|
+
|
22
|
+
* Regenerated from discovery document revision 20210302
|
23
|
+
|
3
24
|
### v0.4.0 (2021-02-24)
|
4
25
|
|
5
26
|
* Regenerated from discovery document revision 20210223
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
# See and download your personal phone numbers
|
60
60
|
AUTH_USER_PHONENUMBERS_READ = 'https://www.googleapis.com/auth/user.phonenumbers.read'
|
61
61
|
|
62
|
-
#
|
62
|
+
# See your primary Google Account email address
|
63
63
|
AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
|
64
64
|
|
65
65
|
# See your personal info, including any personal info you've made publicly available
|
@@ -137,6 +137,85 @@ module Google
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
+
# A request to create a batch of contacts.
|
141
|
+
class BatchCreateContactsRequest
|
142
|
+
include Google::Apis::Core::Hashable
|
143
|
+
|
144
|
+
# Required. The contact to create. Allows up to 200 contacts in a single request.
|
145
|
+
# Corresponds to the JSON property `contacts`
|
146
|
+
# @return [Array<Google::Apis::PeopleV1::ContactToCreate>]
|
147
|
+
attr_accessor :contacts
|
148
|
+
|
149
|
+
# Required. A field mask to restrict which fields on each person are returned in
|
150
|
+
# the response. Multiple fields can be specified by separating them with commas.
|
151
|
+
# If read mask is left empty, the post-mutate-get is skipped and no data will be
|
152
|
+
# returned in the response. Valid values are: * addresses * ageRanges *
|
153
|
+
# biographies * birthdays * calendarUrls * clientData * coverPhotos *
|
154
|
+
# emailAddresses * events * externalIds * genders * imClients * interests *
|
155
|
+
# locales * locations * memberships * metadata * miscKeywords * names *
|
156
|
+
# nicknames * occupations * organizations * phoneNumbers * photos * relations *
|
157
|
+
# sipAddresses * skills * urls * userDefined
|
158
|
+
# Corresponds to the JSON property `readMask`
|
159
|
+
# @return [String]
|
160
|
+
attr_accessor :read_mask
|
161
|
+
|
162
|
+
# Optional. A mask of what source types to return in the post mutate read.
|
163
|
+
# Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
|
164
|
+
# Corresponds to the JSON property `sources`
|
165
|
+
# @return [Array<String>]
|
166
|
+
attr_accessor :sources
|
167
|
+
|
168
|
+
def initialize(**args)
|
169
|
+
update!(**args)
|
170
|
+
end
|
171
|
+
|
172
|
+
# Update properties of this object
|
173
|
+
def update!(**args)
|
174
|
+
@contacts = args[:contacts] if args.key?(:contacts)
|
175
|
+
@read_mask = args[:read_mask] if args.key?(:read_mask)
|
176
|
+
@sources = args[:sources] if args.key?(:sources)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# The response to a request to create a batch of contacts.
|
181
|
+
class BatchCreateContactsResponse
|
182
|
+
include Google::Apis::Core::Hashable
|
183
|
+
|
184
|
+
# The contacts that were created, unless the request `read_mask` is empty.
|
185
|
+
# Corresponds to the JSON property `createdPeople`
|
186
|
+
# @return [Array<Google::Apis::PeopleV1::PersonResponse>]
|
187
|
+
attr_accessor :created_people
|
188
|
+
|
189
|
+
def initialize(**args)
|
190
|
+
update!(**args)
|
191
|
+
end
|
192
|
+
|
193
|
+
# Update properties of this object
|
194
|
+
def update!(**args)
|
195
|
+
@created_people = args[:created_people] if args.key?(:created_people)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
# A request to delete a batch of existing contacts.
|
200
|
+
class BatchDeleteContactsRequest
|
201
|
+
include Google::Apis::Core::Hashable
|
202
|
+
|
203
|
+
# Required. The resource names of the contact to delete. It's repeatable. Allows
|
204
|
+
# up to 500 resource names in a single request.
|
205
|
+
# Corresponds to the JSON property `resourceNames`
|
206
|
+
# @return [Array<String>]
|
207
|
+
attr_accessor :resource_names
|
208
|
+
|
209
|
+
def initialize(**args)
|
210
|
+
update!(**args)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Update properties of this object
|
214
|
+
def update!(**args)
|
215
|
+
@resource_names = args[:resource_names] if args.key?(:resource_names)
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
140
219
|
# The response to a batch get contact groups request.
|
141
220
|
class BatchGetContactGroupsResponse
|
142
221
|
include Google::Apis::Core::Hashable
|
@@ -156,6 +235,80 @@ module Google
|
|
156
235
|
end
|
157
236
|
end
|
158
237
|
|
238
|
+
# A request to update a batch of contacts.
|
239
|
+
class BatchUpdateContactsRequest
|
240
|
+
include Google::Apis::Core::Hashable
|
241
|
+
|
242
|
+
# Required. A map of resource names to the person data to be updated. Allows up
|
243
|
+
# to 200 contacts in a single request.
|
244
|
+
# Corresponds to the JSON property `contacts`
|
245
|
+
# @return [Hash<String,Google::Apis::PeopleV1::Person>]
|
246
|
+
attr_accessor :contacts
|
247
|
+
|
248
|
+
# Required. A field mask to restrict which fields on each person are returned.
|
249
|
+
# Multiple fields can be specified by separating them with commas. If read mask
|
250
|
+
# is left empty, the post-mutate-get is skipped and no data will be returned in
|
251
|
+
# the response. Valid values are: * addresses * ageRanges * biographies *
|
252
|
+
# birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events *
|
253
|
+
# externalIds * genders * imClients * interests * locales * locations *
|
254
|
+
# memberships * metadata * miscKeywords * names * nicknames * occupations *
|
255
|
+
# organizations * phoneNumbers * photos * relations * sipAddresses * skills *
|
256
|
+
# urls * userDefined
|
257
|
+
# Corresponds to the JSON property `readMask`
|
258
|
+
# @return [String]
|
259
|
+
attr_accessor :read_mask
|
260
|
+
|
261
|
+
# Optional. A mask of what source types to return. Defaults to
|
262
|
+
# READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
|
263
|
+
# Corresponds to the JSON property `sources`
|
264
|
+
# @return [Array<String>]
|
265
|
+
attr_accessor :sources
|
266
|
+
|
267
|
+
# Required. A field mask to restrict which fields on the person are updated.
|
268
|
+
# Multiple fields can be specified by separating them with commas. All specified
|
269
|
+
# fields will be replaced, or cleared if left empty for each person. Valid
|
270
|
+
# values are: * addresses * biographies * birthdays * calendarUrls * clientData *
|
271
|
+
# emailAddresses * events * externalIds * genders * imClients * interests *
|
272
|
+
# locales * locations * memberships * miscKeywords * names * nicknames *
|
273
|
+
# occupations * organizations * phoneNumbers * relations * sipAddresses * urls *
|
274
|
+
# userDefined
|
275
|
+
# Corresponds to the JSON property `updateMask`
|
276
|
+
# @return [String]
|
277
|
+
attr_accessor :update_mask
|
278
|
+
|
279
|
+
def initialize(**args)
|
280
|
+
update!(**args)
|
281
|
+
end
|
282
|
+
|
283
|
+
# Update properties of this object
|
284
|
+
def update!(**args)
|
285
|
+
@contacts = args[:contacts] if args.key?(:contacts)
|
286
|
+
@read_mask = args[:read_mask] if args.key?(:read_mask)
|
287
|
+
@sources = args[:sources] if args.key?(:sources)
|
288
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
# The response to a request to create a batch of contacts.
|
293
|
+
class BatchUpdateContactsResponse
|
294
|
+
include Google::Apis::Core::Hashable
|
295
|
+
|
296
|
+
# A map of resource names to the contacts that were updated, unless the request `
|
297
|
+
# read_mask` is empty.
|
298
|
+
# Corresponds to the JSON property `updateResult`
|
299
|
+
# @return [Hash<String,Google::Apis::PeopleV1::PersonResponse>]
|
300
|
+
attr_accessor :update_result
|
301
|
+
|
302
|
+
def initialize(**args)
|
303
|
+
update!(**args)
|
304
|
+
end
|
305
|
+
|
306
|
+
# Update properties of this object
|
307
|
+
def update!(**args)
|
308
|
+
@update_result = args[:update_result] if args.key?(:update_result)
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
159
312
|
# A person's short biography.
|
160
313
|
class Biography
|
161
314
|
include Google::Apis::Core::Hashable
|
@@ -492,6 +645,28 @@ module Google
|
|
492
645
|
end
|
493
646
|
end
|
494
647
|
|
648
|
+
# A wrapper that contains the person data to populate a newly created source.
|
649
|
+
class ContactToCreate
|
650
|
+
include Google::Apis::Core::Hashable
|
651
|
+
|
652
|
+
# Information about a person merged from various data sources such as the
|
653
|
+
# authenticated user's contacts and profile data. Most fields can have multiple
|
654
|
+
# items. The items in a field have no guaranteed order, but each non-empty field
|
655
|
+
# is guaranteed to have exactly one field with `metadata.primary` set to true.
|
656
|
+
# Corresponds to the JSON property `contactPerson`
|
657
|
+
# @return [Google::Apis::PeopleV1::Person]
|
658
|
+
attr_accessor :contact_person
|
659
|
+
|
660
|
+
def initialize(**args)
|
661
|
+
update!(**args)
|
662
|
+
end
|
663
|
+
|
664
|
+
# Update properties of this object
|
665
|
+
def update!(**args)
|
666
|
+
@contact_person = args[:contact_person] if args.key?(:contact_person)
|
667
|
+
end
|
668
|
+
end
|
669
|
+
|
495
670
|
# A request to copy an "Other contact" to my contacts group.
|
496
671
|
class CopyOtherContactToMyContactsGroupRequest
|
497
672
|
include Google::Apis::Core::Hashable
|
@@ -945,7 +1120,7 @@ module Google
|
|
945
1120
|
end
|
946
1121
|
|
947
1122
|
# Arbitrary client data that is populated by clients. Duplicate keys and values
|
948
|
-
# are allowed.
|
1123
|
+
# are allowed.
|
949
1124
|
class GroupClientData
|
950
1125
|
include Google::Apis::Core::Hashable
|
951
1126
|
|
@@ -1189,6 +1364,11 @@ module Google
|
|
1189
1364
|
# @return [Array<Google::Apis::PeopleV1::Person>]
|
1190
1365
|
attr_accessor :other_contacts
|
1191
1366
|
|
1367
|
+
# The total number of other contacts in the list without pagination.
|
1368
|
+
# Corresponds to the JSON property `totalSize`
|
1369
|
+
# @return [Fixnum]
|
1370
|
+
attr_accessor :total_size
|
1371
|
+
|
1192
1372
|
def initialize(**args)
|
1193
1373
|
update!(**args)
|
1194
1374
|
end
|
@@ -1198,6 +1378,7 @@ module Google
|
|
1198
1378
|
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1199
1379
|
@next_sync_token = args[:next_sync_token] if args.key?(:next_sync_token)
|
1200
1380
|
@other_contacts = args[:other_contacts] if args.key?(:other_contacts)
|
1381
|
+
@total_size = args[:total_size] if args.key?(:total_size)
|
1201
1382
|
end
|
1202
1383
|
end
|
1203
1384
|
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module PeopleV1
|
18
18
|
# Version of the google-apis-people_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.9.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210419"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -34,12 +34,42 @@ module Google
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
35
35
|
end
|
36
36
|
|
37
|
+
class BatchCreateContactsRequest
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class BatchCreateContactsResponse
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class BatchDeleteContactsRequest
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
37
55
|
class BatchGetContactGroupsResponse
|
38
56
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
57
|
|
40
58
|
include Google::Apis::Core::JsonObjectSupport
|
41
59
|
end
|
42
60
|
|
61
|
+
class BatchUpdateContactsRequest
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class BatchUpdateContactsResponse
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
43
73
|
class Biography
|
44
74
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
75
|
|
@@ -94,6 +124,12 @@ module Google
|
|
94
124
|
include Google::Apis::Core::JsonObjectSupport
|
95
125
|
end
|
96
126
|
|
127
|
+
class ContactToCreate
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
+
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
131
|
+
end
|
132
|
+
|
97
133
|
class CopyOtherContactToMyContactsGroupRequest
|
98
134
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
135
|
|
@@ -446,6 +482,31 @@ module Google
|
|
446
482
|
end
|
447
483
|
end
|
448
484
|
|
485
|
+
class BatchCreateContactsRequest
|
486
|
+
# @private
|
487
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
488
|
+
collection :contacts, as: 'contacts', class: Google::Apis::PeopleV1::ContactToCreate, decorator: Google::Apis::PeopleV1::ContactToCreate::Representation
|
489
|
+
|
490
|
+
property :read_mask, as: 'readMask'
|
491
|
+
collection :sources, as: 'sources'
|
492
|
+
end
|
493
|
+
end
|
494
|
+
|
495
|
+
class BatchCreateContactsResponse
|
496
|
+
# @private
|
497
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
498
|
+
collection :created_people, as: 'createdPeople', class: Google::Apis::PeopleV1::PersonResponse, decorator: Google::Apis::PeopleV1::PersonResponse::Representation
|
499
|
+
|
500
|
+
end
|
501
|
+
end
|
502
|
+
|
503
|
+
class BatchDeleteContactsRequest
|
504
|
+
# @private
|
505
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
506
|
+
collection :resource_names, as: 'resourceNames'
|
507
|
+
end
|
508
|
+
end
|
509
|
+
|
449
510
|
class BatchGetContactGroupsResponse
|
450
511
|
# @private
|
451
512
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -454,6 +515,25 @@ module Google
|
|
454
515
|
end
|
455
516
|
end
|
456
517
|
|
518
|
+
class BatchUpdateContactsRequest
|
519
|
+
# @private
|
520
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
521
|
+
hash :contacts, as: 'contacts', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation
|
522
|
+
|
523
|
+
property :read_mask, as: 'readMask'
|
524
|
+
collection :sources, as: 'sources'
|
525
|
+
property :update_mask, as: 'updateMask'
|
526
|
+
end
|
527
|
+
end
|
528
|
+
|
529
|
+
class BatchUpdateContactsResponse
|
530
|
+
# @private
|
531
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
532
|
+
hash :update_result, as: 'updateResult', class: Google::Apis::PeopleV1::PersonResponse, decorator: Google::Apis::PeopleV1::PersonResponse::Representation
|
533
|
+
|
534
|
+
end
|
535
|
+
end
|
536
|
+
|
457
537
|
class Biography
|
458
538
|
# @private
|
459
539
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -549,6 +629,14 @@ module Google
|
|
549
629
|
end
|
550
630
|
end
|
551
631
|
|
632
|
+
class ContactToCreate
|
633
|
+
# @private
|
634
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
635
|
+
property :contact_person, as: 'contactPerson', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation
|
636
|
+
|
637
|
+
end
|
638
|
+
end
|
639
|
+
|
552
640
|
class CopyOtherContactToMyContactsGroupRequest
|
553
641
|
# @private
|
554
642
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -750,6 +838,7 @@ module Google
|
|
750
838
|
property :next_sync_token, as: 'nextSyncToken'
|
751
839
|
collection :other_contacts, as: 'otherContacts', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation
|
752
840
|
|
841
|
+
property :total_size, as: 'totalSize'
|
753
842
|
end
|
754
843
|
end
|
755
844
|
|
@@ -403,10 +403,12 @@ module Google
|
|
403
403
|
end
|
404
404
|
|
405
405
|
# Provides a list of contacts in the authenticated user's other contacts that
|
406
|
-
# matches the search query.
|
406
|
+
# matches the search query. The query matches on a contact's `names`, `
|
407
|
+
# emailAddresses`, and `phoneNumbers` fields that are from the OTHER_CONTACT
|
408
|
+
# source.
|
407
409
|
# @param [Fixnum] page_size
|
408
410
|
# Optional. The number of results to return. Defaults to 10 if field is not set,
|
409
|
-
# or set to 0.
|
411
|
+
# or set to 0. Values greater than 10 will be capped to 10.
|
410
412
|
# @param [String] query
|
411
413
|
# Required. The plain-text query for the request. The query is used to match
|
412
414
|
# prefix phrases of the fields on a person. For example, a person with name "foo
|
@@ -445,6 +447,100 @@ module Google
|
|
445
447
|
execute_or_queue_command(command, &block)
|
446
448
|
end
|
447
449
|
|
450
|
+
# Create a batch of new contacts and return the PersonResponses for the newly
|
451
|
+
# created contacts. Limited to 10 parallel requests per user.
|
452
|
+
# @param [Google::Apis::PeopleV1::BatchCreateContactsRequest] batch_create_contacts_request_object
|
453
|
+
# @param [String] fields
|
454
|
+
# Selector specifying which fields to include in a partial response.
|
455
|
+
# @param [String] quota_user
|
456
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
457
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
458
|
+
# @param [Google::Apis::RequestOptions] options
|
459
|
+
# Request-specific options
|
460
|
+
#
|
461
|
+
# @yield [result, err] Result & error if block supplied
|
462
|
+
# @yieldparam result [Google::Apis::PeopleV1::BatchCreateContactsResponse] parsed result object
|
463
|
+
# @yieldparam err [StandardError] error object if request failed
|
464
|
+
#
|
465
|
+
# @return [Google::Apis::PeopleV1::BatchCreateContactsResponse]
|
466
|
+
#
|
467
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
468
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
469
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
470
|
+
def batch_person_create_contacts(batch_create_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
471
|
+
command = make_simple_command(:post, 'v1/people:batchCreateContacts', options)
|
472
|
+
command.request_representation = Google::Apis::PeopleV1::BatchCreateContactsRequest::Representation
|
473
|
+
command.request_object = batch_create_contacts_request_object
|
474
|
+
command.response_representation = Google::Apis::PeopleV1::BatchCreateContactsResponse::Representation
|
475
|
+
command.response_class = Google::Apis::PeopleV1::BatchCreateContactsResponse
|
476
|
+
command.query['fields'] = fields unless fields.nil?
|
477
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
478
|
+
execute_or_queue_command(command, &block)
|
479
|
+
end
|
480
|
+
|
481
|
+
# Delete a batch of contacts. Any non-contact data will not be deleted. Limited
|
482
|
+
# to 10 parallel requests per user.
|
483
|
+
# @param [Google::Apis::PeopleV1::BatchDeleteContactsRequest] batch_delete_contacts_request_object
|
484
|
+
# @param [String] fields
|
485
|
+
# Selector specifying which fields to include in a partial response.
|
486
|
+
# @param [String] quota_user
|
487
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
488
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
489
|
+
# @param [Google::Apis::RequestOptions] options
|
490
|
+
# Request-specific options
|
491
|
+
#
|
492
|
+
# @yield [result, err] Result & error if block supplied
|
493
|
+
# @yieldparam result [Google::Apis::PeopleV1::Empty] parsed result object
|
494
|
+
# @yieldparam err [StandardError] error object if request failed
|
495
|
+
#
|
496
|
+
# @return [Google::Apis::PeopleV1::Empty]
|
497
|
+
#
|
498
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
499
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
500
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
501
|
+
def batch_person_delete_contacts(batch_delete_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
502
|
+
command = make_simple_command(:post, 'v1/people:batchDeleteContacts', options)
|
503
|
+
command.request_representation = Google::Apis::PeopleV1::BatchDeleteContactsRequest::Representation
|
504
|
+
command.request_object = batch_delete_contacts_request_object
|
505
|
+
command.response_representation = Google::Apis::PeopleV1::Empty::Representation
|
506
|
+
command.response_class = Google::Apis::PeopleV1::Empty
|
507
|
+
command.query['fields'] = fields unless fields.nil?
|
508
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
509
|
+
execute_or_queue_command(command, &block)
|
510
|
+
end
|
511
|
+
|
512
|
+
# Update a batch of contacts and return a map of resource names to
|
513
|
+
# PersonResponses for the updated contacts. Limited to 10 parallel requests per
|
514
|
+
# user.
|
515
|
+
# @param [Google::Apis::PeopleV1::BatchUpdateContactsRequest] batch_update_contacts_request_object
|
516
|
+
# @param [String] fields
|
517
|
+
# Selector specifying which fields to include in a partial response.
|
518
|
+
# @param [String] quota_user
|
519
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
520
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
521
|
+
# @param [Google::Apis::RequestOptions] options
|
522
|
+
# Request-specific options
|
523
|
+
#
|
524
|
+
# @yield [result, err] Result & error if block supplied
|
525
|
+
# @yieldparam result [Google::Apis::PeopleV1::BatchUpdateContactsResponse] parsed result object
|
526
|
+
# @yieldparam err [StandardError] error object if request failed
|
527
|
+
#
|
528
|
+
# @return [Google::Apis::PeopleV1::BatchUpdateContactsResponse]
|
529
|
+
#
|
530
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
531
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
532
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
533
|
+
def batch_person_update_contacts(batch_update_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
534
|
+
command = make_simple_command(:post, 'v1/people:batchUpdateContacts', options)
|
535
|
+
command.request_representation = Google::Apis::PeopleV1::BatchUpdateContactsRequest::Representation
|
536
|
+
command.request_object = batch_update_contacts_request_object
|
537
|
+
command.response_representation = Google::Apis::PeopleV1::BatchUpdateContactsResponse::Representation
|
538
|
+
command.response_class = Google::Apis::PeopleV1::BatchUpdateContactsResponse
|
539
|
+
command.query['fields'] = fields unless fields.nil?
|
540
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
541
|
+
execute_or_queue_command(command, &block)
|
542
|
+
end
|
543
|
+
|
448
544
|
# Create a new contact and return the person resource for that contact. The
|
449
545
|
# request returns a 400 error if more than one field is specified on a field
|
450
546
|
# that is a singleton for contact sources: * biographies * birthdays * genders *
|
@@ -744,9 +840,12 @@ module Google
|
|
744
840
|
end
|
745
841
|
|
746
842
|
# Provides a list of contacts in the authenticated user's grouped contacts that
|
747
|
-
# matches the search query.
|
843
|
+
# matches the search query. The query matches on a contact's `names`, `nickNames`
|
844
|
+
# , `emailAddresses`, `phoneNumbers`, and `organizations` fields that are from
|
845
|
+
# the CONTACT" source.
|
748
846
|
# @param [Fixnum] page_size
|
749
|
-
# Optional. The number of results to return.
|
847
|
+
# Optional. The number of results to return. Defaults to 10 if field is not set,
|
848
|
+
# or set to 0. Values greater than 10 will be capped to 10.
|
750
849
|
# @param [String] query
|
751
850
|
# Required. The plain-text query for the request. The query is used to match
|
752
851
|
# prefix phrases of the fields on a person. For example, a person with name "foo
|
@@ -760,6 +859,9 @@ module Google
|
|
760
859
|
# imClients * interests * locales * locations * memberships * metadata *
|
761
860
|
# miscKeywords * names * nicknames * occupations * organizations * phoneNumbers *
|
762
861
|
# photos * relations * sipAddresses * skills * urls * userDefined
|
862
|
+
# @param [Array<String>, String] sources
|
863
|
+
# Optional. A mask of what source types to return. Defaults to
|
864
|
+
# READ_SOURCE_TYPE_CONTACT if not set.
|
763
865
|
# @param [String] fields
|
764
866
|
# Selector specifying which fields to include in a partial response.
|
765
867
|
# @param [String] quota_user
|
@@ -777,13 +879,14 @@ module Google
|
|
777
879
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
778
880
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
779
881
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
780
|
-
def search_person_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
882
|
+
def search_person_contacts(page_size: nil, query: nil, read_mask: nil, sources: nil, fields: nil, quota_user: nil, options: nil, &block)
|
781
883
|
command = make_simple_command(:get, 'v1/people:searchContacts', options)
|
782
884
|
command.response_representation = Google::Apis::PeopleV1::SearchResponse::Representation
|
783
885
|
command.response_class = Google::Apis::PeopleV1::SearchResponse
|
784
886
|
command.query['pageSize'] = page_size unless page_size.nil?
|
785
887
|
command.query['query'] = query unless query.nil?
|
786
888
|
command.query['readMask'] = read_mask unless read_mask.nil?
|
889
|
+
command.query['sources'] = sources unless sources.nil?
|
787
890
|
command.query['fields'] = fields unless fields.nil?
|
788
891
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
789
892
|
execute_or_queue_command(command, &block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-people_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -52,7 +52,7 @@ licenses:
|
|
52
52
|
metadata:
|
53
53
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
54
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-people_v1/CHANGELOG.md
|
55
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-people_v1/v0.
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-people_v1/v0.9.0
|
56
56
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-people_v1
|
57
57
|
post_install_message:
|
58
58
|
rdoc_options: []
|
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
requirements:
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: '2.
|
65
|
+
version: '2.5'
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.2.
|
72
|
+
rubygems_version: 3.2.17
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Simple REST client for People API V1
|