google-apis-drive_v3 0.38.0 → 0.40.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 +8 -0
- data/OVERVIEW.md +3 -3
- data/lib/google/apis/drive_v3/classes.rb +456 -464
- data/lib/google/apis/drive_v3/gem_version.rb +2 -2
- data/lib/google/apis/drive_v3/service.rb +282 -415
- data/lib/google/apis/drive_v3.rb +3 -4
- metadata +7 -7
@@ -20,10 +20,9 @@ require 'google/apis/errors'
|
|
20
20
|
module Google
|
21
21
|
module Apis
|
22
22
|
module DriveV3
|
23
|
-
# Drive API
|
23
|
+
# Google Drive API
|
24
24
|
#
|
25
|
-
#
|
26
|
-
# changes, and updating sharing permissions.
|
25
|
+
# The Google Drive API allows clients to access resources from Google Drive.
|
27
26
|
#
|
28
27
|
# @example
|
29
28
|
# require 'google/apis/drive_v3'
|
@@ -39,14 +38,10 @@ module Google
|
|
39
38
|
attr_accessor :key
|
40
39
|
|
41
40
|
# @return [String]
|
42
|
-
#
|
43
|
-
# characters.
|
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.
|
44
43
|
attr_accessor :quota_user
|
45
44
|
|
46
|
-
# @return [String]
|
47
|
-
# Deprecated. Please use quotaUser instead.
|
48
|
-
attr_accessor :user_ip
|
49
|
-
|
50
45
|
def initialize
|
51
46
|
super('https://www.googleapis.com/', 'drive/v3/',
|
52
47
|
client_name: 'google-apis-drive_v3',
|
@@ -58,10 +53,8 @@ module Google
|
|
58
53
|
# @param [String] fields
|
59
54
|
# Selector specifying which fields to include in a partial response.
|
60
55
|
# @param [String] quota_user
|
61
|
-
#
|
62
|
-
# characters.
|
63
|
-
# @param [String] user_ip
|
64
|
-
# Deprecated. Please use quotaUser instead.
|
56
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
57
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
58
|
# @param [Google::Apis::RequestOptions] options
|
66
59
|
# Request-specific options
|
67
60
|
#
|
@@ -74,33 +67,30 @@ module Google
|
|
74
67
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
68
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
69
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
-
def get_about(fields: nil, quota_user: nil,
|
70
|
+
def get_about(fields: nil, quota_user: nil, options: nil, &block)
|
78
71
|
command = make_simple_command(:get, 'about', options)
|
79
72
|
command.response_representation = Google::Apis::DriveV3::About::Representation
|
80
73
|
command.response_class = Google::Apis::DriveV3::About
|
81
74
|
command.query['fields'] = fields unless fields.nil?
|
82
75
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
84
76
|
execute_or_queue_command(command, &block)
|
85
77
|
end
|
86
78
|
|
87
79
|
# Gets the starting pageToken for listing future changes.
|
88
80
|
# @param [String] drive_id
|
89
81
|
# The ID of the shared drive for which the starting pageToken for listing future
|
90
|
-
# changes from that shared drive
|
82
|
+
# changes from that shared drive will be returned.
|
91
83
|
# @param [Boolean] supports_all_drives
|
92
84
|
# Whether the requesting application supports both My Drives and shared drives.
|
93
85
|
# @param [Boolean] supports_team_drives
|
94
|
-
# Deprecated
|
86
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
95
87
|
# @param [String] team_drive_id
|
96
|
-
# Deprecated
|
88
|
+
# Deprecated: Use `driveId` instead.
|
97
89
|
# @param [String] fields
|
98
90
|
# Selector specifying which fields to include in a partial response.
|
99
91
|
# @param [String] quota_user
|
100
|
-
#
|
101
|
-
# characters.
|
102
|
-
# @param [String] user_ip
|
103
|
-
# Deprecated. Please use quotaUser instead.
|
92
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
93
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
104
94
|
# @param [Google::Apis::RequestOptions] options
|
105
95
|
# Request-specific options
|
106
96
|
#
|
@@ -113,7 +103,7 @@ module Google
|
|
113
103
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
104
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
105
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
-
def get_changes_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
106
|
+
def get_changes_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
117
107
|
command = make_simple_command(:get, 'changes/startPageToken', options)
|
118
108
|
command.response_representation = Google::Apis::DriveV3::StartPageToken::Representation
|
119
109
|
command.response_class = Google::Apis::DriveV3::StartPageToken
|
@@ -123,7 +113,6 @@ module Google
|
|
123
113
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
124
114
|
command.query['fields'] = fields unless fields.nil?
|
125
115
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
126
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
127
116
|
execute_or_queue_command(command, &block)
|
128
117
|
end
|
129
118
|
|
@@ -133,9 +122,9 @@ module Google
|
|
133
122
|
# be set to the value of 'nextPageToken' from the previous response or to the
|
134
123
|
# response from the getStartPageToken method.
|
135
124
|
# @param [String] drive_id
|
136
|
-
# The shared drive from which changes
|
137
|
-
# will be reflective of the shared drive; use the combined drive ID and
|
138
|
-
# ID as an identifier.
|
125
|
+
# The shared drive from which changes will be returned. If specified the change
|
126
|
+
# IDs will be reflective of the shared drive; use the combined drive ID and
|
127
|
+
# change ID as an identifier.
|
139
128
|
# @param [Boolean] include_corpus_removals
|
140
129
|
# Whether changes should include the file resource if the file is still
|
141
130
|
# accessible by the user at the time of the request, even when a file was
|
@@ -144,7 +133,7 @@ module Google
|
|
144
133
|
# @param [Boolean] include_items_from_all_drives
|
145
134
|
# Whether both My Drive and shared drive items should be included in results.
|
146
135
|
# @param [String] include_labels
|
147
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
136
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
148
137
|
# the response.
|
149
138
|
# @param [String] include_permissions_for_view
|
150
139
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -153,7 +142,7 @@ module Google
|
|
153
142
|
# Whether to include changes indicating that items have been removed from the
|
154
143
|
# list of changes, for example by deletion or loss of access.
|
155
144
|
# @param [Boolean] include_team_drive_items
|
156
|
-
# Deprecated
|
145
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
157
146
|
# @param [Fixnum] page_size
|
158
147
|
# The maximum number of changes to return per page.
|
159
148
|
# @param [Boolean] restrict_to_my_drive
|
@@ -166,16 +155,14 @@ module Google
|
|
166
155
|
# @param [Boolean] supports_all_drives
|
167
156
|
# Whether the requesting application supports both My Drives and shared drives.
|
168
157
|
# @param [Boolean] supports_team_drives
|
169
|
-
# Deprecated
|
158
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
170
159
|
# @param [String] team_drive_id
|
171
|
-
# Deprecated
|
160
|
+
# Deprecated: Use `driveId` instead.
|
172
161
|
# @param [String] fields
|
173
162
|
# Selector specifying which fields to include in a partial response.
|
174
163
|
# @param [String] quota_user
|
175
|
-
#
|
176
|
-
# characters.
|
177
|
-
# @param [String] user_ip
|
178
|
-
# Deprecated. Please use quotaUser instead.
|
164
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
165
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
179
166
|
# @param [Google::Apis::RequestOptions] options
|
180
167
|
# Request-specific options
|
181
168
|
#
|
@@ -188,7 +175,7 @@ module Google
|
|
188
175
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
189
176
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
190
177
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
191
|
-
def list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
178
|
+
def list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
192
179
|
command = make_simple_command(:get, 'changes', options)
|
193
180
|
command.response_representation = Google::Apis::DriveV3::ChangeList::Representation
|
194
181
|
command.response_class = Google::Apis::DriveV3::ChangeList
|
@@ -208,21 +195,19 @@ module Google
|
|
208
195
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
209
196
|
command.query['fields'] = fields unless fields.nil?
|
210
197
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
211
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
212
198
|
execute_or_queue_command(command, &block)
|
213
199
|
end
|
214
200
|
|
215
|
-
# Subscribes to changes for a user.
|
216
|
-
# pageToken query parameter.
|
201
|
+
# Subscribes to changes for a user.
|
217
202
|
# @param [String] page_token
|
218
203
|
# The token for continuing a previous list request on the next page. This should
|
219
204
|
# be set to the value of 'nextPageToken' from the previous response or to the
|
220
205
|
# response from the getStartPageToken method.
|
221
206
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
222
207
|
# @param [String] drive_id
|
223
|
-
# The shared drive from which changes
|
224
|
-
# will be reflective of the shared drive; use the combined drive ID and
|
225
|
-
# ID as an identifier.
|
208
|
+
# The shared drive from which changes will be returned. If specified the change
|
209
|
+
# IDs will be reflective of the shared drive; use the combined drive ID and
|
210
|
+
# change ID as an identifier.
|
226
211
|
# @param [Boolean] include_corpus_removals
|
227
212
|
# Whether changes should include the file resource if the file is still
|
228
213
|
# accessible by the user at the time of the request, even when a file was
|
@@ -231,7 +216,7 @@ module Google
|
|
231
216
|
# @param [Boolean] include_items_from_all_drives
|
232
217
|
# Whether both My Drive and shared drive items should be included in results.
|
233
218
|
# @param [String] include_labels
|
234
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
219
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
235
220
|
# the response.
|
236
221
|
# @param [String] include_permissions_for_view
|
237
222
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -240,7 +225,7 @@ module Google
|
|
240
225
|
# Whether to include changes indicating that items have been removed from the
|
241
226
|
# list of changes, for example by deletion or loss of access.
|
242
227
|
# @param [Boolean] include_team_drive_items
|
243
|
-
# Deprecated
|
228
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
244
229
|
# @param [Fixnum] page_size
|
245
230
|
# The maximum number of changes to return per page.
|
246
231
|
# @param [Boolean] restrict_to_my_drive
|
@@ -253,16 +238,14 @@ module Google
|
|
253
238
|
# @param [Boolean] supports_all_drives
|
254
239
|
# Whether the requesting application supports both My Drives and shared drives.
|
255
240
|
# @param [Boolean] supports_team_drives
|
256
|
-
# Deprecated
|
241
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
257
242
|
# @param [String] team_drive_id
|
258
|
-
# Deprecated
|
243
|
+
# Deprecated: Use `driveId` instead.
|
259
244
|
# @param [String] fields
|
260
245
|
# Selector specifying which fields to include in a partial response.
|
261
246
|
# @param [String] quota_user
|
262
|
-
#
|
263
|
-
# characters.
|
264
|
-
# @param [String] user_ip
|
265
|
-
# Deprecated. Please use quotaUser instead.
|
247
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
248
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
266
249
|
# @param [Google::Apis::RequestOptions] options
|
267
250
|
# Request-specific options
|
268
251
|
#
|
@@ -275,7 +258,7 @@ module Google
|
|
275
258
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
276
259
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
277
260
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
278
|
-
def watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
261
|
+
def watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
279
262
|
command = make_simple_command(:post, 'changes/watch', options)
|
280
263
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
281
264
|
command.request_object = channel_object
|
@@ -297,19 +280,16 @@ module Google
|
|
297
280
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
298
281
|
command.query['fields'] = fields unless fields.nil?
|
299
282
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
300
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
301
283
|
execute_or_queue_command(command, &block)
|
302
284
|
end
|
303
285
|
|
304
|
-
#
|
286
|
+
# Stops watching resources through this channel.
|
305
287
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
306
288
|
# @param [String] fields
|
307
289
|
# Selector specifying which fields to include in a partial response.
|
308
290
|
# @param [String] quota_user
|
309
|
-
#
|
310
|
-
# characters.
|
311
|
-
# @param [String] user_ip
|
312
|
-
# Deprecated. Please use quotaUser instead.
|
291
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
292
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
313
293
|
# @param [Google::Apis::RequestOptions] options
|
314
294
|
# Request-specific options
|
315
295
|
#
|
@@ -322,13 +302,12 @@ module Google
|
|
322
302
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
323
303
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
324
304
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
325
|
-
def stop_channel(channel_object = nil, fields: nil, quota_user: nil,
|
305
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
326
306
|
command = make_simple_command(:post, 'channels/stop', options)
|
327
307
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
328
308
|
command.request_object = channel_object
|
329
309
|
command.query['fields'] = fields unless fields.nil?
|
330
310
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
331
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
332
311
|
execute_or_queue_command(command, &block)
|
333
312
|
end
|
334
313
|
|
@@ -339,10 +318,8 @@ module Google
|
|
339
318
|
# @param [String] fields
|
340
319
|
# Selector specifying which fields to include in a partial response.
|
341
320
|
# @param [String] quota_user
|
342
|
-
#
|
343
|
-
# characters.
|
344
|
-
# @param [String] user_ip
|
345
|
-
# Deprecated. Please use quotaUser instead.
|
321
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
322
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
346
323
|
# @param [Google::Apis::RequestOptions] options
|
347
324
|
# Request-specific options
|
348
325
|
#
|
@@ -355,7 +332,7 @@ module Google
|
|
355
332
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
356
333
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
357
334
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
358
|
-
def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil,
|
335
|
+
def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
359
336
|
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
360
337
|
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
361
338
|
command.request_object = comment_object
|
@@ -364,7 +341,6 @@ module Google
|
|
364
341
|
command.params['fileId'] = file_id unless file_id.nil?
|
365
342
|
command.query['fields'] = fields unless fields.nil?
|
366
343
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
367
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
368
344
|
execute_or_queue_command(command, &block)
|
369
345
|
end
|
370
346
|
|
@@ -376,10 +352,8 @@ module Google
|
|
376
352
|
# @param [String] fields
|
377
353
|
# Selector specifying which fields to include in a partial response.
|
378
354
|
# @param [String] quota_user
|
379
|
-
#
|
380
|
-
# characters.
|
381
|
-
# @param [String] user_ip
|
382
|
-
# Deprecated. Please use quotaUser instead.
|
355
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
356
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
383
357
|
# @param [Google::Apis::RequestOptions] options
|
384
358
|
# Request-specific options
|
385
359
|
#
|
@@ -392,13 +366,12 @@ module Google
|
|
392
366
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
393
367
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
394
368
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
395
|
-
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil,
|
369
|
+
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
|
396
370
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
397
371
|
command.params['fileId'] = file_id unless file_id.nil?
|
398
372
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
399
373
|
command.query['fields'] = fields unless fields.nil?
|
400
374
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
401
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
402
375
|
execute_or_queue_command(command, &block)
|
403
376
|
end
|
404
377
|
|
@@ -413,10 +386,8 @@ module Google
|
|
413
386
|
# @param [String] fields
|
414
387
|
# Selector specifying which fields to include in a partial response.
|
415
388
|
# @param [String] quota_user
|
416
|
-
#
|
417
|
-
# characters.
|
418
|
-
# @param [String] user_ip
|
419
|
-
# Deprecated. Please use quotaUser instead.
|
389
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
390
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
420
391
|
# @param [Google::Apis::RequestOptions] options
|
421
392
|
# Request-specific options
|
422
393
|
#
|
@@ -429,7 +400,7 @@ module Google
|
|
429
400
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
430
401
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
431
402
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
432
|
-
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil,
|
403
|
+
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
433
404
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
434
405
|
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
435
406
|
command.response_class = Google::Apis::DriveV3::Comment
|
@@ -438,7 +409,6 @@ module Google
|
|
438
409
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
439
410
|
command.query['fields'] = fields unless fields.nil?
|
440
411
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
441
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
442
412
|
execute_or_queue_command(command, &block)
|
443
413
|
end
|
444
414
|
|
@@ -459,10 +429,8 @@ module Google
|
|
459
429
|
# @param [String] fields
|
460
430
|
# Selector specifying which fields to include in a partial response.
|
461
431
|
# @param [String] quota_user
|
462
|
-
#
|
463
|
-
# characters.
|
464
|
-
# @param [String] user_ip
|
465
|
-
# Deprecated. Please use quotaUser instead.
|
432
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
433
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
466
434
|
# @param [Google::Apis::RequestOptions] options
|
467
435
|
# Request-specific options
|
468
436
|
#
|
@@ -475,7 +443,7 @@ module Google
|
|
475
443
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
476
444
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
477
445
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
478
|
-
def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil,
|
446
|
+
def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
479
447
|
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
480
448
|
command.response_representation = Google::Apis::DriveV3::CommentList::Representation
|
481
449
|
command.response_class = Google::Apis::DriveV3::CommentList
|
@@ -486,7 +454,6 @@ module Google
|
|
486
454
|
command.query['startModifiedTime'] = start_modified_time unless start_modified_time.nil?
|
487
455
|
command.query['fields'] = fields unless fields.nil?
|
488
456
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
489
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
490
457
|
execute_or_queue_command(command, &block)
|
491
458
|
end
|
492
459
|
|
@@ -499,10 +466,8 @@ module Google
|
|
499
466
|
# @param [String] fields
|
500
467
|
# Selector specifying which fields to include in a partial response.
|
501
468
|
# @param [String] quota_user
|
502
|
-
#
|
503
|
-
# characters.
|
504
|
-
# @param [String] user_ip
|
505
|
-
# Deprecated. Please use quotaUser instead.
|
469
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
470
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
506
471
|
# @param [Google::Apis::RequestOptions] options
|
507
472
|
# Request-specific options
|
508
473
|
#
|
@@ -515,7 +480,7 @@ module Google
|
|
515
480
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
516
481
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
517
482
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
518
|
-
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil,
|
483
|
+
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
519
484
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
520
485
|
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
521
486
|
command.request_object = comment_object
|
@@ -525,25 +490,22 @@ module Google
|
|
525
490
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
526
491
|
command.query['fields'] = fields unless fields.nil?
|
527
492
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
528
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
529
493
|
execute_or_queue_command(command, &block)
|
530
494
|
end
|
531
495
|
|
532
496
|
# Creates a shared drive.
|
533
497
|
# @param [String] request_id
|
534
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
535
|
-
# for idempotent creation of a shared drive. A repeated request by the
|
536
|
-
# and with the same request ID will avoid creating duplicates by
|
537
|
-
# create the same shared drive. If the shared drive already exists
|
538
|
-
# will be returned.
|
498
|
+
# Required. An ID, such as a random UUID, which uniquely identifies this user's
|
499
|
+
# request for idempotent creation of a shared drive. A repeated request by the
|
500
|
+
# same user and with the same request ID will avoid creating duplicates by
|
501
|
+
# attempting to create the same shared drive. If the shared drive already exists
|
502
|
+
# a 409 error will be returned.
|
539
503
|
# @param [Google::Apis::DriveV3::Drive] drive_object
|
540
504
|
# @param [String] fields
|
541
505
|
# Selector specifying which fields to include in a partial response.
|
542
506
|
# @param [String] quota_user
|
543
|
-
#
|
544
|
-
# characters.
|
545
|
-
# @param [String] user_ip
|
546
|
-
# Deprecated. Please use quotaUser instead.
|
507
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
508
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
547
509
|
# @param [Google::Apis::RequestOptions] options
|
548
510
|
# Request-specific options
|
549
511
|
#
|
@@ -556,7 +518,7 @@ module Google
|
|
556
518
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
557
519
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
558
520
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
559
|
-
def create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil,
|
521
|
+
def create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
560
522
|
command = make_simple_command(:post, 'drives', options)
|
561
523
|
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
562
524
|
command.request_object = drive_object
|
@@ -565,7 +527,6 @@ module Google
|
|
565
527
|
command.query['requestId'] = request_id unless request_id.nil?
|
566
528
|
command.query['fields'] = fields unless fields.nil?
|
567
529
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
568
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
569
530
|
execute_or_queue_command(command, &block)
|
570
531
|
end
|
571
532
|
|
@@ -575,7 +536,7 @@ module Google
|
|
575
536
|
# The ID of the shared drive.
|
576
537
|
# @param [Boolean] allow_item_deletion
|
577
538
|
# Whether any items inside the shared drive should also be deleted. This option
|
578
|
-
# is only supported when useDomainAdminAccess is also set to true
|
539
|
+
# is only supported when `useDomainAdminAccess` is also set to `true`.
|
579
540
|
# @param [Boolean] use_domain_admin_access
|
580
541
|
# Issue the request as a domain administrator; if set to true, then the
|
581
542
|
# requester will be granted access if they are an administrator of the domain to
|
@@ -583,10 +544,8 @@ module Google
|
|
583
544
|
# @param [String] fields
|
584
545
|
# Selector specifying which fields to include in a partial response.
|
585
546
|
# @param [String] quota_user
|
586
|
-
#
|
587
|
-
# characters.
|
588
|
-
# @param [String] user_ip
|
589
|
-
# Deprecated. Please use quotaUser instead.
|
547
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
548
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
590
549
|
# @param [Google::Apis::RequestOptions] options
|
591
550
|
# Request-specific options
|
592
551
|
#
|
@@ -599,14 +558,13 @@ module Google
|
|
599
558
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
600
559
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
601
560
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
602
|
-
def delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
561
|
+
def delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
603
562
|
command = make_simple_command(:delete, 'drives/{driveId}', options)
|
604
563
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
605
564
|
command.query['allowItemDeletion'] = allow_item_deletion unless allow_item_deletion.nil?
|
606
565
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
607
566
|
command.query['fields'] = fields unless fields.nil?
|
608
567
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
609
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
610
568
|
execute_or_queue_command(command, &block)
|
611
569
|
end
|
612
570
|
|
@@ -620,10 +578,8 @@ module Google
|
|
620
578
|
# @param [String] fields
|
621
579
|
# Selector specifying which fields to include in a partial response.
|
622
580
|
# @param [String] quota_user
|
623
|
-
#
|
624
|
-
# characters.
|
625
|
-
# @param [String] user_ip
|
626
|
-
# Deprecated. Please use quotaUser instead.
|
581
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
582
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
627
583
|
# @param [Google::Apis::RequestOptions] options
|
628
584
|
# Request-specific options
|
629
585
|
#
|
@@ -636,7 +592,7 @@ module Google
|
|
636
592
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
637
593
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
638
594
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
639
|
-
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
595
|
+
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
640
596
|
command = make_simple_command(:get, 'drives/{driveId}', options)
|
641
597
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
642
598
|
command.response_class = Google::Apis::DriveV3::Drive
|
@@ -644,7 +600,6 @@ module Google
|
|
644
600
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
645
601
|
command.query['fields'] = fields unless fields.nil?
|
646
602
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
647
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
648
603
|
execute_or_queue_command(command, &block)
|
649
604
|
end
|
650
605
|
|
@@ -654,10 +609,8 @@ module Google
|
|
654
609
|
# @param [String] fields
|
655
610
|
# Selector specifying which fields to include in a partial response.
|
656
611
|
# @param [String] quota_user
|
657
|
-
#
|
658
|
-
# characters.
|
659
|
-
# @param [String] user_ip
|
660
|
-
# Deprecated. Please use quotaUser instead.
|
612
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
613
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
661
614
|
# @param [Google::Apis::RequestOptions] options
|
662
615
|
# Request-specific options
|
663
616
|
#
|
@@ -670,18 +623,20 @@ module Google
|
|
670
623
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
671
624
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
672
625
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
673
|
-
def hide_drive(drive_id, fields: nil, quota_user: nil,
|
626
|
+
def hide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
674
627
|
command = make_simple_command(:post, 'drives/{driveId}/hide', options)
|
675
628
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
676
629
|
command.response_class = Google::Apis::DriveV3::Drive
|
677
630
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
678
631
|
command.query['fields'] = fields unless fields.nil?
|
679
632
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
680
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
681
633
|
execute_or_queue_command(command, &block)
|
682
634
|
end
|
683
635
|
|
684
|
-
# Lists the user's shared drives.
|
636
|
+
# Lists the user's shared drives. This method accepts the `q` parameter, which
|
637
|
+
# is a search query combining one or more search terms. For more information,
|
638
|
+
# see the [Search for shared drives](/drive/api/guides/search-shareddrives)
|
639
|
+
# guide.
|
685
640
|
# @param [Fixnum] page_size
|
686
641
|
# Maximum number of shared drives to return per page.
|
687
642
|
# @param [String] page_token
|
@@ -694,10 +649,8 @@ module Google
|
|
694
649
|
# @param [String] fields
|
695
650
|
# Selector specifying which fields to include in a partial response.
|
696
651
|
# @param [String] quota_user
|
697
|
-
#
|
698
|
-
# characters.
|
699
|
-
# @param [String] user_ip
|
700
|
-
# Deprecated. Please use quotaUser instead.
|
652
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
653
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
701
654
|
# @param [Google::Apis::RequestOptions] options
|
702
655
|
# Request-specific options
|
703
656
|
#
|
@@ -710,7 +663,7 @@ module Google
|
|
710
663
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
711
664
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
712
665
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
713
|
-
def list_drives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
666
|
+
def list_drives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
714
667
|
command = make_simple_command(:get, 'drives', options)
|
715
668
|
command.response_representation = Google::Apis::DriveV3::DriveList::Representation
|
716
669
|
command.response_class = Google::Apis::DriveV3::DriveList
|
@@ -720,7 +673,6 @@ module Google
|
|
720
673
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
721
674
|
command.query['fields'] = fields unless fields.nil?
|
722
675
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
723
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
724
676
|
execute_or_queue_command(command, &block)
|
725
677
|
end
|
726
678
|
|
@@ -730,10 +682,8 @@ module Google
|
|
730
682
|
# @param [String] fields
|
731
683
|
# Selector specifying which fields to include in a partial response.
|
732
684
|
# @param [String] quota_user
|
733
|
-
#
|
734
|
-
# characters.
|
735
|
-
# @param [String] user_ip
|
736
|
-
# Deprecated. Please use quotaUser instead.
|
685
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
686
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
737
687
|
# @param [Google::Apis::RequestOptions] options
|
738
688
|
# Request-specific options
|
739
689
|
#
|
@@ -746,32 +696,29 @@ module Google
|
|
746
696
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
747
697
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
748
698
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
749
|
-
def unhide_drive(drive_id, fields: nil, quota_user: nil,
|
699
|
+
def unhide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
750
700
|
command = make_simple_command(:post, 'drives/{driveId}/unhide', options)
|
751
701
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
752
702
|
command.response_class = Google::Apis::DriveV3::Drive
|
753
703
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
754
704
|
command.query['fields'] = fields unless fields.nil?
|
755
705
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
756
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
757
706
|
execute_or_queue_command(command, &block)
|
758
707
|
end
|
759
708
|
|
760
|
-
# Updates the
|
709
|
+
# Updates the metadate for a shared drive.
|
761
710
|
# @param [String] drive_id
|
762
711
|
# The ID of the shared drive.
|
763
712
|
# @param [Google::Apis::DriveV3::Drive] drive_object
|
764
713
|
# @param [Boolean] use_domain_admin_access
|
765
|
-
# Issue the request as a domain administrator
|
766
|
-
# requester
|
767
|
-
# the shared drive belongs.
|
714
|
+
# Issue the request as a domain administrator; if set to true, then the
|
715
|
+
# requester will be granted access if they are an administrator of the domain to
|
716
|
+
# which the shared drive belongs.
|
768
717
|
# @param [String] fields
|
769
718
|
# Selector specifying which fields to include in a partial response.
|
770
719
|
# @param [String] quota_user
|
771
|
-
#
|
772
|
-
# characters.
|
773
|
-
# @param [String] user_ip
|
774
|
-
# Deprecated. Please use quotaUser instead.
|
720
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
721
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
775
722
|
# @param [Google::Apis::RequestOptions] options
|
776
723
|
# Request-specific options
|
777
724
|
#
|
@@ -784,7 +731,7 @@ module Google
|
|
784
731
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
785
732
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
786
733
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
787
|
-
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
734
|
+
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
788
735
|
command = make_simple_command(:patch, 'drives/{driveId}', options)
|
789
736
|
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
790
737
|
command.request_object = drive_object
|
@@ -794,12 +741,11 @@ module Google
|
|
794
741
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
795
742
|
command.query['fields'] = fields unless fields.nil?
|
796
743
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
797
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
798
744
|
execute_or_queue_command(command, &block)
|
799
745
|
end
|
800
746
|
|
801
747
|
# Creates a copy of a file and applies any requested updates with patch
|
802
|
-
# semantics.
|
748
|
+
# semantics.
|
803
749
|
# @param [String] file_id
|
804
750
|
# The ID of the file.
|
805
751
|
# @param [Google::Apis::DriveV3::File] file_object
|
@@ -812,7 +758,7 @@ module Google
|
|
812
758
|
# the domain by default; this parameter bypasses that behavior for the request.
|
813
759
|
# Permissions are still inherited from parent folders.
|
814
760
|
# @param [String] include_labels
|
815
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
761
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
816
762
|
# the response.
|
817
763
|
# @param [String] include_permissions_for_view
|
818
764
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -827,14 +773,12 @@ module Google
|
|
827
773
|
# @param [Boolean] supports_all_drives
|
828
774
|
# Whether the requesting application supports both My Drives and shared drives.
|
829
775
|
# @param [Boolean] supports_team_drives
|
830
|
-
# Deprecated
|
776
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
831
777
|
# @param [String] fields
|
832
778
|
# Selector specifying which fields to include in a partial response.
|
833
779
|
# @param [String] quota_user
|
834
|
-
#
|
835
|
-
# characters.
|
836
|
-
# @param [String] user_ip
|
837
|
-
# Deprecated. Please use quotaUser instead.
|
780
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
781
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
838
782
|
# @param [Google::Apis::RequestOptions] options
|
839
783
|
# Request-specific options
|
840
784
|
#
|
@@ -847,7 +791,7 @@ module Google
|
|
847
791
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
848
792
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
849
793
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
850
|
-
def copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
794
|
+
def copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
851
795
|
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
852
796
|
command.request_representation = Google::Apis::DriveV3::File::Representation
|
853
797
|
command.request_object = file_object
|
@@ -864,11 +808,26 @@ module Google
|
|
864
808
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
865
809
|
command.query['fields'] = fields unless fields.nil?
|
866
810
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
867
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
868
811
|
execute_or_queue_command(command, &block)
|
869
812
|
end
|
870
813
|
|
871
|
-
# Creates a file.
|
814
|
+
# Creates a new file. This method supports an */upload* URI and accepts
|
815
|
+
# uploaded media with the following characteristics: - *Maximum file size:* 5,
|
816
|
+
# 120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type,
|
817
|
+
# rather than the literal `*/*` value. The literal `*/*` is only used to
|
818
|
+
# indicate that any valid MIME type can be uploaded. For more information on
|
819
|
+
# uploading files, see [Upload file data](/drive/api/guides/manage-uploads).
|
820
|
+
# Apps creating shortcuts with `files.create` must specify the MIME type `
|
821
|
+
# application/vnd.google-apps.shortcut`. Apps should specify a file extension in
|
822
|
+
# the `name` property when inserting files with the API. For example, an
|
823
|
+
# operation to insert a JPEG file should specify something like `"name": "cat.
|
824
|
+
# jpg"` in the metadata. Subsequent `GET` requests include the read-only `
|
825
|
+
# fileExtension` property populated with the extension originally specified in
|
826
|
+
# the `title` property. When a Google Drive user requests to download a file, or
|
827
|
+
# when the file is downloaded through the sync client, Drive builds a full
|
828
|
+
# filename (with extension) based on the title. In cases where the extension is
|
829
|
+
# missing, Drive attempts to determine the extension based on the file's MIME
|
830
|
+
# type.
|
872
831
|
# @param [Google::Apis::DriveV3::File] file_object
|
873
832
|
# @param [Boolean] enforce_single_parent
|
874
833
|
# Deprecated. Creating files in multiple folders is no longer supported.
|
@@ -878,7 +837,7 @@ module Google
|
|
878
837
|
# the domain by default; this parameter bypasses that behavior for the request.
|
879
838
|
# Permissions are still inherited from parent folders.
|
880
839
|
# @param [String] include_labels
|
881
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
840
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
882
841
|
# the response.
|
883
842
|
# @param [String] include_permissions_for_view
|
884
843
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -893,16 +852,14 @@ module Google
|
|
893
852
|
# @param [Boolean] supports_all_drives
|
894
853
|
# Whether the requesting application supports both My Drives and shared drives.
|
895
854
|
# @param [Boolean] supports_team_drives
|
896
|
-
# Deprecated
|
855
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
897
856
|
# @param [Boolean] use_content_as_indexable_text
|
898
857
|
# Whether to use the uploaded content as indexable text.
|
899
858
|
# @param [String] fields
|
900
859
|
# Selector specifying which fields to include in a partial response.
|
901
860
|
# @param [String] quota_user
|
902
|
-
#
|
903
|
-
# characters.
|
904
|
-
# @param [String] user_ip
|
905
|
-
# Deprecated. Please use quotaUser instead.
|
861
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
862
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
906
863
|
# @param [IO, String] upload_source
|
907
864
|
# IO stream or filename containing content to upload
|
908
865
|
# @param [String] content_type
|
@@ -919,7 +876,7 @@ module Google
|
|
919
876
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
920
877
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
921
878
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
922
|
-
def create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil,
|
879
|
+
def create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
923
880
|
if upload_source.nil?
|
924
881
|
command = make_simple_command(:post, 'files', options)
|
925
882
|
else
|
@@ -942,7 +899,6 @@ module Google
|
|
942
899
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
943
900
|
command.query['fields'] = fields unless fields.nil?
|
944
901
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
945
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
946
902
|
execute_or_queue_command(command, &block)
|
947
903
|
end
|
948
904
|
|
@@ -953,19 +909,17 @@ module Google
|
|
953
909
|
# @param [String] file_id
|
954
910
|
# The ID of the file.
|
955
911
|
# @param [Boolean] enforce_single_parent
|
956
|
-
# Deprecated
|
912
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
957
913
|
# but the item itself is not, the item will be placed under its owner's root.
|
958
914
|
# @param [Boolean] supports_all_drives
|
959
915
|
# Whether the requesting application supports both My Drives and shared drives.
|
960
916
|
# @param [Boolean] supports_team_drives
|
961
|
-
# Deprecated
|
917
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
962
918
|
# @param [String] fields
|
963
919
|
# Selector specifying which fields to include in a partial response.
|
964
920
|
# @param [String] quota_user
|
965
|
-
#
|
966
|
-
# characters.
|
967
|
-
# @param [String] user_ip
|
968
|
-
# Deprecated. Please use quotaUser instead.
|
921
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
922
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
969
923
|
# @param [Google::Apis::RequestOptions] options
|
970
924
|
# Request-specific options
|
971
925
|
#
|
@@ -978,7 +932,7 @@ module Google
|
|
978
932
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
979
933
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
980
934
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
981
|
-
def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
935
|
+
def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
982
936
|
command = make_simple_command(:delete, 'files/{fileId}', options)
|
983
937
|
command.params['fileId'] = file_id unless file_id.nil?
|
984
938
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
@@ -986,7 +940,6 @@ module Google
|
|
986
940
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
987
941
|
command.query['fields'] = fields unless fields.nil?
|
988
942
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
989
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
990
943
|
execute_or_queue_command(command, &block)
|
991
944
|
end
|
992
945
|
|
@@ -994,15 +947,13 @@ module Google
|
|
994
947
|
# @param [String] drive_id
|
995
948
|
# If set, empties the trash of the provided shared drive.
|
996
949
|
# @param [Boolean] enforce_single_parent
|
997
|
-
# Deprecated
|
950
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
998
951
|
# but the item itself is not, the item will be placed under its owner's root.
|
999
952
|
# @param [String] fields
|
1000
953
|
# Selector specifying which fields to include in a partial response.
|
1001
954
|
# @param [String] quota_user
|
1002
|
-
#
|
1003
|
-
# characters.
|
1004
|
-
# @param [String] user_ip
|
1005
|
-
# Deprecated. Please use quotaUser instead.
|
955
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
956
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1006
957
|
# @param [Google::Apis::RequestOptions] options
|
1007
958
|
# Request-specific options
|
1008
959
|
#
|
@@ -1015,13 +966,12 @@ module Google
|
|
1015
966
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1016
967
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1017
968
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1018
|
-
def empty_file_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil,
|
969
|
+
def empty_file_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1019
970
|
command = make_simple_command(:delete, 'files/trash', options)
|
1020
971
|
command.query['driveId'] = drive_id unless drive_id.nil?
|
1021
972
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
1022
973
|
command.query['fields'] = fields unless fields.nil?
|
1023
974
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1024
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1025
975
|
execute_or_queue_command(command, &block)
|
1026
976
|
end
|
1027
977
|
|
@@ -1030,14 +980,12 @@ module Google
|
|
1030
980
|
# @param [String] file_id
|
1031
981
|
# The ID of the file.
|
1032
982
|
# @param [String] mime_type
|
1033
|
-
# The MIME type of the format requested for this export.
|
983
|
+
# Required. The MIME type of the format requested for this export.
|
1034
984
|
# @param [String] fields
|
1035
985
|
# Selector specifying which fields to include in a partial response.
|
1036
986
|
# @param [String] quota_user
|
1037
|
-
#
|
1038
|
-
# characters.
|
1039
|
-
# @param [String] user_ip
|
1040
|
-
# Deprecated. Please use quotaUser instead.
|
987
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
988
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1041
989
|
# @param [IO, String] download_dest
|
1042
990
|
# IO stream or filename to receive content download
|
1043
991
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1052,7 +1000,7 @@ module Google
|
|
1052
1000
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1053
1001
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1054
1002
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1055
|
-
def export_file(file_id, mime_type, fields: nil, quota_user: nil,
|
1003
|
+
def export_file(file_id, mime_type, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
1056
1004
|
if download_dest.nil?
|
1057
1005
|
command = make_simple_command(:get, 'files/{fileId}/export', options)
|
1058
1006
|
else
|
@@ -1063,7 +1011,6 @@ module Google
|
|
1063
1011
|
command.query['mimeType'] = mime_type unless mime_type.nil?
|
1064
1012
|
command.query['fields'] = fields unless fields.nil?
|
1065
1013
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1066
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1067
1014
|
execute_or_queue_command(command, &block)
|
1068
1015
|
end
|
1069
1016
|
|
@@ -1075,15 +1022,13 @@ module Google
|
|
1075
1022
|
# are 'drive' and 'appDataFolder'. (Default: 'drive')
|
1076
1023
|
# @param [String] type
|
1077
1024
|
# The type of items which the IDs can be used for. Supported values are 'files'
|
1078
|
-
# and 'shortcuts'. Note that 'shortcuts' are only supported in the drive '
|
1079
|
-
# (Default: 'files')
|
1025
|
+
# and 'shortcuts'. Note that 'shortcuts' are only supported in the `drive` '
|
1026
|
+
# space'. (Default: 'files')
|
1080
1027
|
# @param [String] fields
|
1081
1028
|
# Selector specifying which fields to include in a partial response.
|
1082
1029
|
# @param [String] quota_user
|
1083
|
-
#
|
1084
|
-
# characters.
|
1085
|
-
# @param [String] user_ip
|
1086
|
-
# Deprecated. Please use quotaUser instead.
|
1030
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1031
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1087
1032
|
# @param [Google::Apis::RequestOptions] options
|
1088
1033
|
# Request-specific options
|
1089
1034
|
#
|
@@ -1096,7 +1041,7 @@ module Google
|
|
1096
1041
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1097
1042
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1098
1043
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1099
|
-
def generate_file_ids(count: nil, space: nil, type: nil, fields: nil, quota_user: nil,
|
1044
|
+
def generate_file_ids(count: nil, space: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1100
1045
|
command = make_simple_command(:get, 'files/generateIds', options)
|
1101
1046
|
command.response_representation = Google::Apis::DriveV3::GeneratedIds::Representation
|
1102
1047
|
command.response_class = Google::Apis::DriveV3::GeneratedIds
|
@@ -1105,18 +1050,22 @@ module Google
|
|
1105
1050
|
command.query['type'] = type unless type.nil?
|
1106
1051
|
command.query['fields'] = fields unless fields.nil?
|
1107
1052
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1108
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1109
1053
|
execute_or_queue_command(command, &block)
|
1110
1054
|
end
|
1111
1055
|
|
1112
|
-
# Gets a file's metadata or content by ID.
|
1056
|
+
# Gets a file's metadata or content by ID. If you provide the URL parameter `
|
1057
|
+
# alt=media`, then the response includes the file contents in the response body.
|
1058
|
+
# Downloading content with `alt=media` only works if the file is stored in Drive.
|
1059
|
+
# To download Google Docs, Sheets, and Slides use [`files.export`](/drive/api/
|
1060
|
+
# reference/rest/v3/files/export) instead. For more information, see [Download &
|
1061
|
+
# export files](/drive/api/guides/manage-downloads).
|
1113
1062
|
# @param [String] file_id
|
1114
1063
|
# The ID of the file.
|
1115
1064
|
# @param [Boolean] acknowledge_abuse
|
1116
1065
|
# Whether the user is acknowledging the risk of downloading known malware or
|
1117
1066
|
# other abusive files. This is only applicable when alt=media.
|
1118
1067
|
# @param [String] include_labels
|
1119
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1068
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1120
1069
|
# the response.
|
1121
1070
|
# @param [String] include_permissions_for_view
|
1122
1071
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1124,14 +1073,12 @@ module Google
|
|
1124
1073
|
# @param [Boolean] supports_all_drives
|
1125
1074
|
# Whether the requesting application supports both My Drives and shared drives.
|
1126
1075
|
# @param [Boolean] supports_team_drives
|
1127
|
-
# Deprecated
|
1076
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1128
1077
|
# @param [String] fields
|
1129
1078
|
# Selector specifying which fields to include in a partial response.
|
1130
1079
|
# @param [String] quota_user
|
1131
|
-
#
|
1132
|
-
# characters.
|
1133
|
-
# @param [String] user_ip
|
1134
|
-
# Deprecated. Please use quotaUser instead.
|
1080
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1081
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1135
1082
|
# @param [IO, String] download_dest
|
1136
1083
|
# IO stream or filename to receive content download
|
1137
1084
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1146,7 +1093,7 @@ module Google
|
|
1146
1093
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1147
1094
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1148
1095
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1149
|
-
def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1096
|
+
def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
1150
1097
|
if download_dest.nil?
|
1151
1098
|
command = make_simple_command(:get, 'files/{fileId}', options)
|
1152
1099
|
else
|
@@ -1163,40 +1110,40 @@ module Google
|
|
1163
1110
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1164
1111
|
command.query['fields'] = fields unless fields.nil?
|
1165
1112
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1166
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1167
1113
|
execute_or_queue_command(command, &block)
|
1168
1114
|
end
|
1169
1115
|
|
1170
|
-
# Lists
|
1116
|
+
# Lists the user's files. This method accepts the `q` parameter, which is a
|
1117
|
+
# search query combining one or more search terms. For more information, see the
|
1118
|
+
# [Search for files & folders](/drive/api/guides/search-files) guide. *Note:*
|
1119
|
+
# This method returns *all* files by default, including trashed files. If you
|
1120
|
+
# don't want trashed files to appear in the list, use the `trashed=false` query
|
1121
|
+
# parameter to remove trashed files from the results.
|
1171
1122
|
# @param [String] corpora
|
1172
|
-
#
|
1173
|
-
#
|
1174
|
-
#
|
1175
|
-
#
|
1176
|
-
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
1177
|
-
# or 'drive', instead of 'allDrives', for efficiency.
|
1123
|
+
# Bodies of items (files/documents) to which the query applies. Supported bodies
|
1124
|
+
# are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to '
|
1125
|
+
# allDrives' for efficiency. By default, corpora is set to 'user'. However, this
|
1126
|
+
# can change depending on the filter set through the 'q' parameter.
|
1178
1127
|
# @param [String] corpus
|
1179
|
-
# The source of files to list.
|
1128
|
+
# Deprecated: The source of files to list. Use 'corpora' instead.
|
1180
1129
|
# @param [String] drive_id
|
1181
1130
|
# ID of the shared drive to search.
|
1182
1131
|
# @param [Boolean] include_items_from_all_drives
|
1183
1132
|
# Whether both My Drive and shared drive items should be included in results.
|
1184
1133
|
# @param [String] include_labels
|
1185
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1134
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1186
1135
|
# the response.
|
1187
1136
|
# @param [String] include_permissions_for_view
|
1188
1137
|
# Specifies which additional view's permissions to include in the response. Only
|
1189
1138
|
# 'published' is supported.
|
1190
1139
|
# @param [Boolean] include_team_drive_items
|
1191
|
-
# Deprecated
|
1140
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
1192
1141
|
# @param [String] order_by
|
1193
1142
|
# A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', '
|
1194
1143
|
# modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', '
|
1195
1144
|
# recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts
|
1196
|
-
# ascending by default, but
|
1197
|
-
# usage: ?orderBy=folder,modifiedTime desc,name.
|
1198
|
-
# current limitation for users with approximately one million files in which the
|
1199
|
-
# requested sort order is ignored.
|
1145
|
+
# ascending by default, but can be reversed with the 'desc' modifier. Example
|
1146
|
+
# usage: ?orderBy=folder,modifiedTime desc,name.
|
1200
1147
|
# @param [Fixnum] page_size
|
1201
1148
|
# The maximum number of files to return per page. Partial or empty result pages
|
1202
1149
|
# are possible even before the end of the files list has been reached.
|
@@ -1204,24 +1151,22 @@ module Google
|
|
1204
1151
|
# The token for continuing a previous list request on the next page. This should
|
1205
1152
|
# be set to the value of 'nextPageToken' from the previous response.
|
1206
1153
|
# @param [String] q
|
1207
|
-
# A query for filtering the file results. See the "Search for
|
1208
|
-
# supported syntax.
|
1154
|
+
# A query for filtering the file results. See the "Search for files & folders"
|
1155
|
+
# guide for supported syntax.
|
1209
1156
|
# @param [String] spaces
|
1210
1157
|
# A comma-separated list of spaces to query within the corpora. Supported values
|
1211
1158
|
# are 'drive' and 'appDataFolder'.
|
1212
1159
|
# @param [Boolean] supports_all_drives
|
1213
1160
|
# Whether the requesting application supports both My Drives and shared drives.
|
1214
1161
|
# @param [Boolean] supports_team_drives
|
1215
|
-
# Deprecated
|
1162
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1216
1163
|
# @param [String] team_drive_id
|
1217
|
-
# Deprecated
|
1164
|
+
# Deprecated: Use `driveId` instead.
|
1218
1165
|
# @param [String] fields
|
1219
1166
|
# Selector specifying which fields to include in a partial response.
|
1220
1167
|
# @param [String] quota_user
|
1221
|
-
#
|
1222
|
-
# characters.
|
1223
|
-
# @param [String] user_ip
|
1224
|
-
# Deprecated. Please use quotaUser instead.
|
1168
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1169
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1225
1170
|
# @param [Google::Apis::RequestOptions] options
|
1226
1171
|
# Request-specific options
|
1227
1172
|
#
|
@@ -1234,7 +1179,7 @@ module Google
|
|
1234
1179
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1235
1180
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1236
1181
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1237
|
-
def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
1182
|
+
def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1238
1183
|
command = make_simple_command(:get, 'files', options)
|
1239
1184
|
command.response_representation = Google::Apis::DriveV3::FileList::Representation
|
1240
1185
|
command.response_class = Google::Apis::DriveV3::FileList
|
@@ -1255,26 +1200,22 @@ module Google
|
|
1255
1200
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
1256
1201
|
command.query['fields'] = fields unless fields.nil?
|
1257
1202
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1258
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1259
1203
|
execute_or_queue_command(command, &block)
|
1260
1204
|
end
|
1261
1205
|
|
1262
1206
|
# Lists the labels on a file.
|
1263
1207
|
# @param [String] file_id
|
1264
|
-
# The ID
|
1208
|
+
# The ID for the file or shared drive.
|
1265
1209
|
# @param [Fixnum] max_results
|
1266
|
-
# The maximum number of labels to return per page. When not set,
|
1267
|
-
# to 100.
|
1210
|
+
# The maximum number of labels to return per page. When not set, defaults to 100.
|
1268
1211
|
# @param [String] page_token
|
1269
1212
|
# The token for continuing a previous list request on the next page. This should
|
1270
1213
|
# be set to the value of 'nextPageToken' from the previous response.
|
1271
1214
|
# @param [String] fields
|
1272
1215
|
# Selector specifying which fields to include in a partial response.
|
1273
1216
|
# @param [String] quota_user
|
1274
|
-
#
|
1275
|
-
# characters.
|
1276
|
-
# @param [String] user_ip
|
1277
|
-
# Deprecated. Please use quotaUser instead.
|
1217
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1218
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1278
1219
|
# @param [Google::Apis::RequestOptions] options
|
1279
1220
|
# Request-specific options
|
1280
1221
|
#
|
@@ -1287,7 +1228,7 @@ module Google
|
|
1287
1228
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1288
1229
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1289
1230
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1290
|
-
def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil,
|
1231
|
+
def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1291
1232
|
command = make_simple_command(:get, 'files/{fileId}/listLabels', options)
|
1292
1233
|
command.response_representation = Google::Apis::DriveV3::LabelList::Representation
|
1293
1234
|
command.response_class = Google::Apis::DriveV3::LabelList
|
@@ -1296,21 +1237,19 @@ module Google
|
|
1296
1237
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1297
1238
|
command.query['fields'] = fields unless fields.nil?
|
1298
1239
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1299
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1300
1240
|
execute_or_queue_command(command, &block)
|
1301
1241
|
end
|
1302
1242
|
|
1303
|
-
# Modifies the set of labels
|
1243
|
+
# Modifies the set of labels applied to a file. Returns a list of the labels
|
1244
|
+
# that were added or modified.
|
1304
1245
|
# @param [String] file_id
|
1305
|
-
# The ID of the file
|
1246
|
+
# The ID of the file to which the labels belong.
|
1306
1247
|
# @param [Google::Apis::DriveV3::ModifyLabelsRequest] modify_labels_request_object
|
1307
1248
|
# @param [String] fields
|
1308
1249
|
# Selector specifying which fields to include in a partial response.
|
1309
1250
|
# @param [String] quota_user
|
1310
|
-
#
|
1311
|
-
# characters.
|
1312
|
-
# @param [String] user_ip
|
1313
|
-
# Deprecated. Please use quotaUser instead.
|
1251
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1252
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1314
1253
|
# @param [Google::Apis::RequestOptions] options
|
1315
1254
|
# Request-specific options
|
1316
1255
|
#
|
@@ -1323,7 +1262,7 @@ module Google
|
|
1323
1262
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1324
1263
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1325
1264
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1326
|
-
def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil,
|
1265
|
+
def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1327
1266
|
command = make_simple_command(:post, 'files/{fileId}/modifyLabels', options)
|
1328
1267
|
command.request_representation = Google::Apis::DriveV3::ModifyLabelsRequest::Representation
|
1329
1268
|
command.request_object = modify_labels_request_object
|
@@ -1332,24 +1271,28 @@ module Google
|
|
1332
1271
|
command.params['fileId'] = file_id unless file_id.nil?
|
1333
1272
|
command.query['fields'] = fields unless fields.nil?
|
1334
1273
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1335
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1336
1274
|
execute_or_queue_command(command, &block)
|
1337
1275
|
end
|
1338
1276
|
|
1339
1277
|
# Updates a file's metadata and/or content. When calling this method, only
|
1340
1278
|
# populate fields in the request that you want to modify. When updating fields,
|
1341
|
-
# some fields might
|
1342
|
-
# supports patch semantics.
|
1279
|
+
# some fields might be changed automatically, such as `modifiedDate`. This
|
1280
|
+
# method supports patch semantics. This method supports an */upload* URI and
|
1281
|
+
# accepts uploaded media with the following characteristics: - *Maximum file
|
1282
|
+
# size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME
|
1283
|
+
# type, rather than the literal `*/*` value. The literal `*/*` is only used to
|
1284
|
+
# indicate that any valid MIME type can be uploaded. For more information on
|
1285
|
+
# uploading files, see [Upload file data](/drive/api/guides/manage-uploads).
|
1343
1286
|
# @param [String] file_id
|
1344
1287
|
# The ID of the file.
|
1345
1288
|
# @param [Google::Apis::DriveV3::File] file_object
|
1346
1289
|
# @param [String] add_parents
|
1347
1290
|
# A comma-separated list of parent IDs to add.
|
1348
1291
|
# @param [Boolean] enforce_single_parent
|
1349
|
-
# Deprecated
|
1292
|
+
# Deprecated: Adding files to multiple folders is no longer supported. Use
|
1350
1293
|
# shortcuts instead.
|
1351
1294
|
# @param [String] include_labels
|
1352
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1295
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1353
1296
|
# the response.
|
1354
1297
|
# @param [String] include_permissions_for_view
|
1355
1298
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1366,16 +1309,14 @@ module Google
|
|
1366
1309
|
# @param [Boolean] supports_all_drives
|
1367
1310
|
# Whether the requesting application supports both My Drives and shared drives.
|
1368
1311
|
# @param [Boolean] supports_team_drives
|
1369
|
-
# Deprecated
|
1312
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1370
1313
|
# @param [Boolean] use_content_as_indexable_text
|
1371
1314
|
# Whether to use the uploaded content as indexable text.
|
1372
1315
|
# @param [String] fields
|
1373
1316
|
# Selector specifying which fields to include in a partial response.
|
1374
1317
|
# @param [String] quota_user
|
1375
|
-
#
|
1376
|
-
# characters.
|
1377
|
-
# @param [String] user_ip
|
1378
|
-
# Deprecated. Please use quotaUser instead.
|
1318
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1319
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1379
1320
|
# @param [IO, String] upload_source
|
1380
1321
|
# IO stream or filename containing content to upload
|
1381
1322
|
# @param [String] content_type
|
@@ -1392,7 +1333,7 @@ module Google
|
|
1392
1333
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1393
1334
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1394
1335
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1395
|
-
def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil,
|
1336
|
+
def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
1396
1337
|
if upload_source.nil?
|
1397
1338
|
command = make_simple_command(:patch, 'files/{fileId}', options)
|
1398
1339
|
else
|
@@ -1417,7 +1358,6 @@ module Google
|
|
1417
1358
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
1418
1359
|
command.query['fields'] = fields unless fields.nil?
|
1419
1360
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1420
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1421
1361
|
execute_or_queue_command(command, &block)
|
1422
1362
|
end
|
1423
1363
|
|
@@ -1429,7 +1369,7 @@ module Google
|
|
1429
1369
|
# Whether the user is acknowledging the risk of downloading known malware or
|
1430
1370
|
# other abusive files. This is only applicable when alt=media.
|
1431
1371
|
# @param [String] include_labels
|
1432
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1372
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1433
1373
|
# the response.
|
1434
1374
|
# @param [String] include_permissions_for_view
|
1435
1375
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1437,16 +1377,12 @@ module Google
|
|
1437
1377
|
# @param [Boolean] supports_all_drives
|
1438
1378
|
# Whether the requesting application supports both My Drives and shared drives.
|
1439
1379
|
# @param [Boolean] supports_team_drives
|
1440
|
-
# Deprecated
|
1380
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1441
1381
|
# @param [String] fields
|
1442
1382
|
# Selector specifying which fields to include in a partial response.
|
1443
1383
|
# @param [String] quota_user
|
1444
|
-
#
|
1445
|
-
# characters.
|
1446
|
-
# @param [String] user_ip
|
1447
|
-
# Deprecated. Please use quotaUser instead.
|
1448
|
-
# @param [IO, String] download_dest
|
1449
|
-
# IO stream or filename to receive content download
|
1384
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1385
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1450
1386
|
# @param [Google::Apis::RequestOptions] options
|
1451
1387
|
# Request-specific options
|
1452
1388
|
#
|
@@ -1459,13 +1395,8 @@ module Google
|
|
1459
1395
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1460
1396
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1461
1397
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1462
|
-
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1463
|
-
|
1464
|
-
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
1465
|
-
else
|
1466
|
-
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
1467
|
-
command.download_dest = download_dest
|
1468
|
-
end
|
1398
|
+
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1399
|
+
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
1469
1400
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
1470
1401
|
command.request_object = channel_object
|
1471
1402
|
command.response_representation = Google::Apis::DriveV3::Channel::Representation
|
@@ -1478,24 +1409,24 @@ module Google
|
|
1478
1409
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1479
1410
|
command.query['fields'] = fields unless fields.nil?
|
1480
1411
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1481
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1482
1412
|
execute_or_queue_command(command, &block)
|
1483
1413
|
end
|
1484
1414
|
|
1485
|
-
# Creates a permission for a file or shared drive.
|
1486
|
-
#
|
1415
|
+
# Creates a permission for a file or shared drive. **Warning:** Concurrent
|
1416
|
+
# permissions operations on the same file are not supported; only the last
|
1417
|
+
# update is applied.
|
1487
1418
|
# @param [String] file_id
|
1488
1419
|
# The ID of the file or shared drive.
|
1489
1420
|
# @param [Google::Apis::DriveV3::Permission] permission_object
|
1490
1421
|
# @param [String] email_message
|
1491
1422
|
# A plain text custom message to include in the notification email.
|
1492
1423
|
# @param [Boolean] enforce_single_parent
|
1493
|
-
# Deprecated
|
1424
|
+
# Deprecated: See `moveToNewOwnersRoot` for details.
|
1494
1425
|
# @param [Boolean] move_to_new_owners_root
|
1495
1426
|
# This parameter will only take effect if the item is not in a shared drive and
|
1496
|
-
# the request is attempting to transfer the ownership of the item. If set to
|
1497
|
-
# true
|
1498
|
-
# prior parents removed. If set to false
|
1427
|
+
# the request is attempting to transfer the ownership of the item. If set to `
|
1428
|
+
# true`, the item will be moved to the new owner's My Drive root folder and all
|
1429
|
+
# prior parents removed. If set to `false`, parents are not changed.
|
1499
1430
|
# @param [Boolean] send_notification_email
|
1500
1431
|
# Whether to send a notification email when sharing to users or groups. This
|
1501
1432
|
# defaults to true for users and groups, and is not allowed for other requests.
|
@@ -1503,15 +1434,11 @@ module Google
|
|
1503
1434
|
# @param [Boolean] supports_all_drives
|
1504
1435
|
# Whether the requesting application supports both My Drives and shared drives.
|
1505
1436
|
# @param [Boolean] supports_team_drives
|
1506
|
-
# Deprecated
|
1437
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1507
1438
|
# @param [Boolean] transfer_ownership
|
1508
1439
|
# Whether to transfer ownership to the specified user and downgrade the current
|
1509
1440
|
# owner to a writer. This parameter is required as an acknowledgement of the
|
1510
|
-
# side effect.
|
1511
|
-
# Drive. Files existing in a shared drive are owned by the organization that
|
1512
|
-
# owns that shared drive. Ownership transfers are not supported for files and
|
1513
|
-
# folders in shared drives. Organizers of a shared drive can move items from
|
1514
|
-
# that shared drive into their My Drive which transfers the ownership to them.
|
1441
|
+
# side effect.
|
1515
1442
|
# @param [Boolean] use_domain_admin_access
|
1516
1443
|
# Issue the request as a domain administrator; if set to true, then the
|
1517
1444
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1520,10 +1447,8 @@ module Google
|
|
1520
1447
|
# @param [String] fields
|
1521
1448
|
# Selector specifying which fields to include in a partial response.
|
1522
1449
|
# @param [String] quota_user
|
1523
|
-
#
|
1524
|
-
# characters.
|
1525
|
-
# @param [String] user_ip
|
1526
|
-
# Deprecated. Please use quotaUser instead.
|
1450
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1451
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1527
1452
|
# @param [Google::Apis::RequestOptions] options
|
1528
1453
|
# Request-specific options
|
1529
1454
|
#
|
@@ -1536,7 +1461,7 @@ module Google
|
|
1536
1461
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1537
1462
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1538
1463
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1539
|
-
def create_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_email: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1464
|
+
def create_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_email: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1540
1465
|
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
1541
1466
|
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1542
1467
|
command.request_object = permission_object
|
@@ -1553,11 +1478,11 @@ module Google
|
|
1553
1478
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1554
1479
|
command.query['fields'] = fields unless fields.nil?
|
1555
1480
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1556
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1557
1481
|
execute_or_queue_command(command, &block)
|
1558
1482
|
end
|
1559
1483
|
|
1560
|
-
# Deletes a permission.
|
1484
|
+
# Deletes a permission. **Warning:** Concurrent permissions operations on the
|
1485
|
+
# same file are not supported; only the last update is applied.
|
1561
1486
|
# @param [String] file_id
|
1562
1487
|
# The ID of the file or shared drive.
|
1563
1488
|
# @param [String] permission_id
|
@@ -1565,7 +1490,7 @@ module Google
|
|
1565
1490
|
# @param [Boolean] supports_all_drives
|
1566
1491
|
# Whether the requesting application supports both My Drives and shared drives.
|
1567
1492
|
# @param [Boolean] supports_team_drives
|
1568
|
-
# Deprecated
|
1493
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1569
1494
|
# @param [Boolean] use_domain_admin_access
|
1570
1495
|
# Issue the request as a domain administrator; if set to true, then the
|
1571
1496
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1574,10 +1499,8 @@ module Google
|
|
1574
1499
|
# @param [String] fields
|
1575
1500
|
# Selector specifying which fields to include in a partial response.
|
1576
1501
|
# @param [String] quota_user
|
1577
|
-
#
|
1578
|
-
# characters.
|
1579
|
-
# @param [String] user_ip
|
1580
|
-
# Deprecated. Please use quotaUser instead.
|
1502
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1503
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1581
1504
|
# @param [Google::Apis::RequestOptions] options
|
1582
1505
|
# Request-specific options
|
1583
1506
|
#
|
@@ -1590,7 +1513,7 @@ module Google
|
|
1590
1513
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1591
1514
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1592
1515
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1593
|
-
def delete_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1516
|
+
def delete_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1594
1517
|
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
1595
1518
|
command.params['fileId'] = file_id unless file_id.nil?
|
1596
1519
|
command.params['permissionId'] = permission_id unless permission_id.nil?
|
@@ -1599,7 +1522,6 @@ module Google
|
|
1599
1522
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1600
1523
|
command.query['fields'] = fields unless fields.nil?
|
1601
1524
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1602
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1603
1525
|
execute_or_queue_command(command, &block)
|
1604
1526
|
end
|
1605
1527
|
|
@@ -1611,7 +1533,7 @@ module Google
|
|
1611
1533
|
# @param [Boolean] supports_all_drives
|
1612
1534
|
# Whether the requesting application supports both My Drives and shared drives.
|
1613
1535
|
# @param [Boolean] supports_team_drives
|
1614
|
-
# Deprecated
|
1536
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1615
1537
|
# @param [Boolean] use_domain_admin_access
|
1616
1538
|
# Issue the request as a domain administrator; if set to true, then the
|
1617
1539
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1620,10 +1542,8 @@ module Google
|
|
1620
1542
|
# @param [String] fields
|
1621
1543
|
# Selector specifying which fields to include in a partial response.
|
1622
1544
|
# @param [String] quota_user
|
1623
|
-
#
|
1624
|
-
# characters.
|
1625
|
-
# @param [String] user_ip
|
1626
|
-
# Deprecated. Please use quotaUser instead.
|
1545
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1546
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1627
1547
|
# @param [Google::Apis::RequestOptions] options
|
1628
1548
|
# Request-specific options
|
1629
1549
|
#
|
@@ -1636,7 +1556,7 @@ module Google
|
|
1636
1556
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1637
1557
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1638
1558
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1639
|
-
def get_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1559
|
+
def get_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1640
1560
|
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
1641
1561
|
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
1642
1562
|
command.response_class = Google::Apis::DriveV3::Permission
|
@@ -1647,7 +1567,6 @@ module Google
|
|
1647
1567
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1648
1568
|
command.query['fields'] = fields unless fields.nil?
|
1649
1569
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1650
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1651
1570
|
execute_or_queue_command(command, &block)
|
1652
1571
|
end
|
1653
1572
|
|
@@ -1667,7 +1586,7 @@ module Google
|
|
1667
1586
|
# @param [Boolean] supports_all_drives
|
1668
1587
|
# Whether the requesting application supports both My Drives and shared drives.
|
1669
1588
|
# @param [Boolean] supports_team_drives
|
1670
|
-
# Deprecated
|
1589
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1671
1590
|
# @param [Boolean] use_domain_admin_access
|
1672
1591
|
# Issue the request as a domain administrator; if set to true, then the
|
1673
1592
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1676,10 +1595,8 @@ module Google
|
|
1676
1595
|
# @param [String] fields
|
1677
1596
|
# Selector specifying which fields to include in a partial response.
|
1678
1597
|
# @param [String] quota_user
|
1679
|
-
#
|
1680
|
-
# characters.
|
1681
|
-
# @param [String] user_ip
|
1682
|
-
# Deprecated. Please use quotaUser instead.
|
1598
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1599
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1683
1600
|
# @param [Google::Apis::RequestOptions] options
|
1684
1601
|
# Request-specific options
|
1685
1602
|
#
|
@@ -1692,7 +1609,7 @@ module Google
|
|
1692
1609
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1693
1610
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1694
1611
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1695
|
-
def list_permissions(file_id, include_permissions_for_view: nil, page_size: nil, page_token: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1612
|
+
def list_permissions(file_id, include_permissions_for_view: nil, page_size: nil, page_token: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1696
1613
|
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
1697
1614
|
command.response_representation = Google::Apis::DriveV3::PermissionList::Representation
|
1698
1615
|
command.response_class = Google::Apis::DriveV3::PermissionList
|
@@ -1705,11 +1622,11 @@ module Google
|
|
1705
1622
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1706
1623
|
command.query['fields'] = fields unless fields.nil?
|
1707
1624
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1708
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1709
1625
|
execute_or_queue_command(command, &block)
|
1710
1626
|
end
|
1711
1627
|
|
1712
|
-
# Updates a permission with patch semantics.
|
1628
|
+
# Updates a permission with patch semantics. **Warning:** Concurrent permissions
|
1629
|
+
# operations on the same file are not supported; only the last update is applied.
|
1713
1630
|
# @param [String] file_id
|
1714
1631
|
# The ID of the file or shared drive.
|
1715
1632
|
# @param [String] permission_id
|
@@ -1720,15 +1637,11 @@ module Google
|
|
1720
1637
|
# @param [Boolean] supports_all_drives
|
1721
1638
|
# Whether the requesting application supports both My Drives and shared drives.
|
1722
1639
|
# @param [Boolean] supports_team_drives
|
1723
|
-
# Deprecated
|
1640
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1724
1641
|
# @param [Boolean] transfer_ownership
|
1725
1642
|
# Whether to transfer ownership to the specified user and downgrade the current
|
1726
1643
|
# owner to a writer. This parameter is required as an acknowledgement of the
|
1727
|
-
# side effect.
|
1728
|
-
# Drive. Files existing in a shared drive are owned by the organization that
|
1729
|
-
# owns that shared drive. Ownership transfers are not supported for files and
|
1730
|
-
# folders in shared drives. Organizers of a shared drive can move items from
|
1731
|
-
# that shared drive into their My Drive which transfers the ownership to them.
|
1644
|
+
# side effect.
|
1732
1645
|
# @param [Boolean] use_domain_admin_access
|
1733
1646
|
# Issue the request as a domain administrator; if set to true, then the
|
1734
1647
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1737,10 +1650,8 @@ module Google
|
|
1737
1650
|
# @param [String] fields
|
1738
1651
|
# Selector specifying which fields to include in a partial response.
|
1739
1652
|
# @param [String] quota_user
|
1740
|
-
#
|
1741
|
-
# characters.
|
1742
|
-
# @param [String] user_ip
|
1743
|
-
# Deprecated. Please use quotaUser instead.
|
1653
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1654
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1744
1655
|
# @param [Google::Apis::RequestOptions] options
|
1745
1656
|
# Request-specific options
|
1746
1657
|
#
|
@@ -1753,7 +1664,7 @@ module Google
|
|
1753
1664
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1754
1665
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1755
1666
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1756
|
-
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1667
|
+
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1757
1668
|
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
1758
1669
|
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1759
1670
|
command.request_object = permission_object
|
@@ -1768,7 +1679,6 @@ module Google
|
|
1768
1679
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1769
1680
|
command.query['fields'] = fields unless fields.nil?
|
1770
1681
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1771
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1772
1682
|
execute_or_queue_command(command, &block)
|
1773
1683
|
end
|
1774
1684
|
|
@@ -1781,10 +1691,8 @@ module Google
|
|
1781
1691
|
# @param [String] fields
|
1782
1692
|
# Selector specifying which fields to include in a partial response.
|
1783
1693
|
# @param [String] quota_user
|
1784
|
-
#
|
1785
|
-
# characters.
|
1786
|
-
# @param [String] user_ip
|
1787
|
-
# Deprecated. Please use quotaUser instead.
|
1694
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1695
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1788
1696
|
# @param [Google::Apis::RequestOptions] options
|
1789
1697
|
# Request-specific options
|
1790
1698
|
#
|
@@ -1797,7 +1705,7 @@ module Google
|
|
1797
1705
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1798
1706
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1799
1707
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1800
|
-
def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil,
|
1708
|
+
def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1801
1709
|
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
1802
1710
|
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1803
1711
|
command.request_object = reply_object
|
@@ -1807,7 +1715,6 @@ module Google
|
|
1807
1715
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
1808
1716
|
command.query['fields'] = fields unless fields.nil?
|
1809
1717
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1810
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1811
1718
|
execute_or_queue_command(command, &block)
|
1812
1719
|
end
|
1813
1720
|
|
@@ -1821,10 +1728,8 @@ module Google
|
|
1821
1728
|
# @param [String] fields
|
1822
1729
|
# Selector specifying which fields to include in a partial response.
|
1823
1730
|
# @param [String] quota_user
|
1824
|
-
#
|
1825
|
-
# characters.
|
1826
|
-
# @param [String] user_ip
|
1827
|
-
# Deprecated. Please use quotaUser instead.
|
1731
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1732
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1828
1733
|
# @param [Google::Apis::RequestOptions] options
|
1829
1734
|
# Request-specific options
|
1830
1735
|
#
|
@@ -1837,14 +1742,13 @@ module Google
|
|
1837
1742
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1838
1743
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1839
1744
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1840
|
-
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil,
|
1745
|
+
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, options: nil, &block)
|
1841
1746
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1842
1747
|
command.params['fileId'] = file_id unless file_id.nil?
|
1843
1748
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
1844
1749
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
1845
1750
|
command.query['fields'] = fields unless fields.nil?
|
1846
1751
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1847
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1848
1752
|
execute_or_queue_command(command, &block)
|
1849
1753
|
end
|
1850
1754
|
|
@@ -1861,10 +1765,8 @@ module Google
|
|
1861
1765
|
# @param [String] fields
|
1862
1766
|
# Selector specifying which fields to include in a partial response.
|
1863
1767
|
# @param [String] quota_user
|
1864
|
-
#
|
1865
|
-
# characters.
|
1866
|
-
# @param [String] user_ip
|
1867
|
-
# Deprecated. Please use quotaUser instead.
|
1768
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1769
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1868
1770
|
# @param [Google::Apis::RequestOptions] options
|
1869
1771
|
# Request-specific options
|
1870
1772
|
#
|
@@ -1877,7 +1779,7 @@ module Google
|
|
1877
1779
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1878
1780
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1879
1781
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1880
|
-
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil,
|
1782
|
+
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1881
1783
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1882
1784
|
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
1883
1785
|
command.response_class = Google::Apis::DriveV3::Reply
|
@@ -1887,7 +1789,6 @@ module Google
|
|
1887
1789
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
1888
1790
|
command.query['fields'] = fields unless fields.nil?
|
1889
1791
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1890
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1891
1792
|
execute_or_queue_command(command, &block)
|
1892
1793
|
end
|
1893
1794
|
|
@@ -1907,10 +1808,8 @@ module Google
|
|
1907
1808
|
# @param [String] fields
|
1908
1809
|
# Selector specifying which fields to include in a partial response.
|
1909
1810
|
# @param [String] quota_user
|
1910
|
-
#
|
1911
|
-
# characters.
|
1912
|
-
# @param [String] user_ip
|
1913
|
-
# Deprecated. Please use quotaUser instead.
|
1811
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1812
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1914
1813
|
# @param [Google::Apis::RequestOptions] options
|
1915
1814
|
# Request-specific options
|
1916
1815
|
#
|
@@ -1923,7 +1822,7 @@ module Google
|
|
1923
1822
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1924
1823
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1925
1824
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1926
|
-
def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil,
|
1825
|
+
def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1927
1826
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
1928
1827
|
command.response_representation = Google::Apis::DriveV3::ReplyList::Representation
|
1929
1828
|
command.response_class = Google::Apis::DriveV3::ReplyList
|
@@ -1934,7 +1833,6 @@ module Google
|
|
1934
1833
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1935
1834
|
command.query['fields'] = fields unless fields.nil?
|
1936
1835
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1937
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1938
1836
|
execute_or_queue_command(command, &block)
|
1939
1837
|
end
|
1940
1838
|
|
@@ -1949,10 +1847,8 @@ module Google
|
|
1949
1847
|
# @param [String] fields
|
1950
1848
|
# Selector specifying which fields to include in a partial response.
|
1951
1849
|
# @param [String] quota_user
|
1952
|
-
#
|
1953
|
-
# characters.
|
1954
|
-
# @param [String] user_ip
|
1955
|
-
# Deprecated. Please use quotaUser instead.
|
1850
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1851
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1956
1852
|
# @param [Google::Apis::RequestOptions] options
|
1957
1853
|
# Request-specific options
|
1958
1854
|
#
|
@@ -1965,7 +1861,7 @@ module Google
|
|
1965
1861
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1966
1862
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1967
1863
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1968
|
-
def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil,
|
1864
|
+
def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1969
1865
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1970
1866
|
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1971
1867
|
command.request_object = reply_object
|
@@ -1976,7 +1872,6 @@ module Google
|
|
1976
1872
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
1977
1873
|
command.query['fields'] = fields unless fields.nil?
|
1978
1874
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1979
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1980
1875
|
execute_or_queue_command(command, &block)
|
1981
1876
|
end
|
1982
1877
|
|
@@ -1991,10 +1886,8 @@ module Google
|
|
1991
1886
|
# @param [String] fields
|
1992
1887
|
# Selector specifying which fields to include in a partial response.
|
1993
1888
|
# @param [String] quota_user
|
1994
|
-
#
|
1995
|
-
# characters.
|
1996
|
-
# @param [String] user_ip
|
1997
|
-
# Deprecated. Please use quotaUser instead.
|
1889
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1890
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1998
1891
|
# @param [Google::Apis::RequestOptions] options
|
1999
1892
|
# Request-specific options
|
2000
1893
|
#
|
@@ -2007,13 +1900,12 @@ module Google
|
|
2007
1900
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2008
1901
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2009
1902
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2010
|
-
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil,
|
1903
|
+
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, options: nil, &block)
|
2011
1904
|
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
2012
1905
|
command.params['fileId'] = file_id unless file_id.nil?
|
2013
1906
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
2014
1907
|
command.query['fields'] = fields unless fields.nil?
|
2015
1908
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2016
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2017
1909
|
execute_or_queue_command(command, &block)
|
2018
1910
|
end
|
2019
1911
|
|
@@ -2028,10 +1920,8 @@ module Google
|
|
2028
1920
|
# @param [String] fields
|
2029
1921
|
# Selector specifying which fields to include in a partial response.
|
2030
1922
|
# @param [String] quota_user
|
2031
|
-
#
|
2032
|
-
# characters.
|
2033
|
-
# @param [String] user_ip
|
2034
|
-
# Deprecated. Please use quotaUser instead.
|
1923
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1924
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2035
1925
|
# @param [IO, String] download_dest
|
2036
1926
|
# IO stream or filename to receive content download
|
2037
1927
|
# @param [Google::Apis::RequestOptions] options
|
@@ -2046,7 +1936,7 @@ module Google
|
|
2046
1936
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2047
1937
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2048
1938
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2049
|
-
def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil,
|
1939
|
+
def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
2050
1940
|
if download_dest.nil?
|
2051
1941
|
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
2052
1942
|
else
|
@@ -2060,7 +1950,6 @@ module Google
|
|
2060
1950
|
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
2061
1951
|
command.query['fields'] = fields unless fields.nil?
|
2062
1952
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2063
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2064
1953
|
execute_or_queue_command(command, &block)
|
2065
1954
|
end
|
2066
1955
|
|
@@ -2075,10 +1964,8 @@ module Google
|
|
2075
1964
|
# @param [String] fields
|
2076
1965
|
# Selector specifying which fields to include in a partial response.
|
2077
1966
|
# @param [String] quota_user
|
2078
|
-
#
|
2079
|
-
# characters.
|
2080
|
-
# @param [String] user_ip
|
2081
|
-
# Deprecated. Please use quotaUser instead.
|
1967
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1968
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2082
1969
|
# @param [Google::Apis::RequestOptions] options
|
2083
1970
|
# Request-specific options
|
2084
1971
|
#
|
@@ -2091,7 +1978,7 @@ module Google
|
|
2091
1978
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2092
1979
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2093
1980
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2094
|
-
def list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil,
|
1981
|
+
def list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2095
1982
|
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
2096
1983
|
command.response_representation = Google::Apis::DriveV3::RevisionList::Representation
|
2097
1984
|
command.response_class = Google::Apis::DriveV3::RevisionList
|
@@ -2100,7 +1987,6 @@ module Google
|
|
2100
1987
|
command.query['pageToken'] = page_token unless page_token.nil?
|
2101
1988
|
command.query['fields'] = fields unless fields.nil?
|
2102
1989
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2103
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2104
1990
|
execute_or_queue_command(command, &block)
|
2105
1991
|
end
|
2106
1992
|
|
@@ -2113,10 +1999,8 @@ module Google
|
|
2113
1999
|
# @param [String] fields
|
2114
2000
|
# Selector specifying which fields to include in a partial response.
|
2115
2001
|
# @param [String] quota_user
|
2116
|
-
#
|
2117
|
-
# characters.
|
2118
|
-
# @param [String] user_ip
|
2119
|
-
# Deprecated. Please use quotaUser instead.
|
2002
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2003
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2120
2004
|
# @param [Google::Apis::RequestOptions] options
|
2121
2005
|
# Request-specific options
|
2122
2006
|
#
|
@@ -2129,7 +2013,7 @@ module Google
|
|
2129
2013
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2130
2014
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2131
2015
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2132
|
-
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil,
|
2016
|
+
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2133
2017
|
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
2134
2018
|
command.request_representation = Google::Apis::DriveV3::Revision::Representation
|
2135
2019
|
command.request_object = revision_object
|
@@ -2139,25 +2023,22 @@ module Google
|
|
2139
2023
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
2140
2024
|
command.query['fields'] = fields unless fields.nil?
|
2141
2025
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2142
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2143
2026
|
execute_or_queue_command(command, &block)
|
2144
2027
|
end
|
2145
2028
|
|
2146
|
-
# Deprecated
|
2029
|
+
# Deprecated: Use `drives.create` instead.
|
2147
2030
|
# @param [String] request_id
|
2148
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
2149
|
-
# for idempotent creation of a Team Drive. A repeated request by the
|
2150
|
-
# and with the same request ID will avoid creating duplicates by
|
2151
|
-
# create the same Team Drive. If the Team Drive already exists a
|
2152
|
-
# be returned.
|
2031
|
+
# Required. An ID, such as a random UUID, which uniquely identifies this user's
|
2032
|
+
# request for idempotent creation of a Team Drive. A repeated request by the
|
2033
|
+
# same user and with the same request ID will avoid creating duplicates by
|
2034
|
+
# attempting to create the same Team Drive. If the Team Drive already exists a
|
2035
|
+
# 409 error will be returned.
|
2153
2036
|
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
2154
2037
|
# @param [String] fields
|
2155
2038
|
# Selector specifying which fields to include in a partial response.
|
2156
2039
|
# @param [String] quota_user
|
2157
|
-
#
|
2158
|
-
# characters.
|
2159
|
-
# @param [String] user_ip
|
2160
|
-
# Deprecated. Please use quotaUser instead.
|
2040
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2041
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2161
2042
|
# @param [Google::Apis::RequestOptions] options
|
2162
2043
|
# Request-specific options
|
2163
2044
|
#
|
@@ -2170,7 +2051,7 @@ module Google
|
|
2170
2051
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2171
2052
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2172
2053
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2173
|
-
def create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil,
|
2054
|
+
def create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2174
2055
|
command = make_simple_command(:post, 'teamdrives', options)
|
2175
2056
|
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2176
2057
|
command.request_object = team_drive_object
|
@@ -2179,20 +2060,17 @@ module Google
|
|
2179
2060
|
command.query['requestId'] = request_id unless request_id.nil?
|
2180
2061
|
command.query['fields'] = fields unless fields.nil?
|
2181
2062
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2182
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2183
2063
|
execute_or_queue_command(command, &block)
|
2184
2064
|
end
|
2185
2065
|
|
2186
|
-
# Deprecated
|
2066
|
+
# Deprecated: Use `drives.delete` instead.
|
2187
2067
|
# @param [String] team_drive_id
|
2188
2068
|
# The ID of the Team Drive
|
2189
2069
|
# @param [String] fields
|
2190
2070
|
# Selector specifying which fields to include in a partial response.
|
2191
2071
|
# @param [String] quota_user
|
2192
|
-
#
|
2193
|
-
# characters.
|
2194
|
-
# @param [String] user_ip
|
2195
|
-
# Deprecated. Please use quotaUser instead.
|
2072
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2073
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2196
2074
|
# @param [Google::Apis::RequestOptions] options
|
2197
2075
|
# Request-specific options
|
2198
2076
|
#
|
@@ -2205,16 +2083,15 @@ module Google
|
|
2205
2083
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2206
2084
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2207
2085
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2208
|
-
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil,
|
2086
|
+
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
2209
2087
|
command = make_simple_command(:delete, 'teamdrives/{teamDriveId}', options)
|
2210
2088
|
command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2211
2089
|
command.query['fields'] = fields unless fields.nil?
|
2212
2090
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2213
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2214
2091
|
execute_or_queue_command(command, &block)
|
2215
2092
|
end
|
2216
2093
|
|
2217
|
-
# Deprecated
|
2094
|
+
# Deprecated: Use `drives.get` instead.
|
2218
2095
|
# @param [String] team_drive_id
|
2219
2096
|
# The ID of the Team Drive
|
2220
2097
|
# @param [Boolean] use_domain_admin_access
|
@@ -2224,10 +2101,8 @@ module Google
|
|
2224
2101
|
# @param [String] fields
|
2225
2102
|
# Selector specifying which fields to include in a partial response.
|
2226
2103
|
# @param [String] quota_user
|
2227
|
-
#
|
2228
|
-
# characters.
|
2229
|
-
# @param [String] user_ip
|
2230
|
-
# Deprecated. Please use quotaUser instead.
|
2104
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2105
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2231
2106
|
# @param [Google::Apis::RequestOptions] options
|
2232
2107
|
# Request-specific options
|
2233
2108
|
#
|
@@ -2240,7 +2115,7 @@ module Google
|
|
2240
2115
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2241
2116
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2242
2117
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2243
|
-
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2118
|
+
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2244
2119
|
command = make_simple_command(:get, 'teamdrives/{teamDriveId}', options)
|
2245
2120
|
command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2246
2121
|
command.response_class = Google::Apis::DriveV3::TeamDrive
|
@@ -2248,11 +2123,10 @@ module Google
|
|
2248
2123
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2249
2124
|
command.query['fields'] = fields unless fields.nil?
|
2250
2125
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2251
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2252
2126
|
execute_or_queue_command(command, &block)
|
2253
2127
|
end
|
2254
2128
|
|
2255
|
-
# Deprecated
|
2129
|
+
# Deprecated: Use `drives.list` instead.
|
2256
2130
|
# @param [Fixnum] page_size
|
2257
2131
|
# Maximum number of Team Drives to return.
|
2258
2132
|
# @param [String] page_token
|
@@ -2265,10 +2139,8 @@ module Google
|
|
2265
2139
|
# @param [String] fields
|
2266
2140
|
# Selector specifying which fields to include in a partial response.
|
2267
2141
|
# @param [String] quota_user
|
2268
|
-
#
|
2269
|
-
# characters.
|
2270
|
-
# @param [String] user_ip
|
2271
|
-
# Deprecated. Please use quotaUser instead.
|
2142
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2143
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2272
2144
|
# @param [Google::Apis::RequestOptions] options
|
2273
2145
|
# Request-specific options
|
2274
2146
|
#
|
@@ -2281,7 +2153,7 @@ module Google
|
|
2281
2153
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2282
2154
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2283
2155
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2284
|
-
def list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2156
|
+
def list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2285
2157
|
command = make_simple_command(:get, 'teamdrives', options)
|
2286
2158
|
command.response_representation = Google::Apis::DriveV3::TeamDriveList::Representation
|
2287
2159
|
command.response_class = Google::Apis::DriveV3::TeamDriveList
|
@@ -2291,11 +2163,10 @@ module Google
|
|
2291
2163
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2292
2164
|
command.query['fields'] = fields unless fields.nil?
|
2293
2165
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2294
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2295
2166
|
execute_or_queue_command(command, &block)
|
2296
2167
|
end
|
2297
2168
|
|
2298
|
-
# Deprecated
|
2169
|
+
# Deprecated: Use `drives.update` instead.
|
2299
2170
|
# @param [String] team_drive_id
|
2300
2171
|
# The ID of the Team Drive
|
2301
2172
|
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
@@ -2306,10 +2177,8 @@ module Google
|
|
2306
2177
|
# @param [String] fields
|
2307
2178
|
# Selector specifying which fields to include in a partial response.
|
2308
2179
|
# @param [String] quota_user
|
2309
|
-
#
|
2310
|
-
# characters.
|
2311
|
-
# @param [String] user_ip
|
2312
|
-
# Deprecated. Please use quotaUser instead.
|
2180
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2181
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2313
2182
|
# @param [Google::Apis::RequestOptions] options
|
2314
2183
|
# Request-specific options
|
2315
2184
|
#
|
@@ -2322,7 +2191,7 @@ module Google
|
|
2322
2191
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2323
2192
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2324
2193
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2325
|
-
def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2194
|
+
def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2326
2195
|
command = make_simple_command(:patch, 'teamdrives/{teamDriveId}', options)
|
2327
2196
|
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2328
2197
|
command.request_object = team_drive_object
|
@@ -2332,7 +2201,6 @@ module Google
|
|
2332
2201
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2333
2202
|
command.query['fields'] = fields unless fields.nil?
|
2334
2203
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2335
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2336
2204
|
execute_or_queue_command(command, &block)
|
2337
2205
|
end
|
2338
2206
|
|
@@ -2341,7 +2209,6 @@ module Google
|
|
2341
2209
|
def apply_command_defaults(command)
|
2342
2210
|
command.query['key'] = key unless key.nil?
|
2343
2211
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2344
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2345
2212
|
end
|
2346
2213
|
end
|
2347
2214
|
end
|