google-api-client 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  4. data/generated/google/apis/androidmanagement_v1/classes.rb +1 -2
  5. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  6. data/generated/google/apis/androidpublisher_v2/classes.rb +1 -2
  7. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  8. data/generated/google/apis/androidpublisher_v3/classes.rb +2 -3
  9. data/generated/google/apis/appengine_v1.rb +1 -1
  10. data/generated/google/apis/appengine_v1/classes.rb +59 -1
  11. data/generated/google/apis/appengine_v1/representations.rb +18 -0
  12. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  13. data/generated/google/apis/cloudtasks_v2beta2/service.rb +0 -8
  14. data/generated/google/apis/compute_alpha.rb +1 -1
  15. data/generated/google/apis/compute_alpha/classes.rb +97 -12
  16. data/generated/google/apis/compute_alpha/representations.rb +23 -0
  17. data/generated/google/apis/compute_alpha/service.rb +41 -1
  18. data/generated/google/apis/compute_beta.rb +1 -1
  19. data/generated/google/apis/compute_beta/classes.rb +1616 -43
  20. data/generated/google/apis/compute_beta/representations.rb +685 -20
  21. data/generated/google/apis/compute_beta/service.rb +1286 -0
  22. data/generated/google/apis/compute_v1.rb +1 -1
  23. data/generated/google/apis/compute_v1/classes.rb +184 -3
  24. data/generated/google/apis/compute_v1/representations.rb +43 -0
  25. data/generated/google/apis/compute_v1/service.rb +108 -0
  26. data/generated/google/apis/content_v2.rb +1 -1
  27. data/generated/google/apis/content_v2/classes.rb +805 -102
  28. data/generated/google/apis/content_v2/representations.rb +393 -26
  29. data/generated/google/apis/content_v2/service.rb +242 -0
  30. data/generated/google/apis/content_v2sandbox.rb +1 -1
  31. data/generated/google/apis/content_v2sandbox/classes.rb +703 -0
  32. data/generated/google/apis/content_v2sandbox/representations.rb +367 -0
  33. data/generated/google/apis/content_v2sandbox/service.rb +242 -0
  34. data/generated/google/apis/dlp_v2.rb +1 -1
  35. data/generated/google/apis/dlp_v2/classes.rb +280 -2
  36. data/generated/google/apis/dlp_v2/representations.rb +120 -0
  37. data/generated/google/apis/genomics_v2alpha1.rb +1 -1
  38. data/generated/google/apis/genomics_v2alpha1/classes.rb +35 -0
  39. data/generated/google/apis/genomics_v2alpha1/representations.rb +16 -0
  40. data/generated/google/apis/logging_v2.rb +1 -1
  41. data/generated/google/apis/logging_v2/classes.rb +2 -2
  42. data/generated/google/apis/monitoring_v3.rb +1 -1
  43. data/generated/google/apis/monitoring_v3/classes.rb +7 -0
  44. data/generated/google/apis/monitoring_v3/representations.rb +2 -0
  45. data/generated/google/apis/monitoring_v3/service.rb +5 -3
  46. data/generated/google/apis/pagespeedonline_v4.rb +1 -1
  47. data/generated/google/apis/pubsub_v1.rb +1 -1
  48. data/generated/google/apis/pubsub_v1/classes.rb +0 -8
  49. data/generated/google/apis/pubsub_v1/service.rb +4 -8
  50. data/generated/google/apis/script_v1.rb +1 -1
  51. data/generated/google/apis/script_v1/classes.rb +7 -8
  52. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  53. data/generated/google/apis/servicemanagement_v1/classes.rb +0 -27
  54. data/generated/google/apis/servicemanagement_v1/representations.rb +0 -15
  55. data/generated/google/apis/serviceuser_v1.rb +1 -1
  56. data/generated/google/apis/serviceuser_v1/classes.rb +0 -27
  57. data/generated/google/apis/serviceuser_v1/representations.rb +0 -15
  58. data/generated/google/apis/sheets_v4.rb +1 -1
  59. data/generated/google/apis/sheets_v4/service.rb +2 -1
  60. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  61. data/generated/google/apis/tpu_v1.rb +34 -0
  62. data/generated/google/apis/tpu_v1/classes.rb +736 -0
  63. data/generated/google/apis/tpu_v1/representations.rb +316 -0
  64. data/generated/google/apis/tpu_v1/service.rb +687 -0
  65. data/generated/google/apis/tpu_v1alpha1.rb +1 -1
  66. data/generated/google/apis/tpu_v1alpha1/classes.rb +26 -0
  67. data/generated/google/apis/tpu_v1alpha1/representations.rb +15 -0
  68. data/generated/google/apis/videointelligence_v1.rb +1 -1
  69. data/generated/google/apis/videointelligence_v1/classes.rb +0 -473
  70. data/generated/google/apis/videointelligence_v1/representations.rb +0 -222
  71. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  72. data/generated/google/apis/videointelligence_v1beta2/classes.rb +0 -473
  73. data/generated/google/apis/videointelligence_v1beta2/representations.rb +0 -222
  74. data/lib/google/apis/version.rb +1 -1
  75. metadata +6 -6
  76. data/generated/google/apis/photoslibrary_v1.rb +0 -49
  77. data/generated/google/apis/photoslibrary_v1/classes.rb +0 -1330
  78. data/generated/google/apis/photoslibrary_v1/representations.rb +0 -625
  79. data/generated/google/apis/photoslibrary_v1/service.rb +0 -399
@@ -1,399 +0,0 @@
1
- # Copyright 2015 Google Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- require 'google/apis/core/base_service'
16
- require 'google/apis/core/json_representation'
17
- require 'google/apis/core/hashable'
18
- require 'google/apis/errors'
19
-
20
- module Google
21
- module Apis
22
- module PhotoslibraryV1
23
- # Photos Library API
24
- #
25
- # Manage photos, videos, and albums in Google Photos
26
- #
27
- # @example
28
- # require 'google/apis/photoslibrary_v1'
29
- #
30
- # Photoslibrary = Google::Apis::PhotoslibraryV1 # Alias the module
31
- # service = Photoslibrary::PhotosLibraryService.new
32
- #
33
- # @see https://developers.google.com/photos/
34
- class PhotosLibraryService < Google::Apis::Core::BaseService
35
- # @return [String]
36
- # API key. Your API key identifies your project and provides you with API access,
37
- # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
- attr_accessor :key
39
-
40
- # @return [String]
41
- # Available to use for quota purposes for server-side applications. Can be any
42
- # arbitrary string assigned to a user, but should not exceed 40 characters.
43
- attr_accessor :quota_user
44
-
45
- def initialize
46
- super('https://photoslibrary.googleapis.com/', '')
47
- @batch_path = 'batch'
48
- end
49
-
50
- # Adds an enrichment to a specified position in a defined album.
51
- # @param [String] album_id
52
- # Identifier of the album where the enrichment will be added.
53
- # @param [Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumRequest] add_enrichment_to_album_request_object
54
- # @param [String] fields
55
- # Selector specifying which fields to include in a partial response.
56
- # @param [String] quota_user
57
- # Available to use for quota purposes for server-side applications. Can be any
58
- # arbitrary string assigned to a user, but should not exceed 40 characters.
59
- # @param [Google::Apis::RequestOptions] options
60
- # Request-specific options
61
- #
62
- # @yield [result, err] Result & error if block supplied
63
- # @yieldparam result [Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse] parsed result object
64
- # @yieldparam err [StandardError] error object if request failed
65
- #
66
- # @return [Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse]
67
- #
68
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
69
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
70
- # @raise [Google::Apis::AuthorizationError] Authorization is required
71
- def add_enrichment_to_album(album_id, add_enrichment_to_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
72
- command = make_simple_command(:post, 'v1/albums/{+albumId}:addEnrichment', options)
73
- command.request_representation = Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumRequest::Representation
74
- command.request_object = add_enrichment_to_album_request_object
75
- command.response_representation = Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse::Representation
76
- command.response_class = Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse
77
- command.params['albumId'] = album_id unless album_id.nil?
78
- command.query['fields'] = fields unless fields.nil?
79
- command.query['quotaUser'] = quota_user unless quota_user.nil?
80
- execute_or_queue_command(command, &block)
81
- end
82
-
83
- # Creates an album in a user's Google Photos library.
84
- # @param [Google::Apis::PhotoslibraryV1::CreateAlbumRequest] create_album_request_object
85
- # @param [String] fields
86
- # Selector specifying which fields to include in a partial response.
87
- # @param [String] quota_user
88
- # Available to use for quota purposes for server-side applications. Can be any
89
- # arbitrary string assigned to a user, but should not exceed 40 characters.
90
- # @param [Google::Apis::RequestOptions] options
91
- # Request-specific options
92
- #
93
- # @yield [result, err] Result & error if block supplied
94
- # @yieldparam result [Google::Apis::PhotoslibraryV1::Album] parsed result object
95
- # @yieldparam err [StandardError] error object if request failed
96
- #
97
- # @return [Google::Apis::PhotoslibraryV1::Album]
98
- #
99
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
100
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
101
- # @raise [Google::Apis::AuthorizationError] Authorization is required
102
- def create_album(create_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
103
- command = make_simple_command(:post, 'v1/albums', options)
104
- command.request_representation = Google::Apis::PhotoslibraryV1::CreateAlbumRequest::Representation
105
- command.request_object = create_album_request_object
106
- command.response_representation = Google::Apis::PhotoslibraryV1::Album::Representation
107
- command.response_class = Google::Apis::PhotoslibraryV1::Album
108
- command.query['fields'] = fields unless fields.nil?
109
- command.query['quotaUser'] = quota_user unless quota_user.nil?
110
- execute_or_queue_command(command, &block)
111
- end
112
-
113
- # Returns the album specified by the given album id.
114
- # @param [String] album_id
115
- # Identifier of the album to be requested.
116
- # @param [String] fields
117
- # Selector specifying which fields to include in a partial response.
118
- # @param [String] quota_user
119
- # Available to use for quota purposes for server-side applications. Can be any
120
- # arbitrary string assigned to a user, but should not exceed 40 characters.
121
- # @param [Google::Apis::RequestOptions] options
122
- # Request-specific options
123
- #
124
- # @yield [result, err] Result & error if block supplied
125
- # @yieldparam result [Google::Apis::PhotoslibraryV1::Album] parsed result object
126
- # @yieldparam err [StandardError] error object if request failed
127
- #
128
- # @return [Google::Apis::PhotoslibraryV1::Album]
129
- #
130
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
131
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
132
- # @raise [Google::Apis::AuthorizationError] Authorization is required
133
- def get_album(album_id, fields: nil, quota_user: nil, options: nil, &block)
134
- command = make_simple_command(:get, 'v1/albums/{+albumId}', options)
135
- command.response_representation = Google::Apis::PhotoslibraryV1::Album::Representation
136
- command.response_class = Google::Apis::PhotoslibraryV1::Album
137
- command.params['albumId'] = album_id unless album_id.nil?
138
- command.query['fields'] = fields unless fields.nil?
139
- command.query['quotaUser'] = quota_user unless quota_user.nil?
140
- execute_or_queue_command(command, &block)
141
- end
142
-
143
- # Lists all albums shown to a user in the 'Albums' tab of the Google
144
- # Photos app.
145
- # @param [Fixnum] page_size
146
- # Maximum number of albums to return in the response. The default number of
147
- # albums to return at a time is 20. The maximum page size is 50.
148
- # @param [String] page_token
149
- # A continuation token to get the next page of the results. Adding this to
150
- # the request will return the rows after the pageToken. The pageToken should
151
- # be the value returned in the nextPageToken parameter in the response to the
152
- # listAlbums request.
153
- # @param [String] fields
154
- # Selector specifying which fields to include in a partial response.
155
- # @param [String] quota_user
156
- # Available to use for quota purposes for server-side applications. Can be any
157
- # arbitrary string assigned to a user, but should not exceed 40 characters.
158
- # @param [Google::Apis::RequestOptions] options
159
- # Request-specific options
160
- #
161
- # @yield [result, err] Result & error if block supplied
162
- # @yieldparam result [Google::Apis::PhotoslibraryV1::ListAlbumsResponse] parsed result object
163
- # @yieldparam err [StandardError] error object if request failed
164
- #
165
- # @return [Google::Apis::PhotoslibraryV1::ListAlbumsResponse]
166
- #
167
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
168
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
169
- # @raise [Google::Apis::AuthorizationError] Authorization is required
170
- def list_albums(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
171
- command = make_simple_command(:get, 'v1/albums', options)
172
- command.response_representation = Google::Apis::PhotoslibraryV1::ListAlbumsResponse::Representation
173
- command.response_class = Google::Apis::PhotoslibraryV1::ListAlbumsResponse
174
- command.query['pageSize'] = page_size unless page_size.nil?
175
- command.query['pageToken'] = page_token unless page_token.nil?
176
- command.query['fields'] = fields unless fields.nil?
177
- command.query['quotaUser'] = quota_user unless quota_user.nil?
178
- execute_or_queue_command(command, &block)
179
- end
180
-
181
- # Marks an album as 'shared' and accessible to other users. This action can
182
- # only be performed on albums which were created by the developer via the
183
- # API.
184
- # @param [String] album_id
185
- # Identifier of the album to be shared. This album id must belong to an album
186
- # created by the developer.
187
- # .
188
- # @param [Google::Apis::PhotoslibraryV1::ShareAlbumRequest] share_album_request_object
189
- # @param [String] fields
190
- # Selector specifying which fields to include in a partial response.
191
- # @param [String] quota_user
192
- # Available to use for quota purposes for server-side applications. Can be any
193
- # arbitrary string assigned to a user, but should not exceed 40 characters.
194
- # @param [Google::Apis::RequestOptions] options
195
- # Request-specific options
196
- #
197
- # @yield [result, err] Result & error if block supplied
198
- # @yieldparam result [Google::Apis::PhotoslibraryV1::ShareAlbumResponse] parsed result object
199
- # @yieldparam err [StandardError] error object if request failed
200
- #
201
- # @return [Google::Apis::PhotoslibraryV1::ShareAlbumResponse]
202
- #
203
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
204
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
205
- # @raise [Google::Apis::AuthorizationError] Authorization is required
206
- def share_album(album_id, share_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
207
- command = make_simple_command(:post, 'v1/albums/{+albumId}:share', options)
208
- command.request_representation = Google::Apis::PhotoslibraryV1::ShareAlbumRequest::Representation
209
- command.request_object = share_album_request_object
210
- command.response_representation = Google::Apis::PhotoslibraryV1::ShareAlbumResponse::Representation
211
- command.response_class = Google::Apis::PhotoslibraryV1::ShareAlbumResponse
212
- command.params['albumId'] = album_id unless album_id.nil?
213
- command.query['fields'] = fields unless fields.nil?
214
- command.query['quotaUser'] = quota_user unless quota_user.nil?
215
- execute_or_queue_command(command, &block)
216
- end
217
-
218
- # Creates one or more media items in a user's Google Photos library.
219
- # If an album id is specified, the media item(s) are also added to the album.
220
- # By default the media item(s) will be added to the end of the library or
221
- # album.
222
- # If an album id and position are both defined, then the media items will
223
- # be added to the album at the specified position.
224
- # If multiple media items are given, they will be inserted at the specified
225
- # position.
226
- # @param [Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsRequest] batch_create_media_items_request_object
227
- # @param [String] fields
228
- # Selector specifying which fields to include in a partial response.
229
- # @param [String] quota_user
230
- # Available to use for quota purposes for server-side applications. Can be any
231
- # arbitrary string assigned to a user, but should not exceed 40 characters.
232
- # @param [Google::Apis::RequestOptions] options
233
- # Request-specific options
234
- #
235
- # @yield [result, err] Result & error if block supplied
236
- # @yieldparam result [Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse] parsed result object
237
- # @yieldparam err [StandardError] error object if request failed
238
- #
239
- # @return [Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse]
240
- #
241
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
242
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
243
- # @raise [Google::Apis::AuthorizationError] Authorization is required
244
- def batch_create_media_items(batch_create_media_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
245
- command = make_simple_command(:post, 'v1/mediaItems:batchCreate', options)
246
- command.request_representation = Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsRequest::Representation
247
- command.request_object = batch_create_media_items_request_object
248
- command.response_representation = Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse::Representation
249
- command.response_class = Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse
250
- command.query['fields'] = fields unless fields.nil?
251
- command.query['quotaUser'] = quota_user unless quota_user.nil?
252
- execute_or_queue_command(command, &block)
253
- end
254
-
255
- # Returns the media item specified based on a given media item id.
256
- # @param [String] media_item_id
257
- # Identifier of media item to be requested.
258
- # @param [String] fields
259
- # Selector specifying which fields to include in a partial response.
260
- # @param [String] quota_user
261
- # Available to use for quota purposes for server-side applications. Can be any
262
- # arbitrary string assigned to a user, but should not exceed 40 characters.
263
- # @param [Google::Apis::RequestOptions] options
264
- # Request-specific options
265
- #
266
- # @yield [result, err] Result & error if block supplied
267
- # @yieldparam result [Google::Apis::PhotoslibraryV1::MediaItem] parsed result object
268
- # @yieldparam err [StandardError] error object if request failed
269
- #
270
- # @return [Google::Apis::PhotoslibraryV1::MediaItem]
271
- #
272
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
273
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
274
- # @raise [Google::Apis::AuthorizationError] Authorization is required
275
- def get_media_item(media_item_id, fields: nil, quota_user: nil, options: nil, &block)
276
- command = make_simple_command(:get, 'v1/mediaItems/{+mediaItemId}', options)
277
- command.response_representation = Google::Apis::PhotoslibraryV1::MediaItem::Representation
278
- command.response_class = Google::Apis::PhotoslibraryV1::MediaItem
279
- command.params['mediaItemId'] = media_item_id unless media_item_id.nil?
280
- command.query['fields'] = fields unless fields.nil?
281
- command.query['quotaUser'] = quota_user unless quota_user.nil?
282
- execute_or_queue_command(command, &block)
283
- end
284
-
285
- # Searches for media items in a user's Google Photos library.
286
- # If no filters are set, then all media items in the user's library will be
287
- # returned.
288
- # If an album is set, all media items in the specified album will be
289
- # returned.
290
- # If filters are specified, anything that matches the filters from the user's
291
- # library will be listed.
292
- # If an album and filters are set, then this will result in an error.
293
- # @param [Google::Apis::PhotoslibraryV1::SearchMediaItemsRequest] search_media_items_request_object
294
- # @param [String] fields
295
- # Selector specifying which fields to include in a partial response.
296
- # @param [String] quota_user
297
- # Available to use for quota purposes for server-side applications. Can be any
298
- # arbitrary string assigned to a user, but should not exceed 40 characters.
299
- # @param [Google::Apis::RequestOptions] options
300
- # Request-specific options
301
- #
302
- # @yield [result, err] Result & error if block supplied
303
- # @yieldparam result [Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse] parsed result object
304
- # @yieldparam err [StandardError] error object if request failed
305
- #
306
- # @return [Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse]
307
- #
308
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
309
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
310
- # @raise [Google::Apis::AuthorizationError] Authorization is required
311
- def search_media_items(search_media_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
312
- command = make_simple_command(:post, 'v1/mediaItems:search', options)
313
- command.request_representation = Google::Apis::PhotoslibraryV1::SearchMediaItemsRequest::Representation
314
- command.request_object = search_media_items_request_object
315
- command.response_representation = Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse::Representation
316
- command.response_class = Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse
317
- command.query['fields'] = fields unless fields.nil?
318
- command.query['quotaUser'] = quota_user unless quota_user.nil?
319
- execute_or_queue_command(command, &block)
320
- end
321
-
322
- # Joins a shared album on behalf of the Google Photos user.
323
- # @param [Google::Apis::PhotoslibraryV1::JoinSharedAlbumRequest] join_shared_album_request_object
324
- # @param [String] fields
325
- # Selector specifying which fields to include in a partial response.
326
- # @param [String] quota_user
327
- # Available to use for quota purposes for server-side applications. Can be any
328
- # arbitrary string assigned to a user, but should not exceed 40 characters.
329
- # @param [Google::Apis::RequestOptions] options
330
- # Request-specific options
331
- #
332
- # @yield [result, err] Result & error if block supplied
333
- # @yieldparam result [Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse] parsed result object
334
- # @yieldparam err [StandardError] error object if request failed
335
- #
336
- # @return [Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse]
337
- #
338
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
339
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
340
- # @raise [Google::Apis::AuthorizationError] Authorization is required
341
- def join_shared_album(join_shared_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
342
- command = make_simple_command(:post, 'v1/sharedAlbums:join', options)
343
- command.request_representation = Google::Apis::PhotoslibraryV1::JoinSharedAlbumRequest::Representation
344
- command.request_object = join_shared_album_request_object
345
- command.response_representation = Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse::Representation
346
- command.response_class = Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse
347
- command.query['fields'] = fields unless fields.nil?
348
- command.query['quotaUser'] = quota_user unless quota_user.nil?
349
- execute_or_queue_command(command, &block)
350
- end
351
-
352
- # Lists all shared albums shown to a user in the 'Sharing' tab of the
353
- # Google Photos app.
354
- # @param [Fixnum] page_size
355
- # Maximum number of albums to return in the response. The default number of
356
- # albums to return at a time is 20. The maximum page size is 50.
357
- # @param [String] page_token
358
- # A continuation token to get the next page of the results. Adding this to
359
- # the request will return the rows after the pageToken. The pageToken should
360
- # be the value returned in the nextPageToken parameter in the response to the
361
- # listSharedAlbums request.
362
- # @param [String] fields
363
- # Selector specifying which fields to include in a partial response.
364
- # @param [String] quota_user
365
- # Available to use for quota purposes for server-side applications. Can be any
366
- # arbitrary string assigned to a user, but should not exceed 40 characters.
367
- # @param [Google::Apis::RequestOptions] options
368
- # Request-specific options
369
- #
370
- # @yield [result, err] Result & error if block supplied
371
- # @yieldparam result [Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse] parsed result object
372
- # @yieldparam err [StandardError] error object if request failed
373
- #
374
- # @return [Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse]
375
- #
376
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
377
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
378
- # @raise [Google::Apis::AuthorizationError] Authorization is required
379
- def list_shared_albums(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
380
- command = make_simple_command(:get, 'v1/sharedAlbums', options)
381
- command.response_representation = Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse::Representation
382
- command.response_class = Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse
383
- command.query['pageSize'] = page_size unless page_size.nil?
384
- command.query['pageToken'] = page_token unless page_token.nil?
385
- command.query['fields'] = fields unless fields.nil?
386
- command.query['quotaUser'] = quota_user unless quota_user.nil?
387
- execute_or_queue_command(command, &block)
388
- end
389
-
390
- protected
391
-
392
- def apply_command_defaults(command)
393
- command.query['key'] = key unless key.nil?
394
- command.query['quotaUser'] = quota_user unless quota_user.nil?
395
- end
396
- end
397
- end
398
- end
399
- end