google-apis-drive_v3 0.26.0 → 0.44.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 +73 -0
- data/OVERVIEW.md +3 -3
- data/lib/google/apis/drive_v3/classes.rb +561 -457
- data/lib/google/apis/drive_v3/gem_version.rb +3 -3
- data/lib/google/apis/drive_v3/representations.rb +10 -0
- data/lib/google/apis/drive_v3/service.rb +293 -423
- data/lib/google/apis/drive_v3.rb +3 -4
- metadata +10 -10
@@ -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
|
@@ -161,21 +150,19 @@ module Google
|
|
161
150
|
# omits changes to files such as those in the Application Data folder or shared
|
162
151
|
# files which have not been added to My Drive.
|
163
152
|
# @param [String] spaces
|
164
|
-
# A comma-separated list of spaces to query within the
|
165
|
-
#
|
153
|
+
# A comma-separated list of spaces to query within the corpora. Supported values
|
154
|
+
# are 'drive' and 'appDataFolder'.
|
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,7 +195,6 @@ 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
|
|
@@ -219,9 +205,9 @@ module Google
|
|
219
205
|
# response from the getStartPageToken method.
|
220
206
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
221
207
|
# @param [String] drive_id
|
222
|
-
# The shared drive from which changes
|
223
|
-
# will be reflective of the shared drive; use the combined drive ID and
|
224
|
-
# 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.
|
225
211
|
# @param [Boolean] include_corpus_removals
|
226
212
|
# Whether changes should include the file resource if the file is still
|
227
213
|
# accessible by the user at the time of the request, even when a file was
|
@@ -230,7 +216,7 @@ module Google
|
|
230
216
|
# @param [Boolean] include_items_from_all_drives
|
231
217
|
# Whether both My Drive and shared drive items should be included in results.
|
232
218
|
# @param [String] include_labels
|
233
|
-
# 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
|
234
220
|
# the response.
|
235
221
|
# @param [String] include_permissions_for_view
|
236
222
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -239,7 +225,7 @@ module Google
|
|
239
225
|
# Whether to include changes indicating that items have been removed from the
|
240
226
|
# list of changes, for example by deletion or loss of access.
|
241
227
|
# @param [Boolean] include_team_drive_items
|
242
|
-
# Deprecated
|
228
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
243
229
|
# @param [Fixnum] page_size
|
244
230
|
# The maximum number of changes to return per page.
|
245
231
|
# @param [Boolean] restrict_to_my_drive
|
@@ -247,21 +233,19 @@ module Google
|
|
247
233
|
# omits changes to files such as those in the Application Data folder or shared
|
248
234
|
# files which have not been added to My Drive.
|
249
235
|
# @param [String] spaces
|
250
|
-
# A comma-separated list of spaces to query within the
|
251
|
-
#
|
236
|
+
# A comma-separated list of spaces to query within the corpora. Supported values
|
237
|
+
# are 'drive' and 'appDataFolder'.
|
252
238
|
# @param [Boolean] supports_all_drives
|
253
239
|
# Whether the requesting application supports both My Drives and shared drives.
|
254
240
|
# @param [Boolean] supports_team_drives
|
255
|
-
# Deprecated
|
241
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
256
242
|
# @param [String] team_drive_id
|
257
|
-
# Deprecated
|
243
|
+
# Deprecated: Use `driveId` instead.
|
258
244
|
# @param [String] fields
|
259
245
|
# Selector specifying which fields to include in a partial response.
|
260
246
|
# @param [String] quota_user
|
261
|
-
#
|
262
|
-
# characters.
|
263
|
-
# @param [String] user_ip
|
264
|
-
# 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.
|
265
249
|
# @param [Google::Apis::RequestOptions] options
|
266
250
|
# Request-specific options
|
267
251
|
#
|
@@ -274,7 +258,7 @@ module Google
|
|
274
258
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
275
259
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
276
260
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
277
|
-
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)
|
278
262
|
command = make_simple_command(:post, 'changes/watch', options)
|
279
263
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
280
264
|
command.request_object = channel_object
|
@@ -296,19 +280,16 @@ module Google
|
|
296
280
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
297
281
|
command.query['fields'] = fields unless fields.nil?
|
298
282
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
299
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
300
283
|
execute_or_queue_command(command, &block)
|
301
284
|
end
|
302
285
|
|
303
|
-
#
|
286
|
+
# Stops watching resources through this channel.
|
304
287
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
305
288
|
# @param [String] fields
|
306
289
|
# Selector specifying which fields to include in a partial response.
|
307
290
|
# @param [String] quota_user
|
308
|
-
#
|
309
|
-
# characters.
|
310
|
-
# @param [String] user_ip
|
311
|
-
# 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.
|
312
293
|
# @param [Google::Apis::RequestOptions] options
|
313
294
|
# Request-specific options
|
314
295
|
#
|
@@ -321,27 +302,24 @@ module Google
|
|
321
302
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
322
303
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
323
304
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
324
|
-
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)
|
325
306
|
command = make_simple_command(:post, 'channels/stop', options)
|
326
307
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
327
308
|
command.request_object = channel_object
|
328
309
|
command.query['fields'] = fields unless fields.nil?
|
329
310
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
330
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
331
311
|
execute_or_queue_command(command, &block)
|
332
312
|
end
|
333
313
|
|
334
|
-
# Creates a
|
314
|
+
# Creates a comment on a file.
|
335
315
|
# @param [String] file_id
|
336
316
|
# The ID of the file.
|
337
317
|
# @param [Google::Apis::DriveV3::Comment] comment_object
|
338
318
|
# @param [String] fields
|
339
319
|
# Selector specifying which fields to include in a partial response.
|
340
320
|
# @param [String] quota_user
|
341
|
-
#
|
342
|
-
# characters.
|
343
|
-
# @param [String] user_ip
|
344
|
-
# 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.
|
345
323
|
# @param [Google::Apis::RequestOptions] options
|
346
324
|
# Request-specific options
|
347
325
|
#
|
@@ -354,7 +332,7 @@ module Google
|
|
354
332
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
355
333
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
356
334
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
357
|
-
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)
|
358
336
|
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
359
337
|
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
360
338
|
command.request_object = comment_object
|
@@ -363,7 +341,6 @@ module Google
|
|
363
341
|
command.params['fileId'] = file_id unless file_id.nil?
|
364
342
|
command.query['fields'] = fields unless fields.nil?
|
365
343
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
366
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
367
344
|
execute_or_queue_command(command, &block)
|
368
345
|
end
|
369
346
|
|
@@ -375,10 +352,8 @@ module Google
|
|
375
352
|
# @param [String] fields
|
376
353
|
# Selector specifying which fields to include in a partial response.
|
377
354
|
# @param [String] quota_user
|
378
|
-
#
|
379
|
-
# characters.
|
380
|
-
# @param [String] user_ip
|
381
|
-
# 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.
|
382
357
|
# @param [Google::Apis::RequestOptions] options
|
383
358
|
# Request-specific options
|
384
359
|
#
|
@@ -391,13 +366,12 @@ module Google
|
|
391
366
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
392
367
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
393
368
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
394
|
-
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)
|
395
370
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
396
371
|
command.params['fileId'] = file_id unless file_id.nil?
|
397
372
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
398
373
|
command.query['fields'] = fields unless fields.nil?
|
399
374
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
400
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
401
375
|
execute_or_queue_command(command, &block)
|
402
376
|
end
|
403
377
|
|
@@ -412,10 +386,8 @@ module Google
|
|
412
386
|
# @param [String] fields
|
413
387
|
# Selector specifying which fields to include in a partial response.
|
414
388
|
# @param [String] quota_user
|
415
|
-
#
|
416
|
-
# characters.
|
417
|
-
# @param [String] user_ip
|
418
|
-
# 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.
|
419
391
|
# @param [Google::Apis::RequestOptions] options
|
420
392
|
# Request-specific options
|
421
393
|
#
|
@@ -428,7 +400,7 @@ module Google
|
|
428
400
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
429
401
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
430
402
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
431
|
-
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)
|
432
404
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
433
405
|
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
434
406
|
command.response_class = Google::Apis::DriveV3::Comment
|
@@ -437,7 +409,6 @@ module Google
|
|
437
409
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
438
410
|
command.query['fields'] = fields unless fields.nil?
|
439
411
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
440
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
441
412
|
execute_or_queue_command(command, &block)
|
442
413
|
end
|
443
414
|
|
@@ -458,10 +429,8 @@ module Google
|
|
458
429
|
# @param [String] fields
|
459
430
|
# Selector specifying which fields to include in a partial response.
|
460
431
|
# @param [String] quota_user
|
461
|
-
#
|
462
|
-
# characters.
|
463
|
-
# @param [String] user_ip
|
464
|
-
# 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.
|
465
434
|
# @param [Google::Apis::RequestOptions] options
|
466
435
|
# Request-specific options
|
467
436
|
#
|
@@ -474,7 +443,7 @@ module Google
|
|
474
443
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
475
444
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
476
445
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
477
|
-
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)
|
478
447
|
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
479
448
|
command.response_representation = Google::Apis::DriveV3::CommentList::Representation
|
480
449
|
command.response_class = Google::Apis::DriveV3::CommentList
|
@@ -485,7 +454,6 @@ module Google
|
|
485
454
|
command.query['startModifiedTime'] = start_modified_time unless start_modified_time.nil?
|
486
455
|
command.query['fields'] = fields unless fields.nil?
|
487
456
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
488
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
489
457
|
execute_or_queue_command(command, &block)
|
490
458
|
end
|
491
459
|
|
@@ -498,10 +466,8 @@ module Google
|
|
498
466
|
# @param [String] fields
|
499
467
|
# Selector specifying which fields to include in a partial response.
|
500
468
|
# @param [String] quota_user
|
501
|
-
#
|
502
|
-
# characters.
|
503
|
-
# @param [String] user_ip
|
504
|
-
# 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.
|
505
471
|
# @param [Google::Apis::RequestOptions] options
|
506
472
|
# Request-specific options
|
507
473
|
#
|
@@ -514,7 +480,7 @@ module Google
|
|
514
480
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
515
481
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
516
482
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
517
|
-
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)
|
518
484
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
519
485
|
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
520
486
|
command.request_object = comment_object
|
@@ -524,25 +490,22 @@ module Google
|
|
524
490
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
525
491
|
command.query['fields'] = fields unless fields.nil?
|
526
492
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
527
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
528
493
|
execute_or_queue_command(command, &block)
|
529
494
|
end
|
530
495
|
|
531
|
-
# Creates a
|
496
|
+
# Creates a shared drive.
|
532
497
|
# @param [String] request_id
|
533
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
534
|
-
# for idempotent creation of a shared drive. A repeated request by the
|
535
|
-
# and with the same request ID will avoid creating duplicates by
|
536
|
-
# create the same shared drive. If the shared drive already exists
|
537
|
-
# 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.
|
538
503
|
# @param [Google::Apis::DriveV3::Drive] drive_object
|
539
504
|
# @param [String] fields
|
540
505
|
# Selector specifying which fields to include in a partial response.
|
541
506
|
# @param [String] quota_user
|
542
|
-
#
|
543
|
-
# characters.
|
544
|
-
# @param [String] user_ip
|
545
|
-
# 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.
|
546
509
|
# @param [Google::Apis::RequestOptions] options
|
547
510
|
# Request-specific options
|
548
511
|
#
|
@@ -555,7 +518,7 @@ module Google
|
|
555
518
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
556
519
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
557
520
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
558
|
-
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)
|
559
522
|
command = make_simple_command(:post, 'drives', options)
|
560
523
|
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
561
524
|
command.request_object = drive_object
|
@@ -564,17 +527,16 @@ module Google
|
|
564
527
|
command.query['requestId'] = request_id unless request_id.nil?
|
565
528
|
command.query['fields'] = fields unless fields.nil?
|
566
529
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
567
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
568
530
|
execute_or_queue_command(command, &block)
|
569
531
|
end
|
570
532
|
|
571
|
-
# Permanently deletes a shared drive for which the user is an organizer
|
533
|
+
# Permanently deletes a shared drive for which the user is an `organizer`. The
|
572
534
|
# shared drive cannot contain any untrashed items.
|
573
535
|
# @param [String] drive_id
|
574
536
|
# The ID of the shared drive.
|
575
537
|
# @param [Boolean] allow_item_deletion
|
576
538
|
# Whether any items inside the shared drive should also be deleted. This option
|
577
|
-
# is only supported when useDomainAdminAccess is also set to true
|
539
|
+
# is only supported when `useDomainAdminAccess` is also set to `true`.
|
578
540
|
# @param [Boolean] use_domain_admin_access
|
579
541
|
# Issue the request as a domain administrator; if set to true, then the
|
580
542
|
# requester will be granted access if they are an administrator of the domain to
|
@@ -582,10 +544,8 @@ module Google
|
|
582
544
|
# @param [String] fields
|
583
545
|
# Selector specifying which fields to include in a partial response.
|
584
546
|
# @param [String] quota_user
|
585
|
-
#
|
586
|
-
# characters.
|
587
|
-
# @param [String] user_ip
|
588
|
-
# 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.
|
589
549
|
# @param [Google::Apis::RequestOptions] options
|
590
550
|
# Request-specific options
|
591
551
|
#
|
@@ -598,14 +558,13 @@ module Google
|
|
598
558
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
599
559
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
600
560
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
601
|
-
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)
|
602
562
|
command = make_simple_command(:delete, 'drives/{driveId}', options)
|
603
563
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
604
564
|
command.query['allowItemDeletion'] = allow_item_deletion unless allow_item_deletion.nil?
|
605
565
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
606
566
|
command.query['fields'] = fields unless fields.nil?
|
607
567
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
608
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
609
568
|
execute_or_queue_command(command, &block)
|
610
569
|
end
|
611
570
|
|
@@ -619,10 +578,8 @@ module Google
|
|
619
578
|
# @param [String] fields
|
620
579
|
# Selector specifying which fields to include in a partial response.
|
621
580
|
# @param [String] quota_user
|
622
|
-
#
|
623
|
-
# characters.
|
624
|
-
# @param [String] user_ip
|
625
|
-
# 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.
|
626
583
|
# @param [Google::Apis::RequestOptions] options
|
627
584
|
# Request-specific options
|
628
585
|
#
|
@@ -635,7 +592,7 @@ module Google
|
|
635
592
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
636
593
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
637
594
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
638
|
-
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)
|
639
596
|
command = make_simple_command(:get, 'drives/{driveId}', options)
|
640
597
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
641
598
|
command.response_class = Google::Apis::DriveV3::Drive
|
@@ -643,7 +600,6 @@ module Google
|
|
643
600
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
644
601
|
command.query['fields'] = fields unless fields.nil?
|
645
602
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
646
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
647
603
|
execute_or_queue_command(command, &block)
|
648
604
|
end
|
649
605
|
|
@@ -653,10 +609,8 @@ module Google
|
|
653
609
|
# @param [String] fields
|
654
610
|
# Selector specifying which fields to include in a partial response.
|
655
611
|
# @param [String] quota_user
|
656
|
-
#
|
657
|
-
# characters.
|
658
|
-
# @param [String] user_ip
|
659
|
-
# 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.
|
660
614
|
# @param [Google::Apis::RequestOptions] options
|
661
615
|
# Request-specific options
|
662
616
|
#
|
@@ -669,18 +623,20 @@ module Google
|
|
669
623
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
670
624
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
671
625
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
672
|
-
def hide_drive(drive_id, fields: nil, quota_user: nil,
|
626
|
+
def hide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
673
627
|
command = make_simple_command(:post, 'drives/{driveId}/hide', options)
|
674
628
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
675
629
|
command.response_class = Google::Apis::DriveV3::Drive
|
676
630
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
677
631
|
command.query['fields'] = fields unless fields.nil?
|
678
632
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
679
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
680
633
|
execute_or_queue_command(command, &block)
|
681
634
|
end
|
682
635
|
|
683
|
-
# 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.
|
684
640
|
# @param [Fixnum] page_size
|
685
641
|
# Maximum number of shared drives to return per page.
|
686
642
|
# @param [String] page_token
|
@@ -693,10 +649,8 @@ module Google
|
|
693
649
|
# @param [String] fields
|
694
650
|
# Selector specifying which fields to include in a partial response.
|
695
651
|
# @param [String] quota_user
|
696
|
-
#
|
697
|
-
# characters.
|
698
|
-
# @param [String] user_ip
|
699
|
-
# 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.
|
700
654
|
# @param [Google::Apis::RequestOptions] options
|
701
655
|
# Request-specific options
|
702
656
|
#
|
@@ -709,7 +663,7 @@ module Google
|
|
709
663
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
710
664
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
711
665
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
712
|
-
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)
|
713
667
|
command = make_simple_command(:get, 'drives', options)
|
714
668
|
command.response_representation = Google::Apis::DriveV3::DriveList::Representation
|
715
669
|
command.response_class = Google::Apis::DriveV3::DriveList
|
@@ -719,7 +673,6 @@ module Google
|
|
719
673
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
720
674
|
command.query['fields'] = fields unless fields.nil?
|
721
675
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
722
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
723
676
|
execute_or_queue_command(command, &block)
|
724
677
|
end
|
725
678
|
|
@@ -729,10 +682,8 @@ module Google
|
|
729
682
|
# @param [String] fields
|
730
683
|
# Selector specifying which fields to include in a partial response.
|
731
684
|
# @param [String] quota_user
|
732
|
-
#
|
733
|
-
# characters.
|
734
|
-
# @param [String] user_ip
|
735
|
-
# 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.
|
736
687
|
# @param [Google::Apis::RequestOptions] options
|
737
688
|
# Request-specific options
|
738
689
|
#
|
@@ -745,14 +696,13 @@ module Google
|
|
745
696
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
746
697
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
747
698
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
748
|
-
def unhide_drive(drive_id, fields: nil, quota_user: nil,
|
699
|
+
def unhide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
749
700
|
command = make_simple_command(:post, 'drives/{driveId}/unhide', options)
|
750
701
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
751
702
|
command.response_class = Google::Apis::DriveV3::Drive
|
752
703
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
753
704
|
command.query['fields'] = fields unless fields.nil?
|
754
705
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
755
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
756
706
|
execute_or_queue_command(command, &block)
|
757
707
|
end
|
758
708
|
|
@@ -767,10 +717,8 @@ module Google
|
|
767
717
|
# @param [String] fields
|
768
718
|
# Selector specifying which fields to include in a partial response.
|
769
719
|
# @param [String] quota_user
|
770
|
-
#
|
771
|
-
# characters.
|
772
|
-
# @param [String] user_ip
|
773
|
-
# 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.
|
774
722
|
# @param [Google::Apis::RequestOptions] options
|
775
723
|
# Request-specific options
|
776
724
|
#
|
@@ -783,7 +731,7 @@ module Google
|
|
783
731
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
784
732
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
785
733
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
786
|
-
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)
|
787
735
|
command = make_simple_command(:patch, 'drives/{driveId}', options)
|
788
736
|
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
789
737
|
command.request_object = drive_object
|
@@ -793,12 +741,11 @@ module Google
|
|
793
741
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
794
742
|
command.query['fields'] = fields unless fields.nil?
|
795
743
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
796
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
797
744
|
execute_or_queue_command(command, &block)
|
798
745
|
end
|
799
746
|
|
800
747
|
# Creates a copy of a file and applies any requested updates with patch
|
801
|
-
# semantics.
|
748
|
+
# semantics.
|
802
749
|
# @param [String] file_id
|
803
750
|
# The ID of the file.
|
804
751
|
# @param [Google::Apis::DriveV3::File] file_object
|
@@ -811,7 +758,7 @@ module Google
|
|
811
758
|
# the domain by default; this parameter bypasses that behavior for the request.
|
812
759
|
# Permissions are still inherited from parent folders.
|
813
760
|
# @param [String] include_labels
|
814
|
-
# 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
|
815
762
|
# the response.
|
816
763
|
# @param [String] include_permissions_for_view
|
817
764
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -826,14 +773,12 @@ module Google
|
|
826
773
|
# @param [Boolean] supports_all_drives
|
827
774
|
# Whether the requesting application supports both My Drives and shared drives.
|
828
775
|
# @param [Boolean] supports_team_drives
|
829
|
-
# Deprecated
|
776
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
830
777
|
# @param [String] fields
|
831
778
|
# Selector specifying which fields to include in a partial response.
|
832
779
|
# @param [String] quota_user
|
833
|
-
#
|
834
|
-
# characters.
|
835
|
-
# @param [String] user_ip
|
836
|
-
# 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.
|
837
782
|
# @param [Google::Apis::RequestOptions] options
|
838
783
|
# Request-specific options
|
839
784
|
#
|
@@ -846,7 +791,7 @@ module Google
|
|
846
791
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
847
792
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
848
793
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
849
|
-
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)
|
850
795
|
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
851
796
|
command.request_representation = Google::Apis::DriveV3::File::Representation
|
852
797
|
command.request_object = file_object
|
@@ -863,11 +808,26 @@ module Google
|
|
863
808
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
864
809
|
command.query['fields'] = fields unless fields.nil?
|
865
810
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
866
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
867
811
|
execute_or_queue_command(command, &block)
|
868
812
|
end
|
869
813
|
|
870
|
-
# Creates a new 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.
|
871
831
|
# @param [Google::Apis::DriveV3::File] file_object
|
872
832
|
# @param [Boolean] enforce_single_parent
|
873
833
|
# Deprecated. Creating files in multiple folders is no longer supported.
|
@@ -877,7 +837,7 @@ module Google
|
|
877
837
|
# the domain by default; this parameter bypasses that behavior for the request.
|
878
838
|
# Permissions are still inherited from parent folders.
|
879
839
|
# @param [String] include_labels
|
880
|
-
# 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
|
881
841
|
# the response.
|
882
842
|
# @param [String] include_permissions_for_view
|
883
843
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -892,16 +852,14 @@ module Google
|
|
892
852
|
# @param [Boolean] supports_all_drives
|
893
853
|
# Whether the requesting application supports both My Drives and shared drives.
|
894
854
|
# @param [Boolean] supports_team_drives
|
895
|
-
# Deprecated
|
855
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
896
856
|
# @param [Boolean] use_content_as_indexable_text
|
897
857
|
# Whether to use the uploaded content as indexable text.
|
898
858
|
# @param [String] fields
|
899
859
|
# Selector specifying which fields to include in a partial response.
|
900
860
|
# @param [String] quota_user
|
901
|
-
#
|
902
|
-
# characters.
|
903
|
-
# @param [String] user_ip
|
904
|
-
# 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.
|
905
863
|
# @param [IO, String] upload_source
|
906
864
|
# IO stream or filename containing content to upload
|
907
865
|
# @param [String] content_type
|
@@ -918,7 +876,7 @@ module Google
|
|
918
876
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
919
877
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
920
878
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
921
|
-
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)
|
922
880
|
if upload_source.nil?
|
923
881
|
command = make_simple_command(:post, 'files', options)
|
924
882
|
else
|
@@ -941,30 +899,27 @@ module Google
|
|
941
899
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
942
900
|
command.query['fields'] = fields unless fields.nil?
|
943
901
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
944
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
945
902
|
execute_or_queue_command(command, &block)
|
946
903
|
end
|
947
904
|
|
948
905
|
# Permanently deletes a file owned by the user without moving it to the trash.
|
949
|
-
# If the file belongs to a shared drive the user must be an organizer on the
|
950
|
-
# parent. If the target is a folder, all descendants owned by the user
|
951
|
-
# deleted.
|
906
|
+
# If the file belongs to a shared drive, the user must be an `organizer` on the
|
907
|
+
# parent folder. If the target is a folder, all descendants owned by the user
|
908
|
+
# are also deleted.
|
952
909
|
# @param [String] file_id
|
953
910
|
# The ID of the file.
|
954
911
|
# @param [Boolean] enforce_single_parent
|
955
|
-
# Deprecated
|
912
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
956
913
|
# but the item itself is not, the item will be placed under its owner's root.
|
957
914
|
# @param [Boolean] supports_all_drives
|
958
915
|
# Whether the requesting application supports both My Drives and shared drives.
|
959
916
|
# @param [Boolean] supports_team_drives
|
960
|
-
# Deprecated
|
917
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
961
918
|
# @param [String] fields
|
962
919
|
# Selector specifying which fields to include in a partial response.
|
963
920
|
# @param [String] quota_user
|
964
|
-
#
|
965
|
-
# characters.
|
966
|
-
# @param [String] user_ip
|
967
|
-
# 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.
|
968
923
|
# @param [Google::Apis::RequestOptions] options
|
969
924
|
# Request-specific options
|
970
925
|
#
|
@@ -977,7 +932,7 @@ module Google
|
|
977
932
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
978
933
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
979
934
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
980
|
-
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)
|
981
936
|
command = make_simple_command(:delete, 'files/{fileId}', options)
|
982
937
|
command.params['fileId'] = file_id unless file_id.nil?
|
983
938
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
@@ -985,21 +940,20 @@ module Google
|
|
985
940
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
986
941
|
command.query['fields'] = fields unless fields.nil?
|
987
942
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
988
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
989
943
|
execute_or_queue_command(command, &block)
|
990
944
|
end
|
991
945
|
|
992
946
|
# Permanently deletes all of the user's trashed files.
|
947
|
+
# @param [String] drive_id
|
948
|
+
# If set, empties the trash of the provided shared drive.
|
993
949
|
# @param [Boolean] enforce_single_parent
|
994
|
-
# Deprecated
|
950
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
995
951
|
# but the item itself is not, the item will be placed under its owner's root.
|
996
952
|
# @param [String] fields
|
997
953
|
# Selector specifying which fields to include in a partial response.
|
998
954
|
# @param [String] quota_user
|
999
|
-
#
|
1000
|
-
# characters.
|
1001
|
-
# @param [String] user_ip
|
1002
|
-
# 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.
|
1003
957
|
# @param [Google::Apis::RequestOptions] options
|
1004
958
|
# Request-specific options
|
1005
959
|
#
|
@@ -1012,12 +966,12 @@ module Google
|
|
1012
966
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1013
967
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1014
968
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1015
|
-
def empty_file_trash(
|
969
|
+
def empty_file_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1016
970
|
command = make_simple_command(:delete, 'files/trash', options)
|
971
|
+
command.query['driveId'] = drive_id unless drive_id.nil?
|
1017
972
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
1018
973
|
command.query['fields'] = fields unless fields.nil?
|
1019
974
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1020
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1021
975
|
execute_or_queue_command(command, &block)
|
1022
976
|
end
|
1023
977
|
|
@@ -1026,14 +980,12 @@ module Google
|
|
1026
980
|
# @param [String] file_id
|
1027
981
|
# The ID of the file.
|
1028
982
|
# @param [String] mime_type
|
1029
|
-
# The MIME type of the format requested for this export.
|
983
|
+
# Required. The MIME type of the format requested for this export.
|
1030
984
|
# @param [String] fields
|
1031
985
|
# Selector specifying which fields to include in a partial response.
|
1032
986
|
# @param [String] quota_user
|
1033
|
-
#
|
1034
|
-
# characters.
|
1035
|
-
# @param [String] user_ip
|
1036
|
-
# 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.
|
1037
989
|
# @param [IO, String] download_dest
|
1038
990
|
# IO stream or filename to receive content download
|
1039
991
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1048,7 +1000,7 @@ module Google
|
|
1048
1000
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1049
1001
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1050
1002
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1051
|
-
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)
|
1052
1004
|
if download_dest.nil?
|
1053
1005
|
command = make_simple_command(:get, 'files/{fileId}/export', options)
|
1054
1006
|
else
|
@@ -1059,7 +1011,6 @@ module Google
|
|
1059
1011
|
command.query['mimeType'] = mime_type unless mime_type.nil?
|
1060
1012
|
command.query['fields'] = fields unless fields.nil?
|
1061
1013
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1062
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1063
1014
|
execute_or_queue_command(command, &block)
|
1064
1015
|
end
|
1065
1016
|
|
@@ -1071,15 +1022,13 @@ module Google
|
|
1071
1022
|
# are 'drive' and 'appDataFolder'. (Default: 'drive')
|
1072
1023
|
# @param [String] type
|
1073
1024
|
# The type of items which the IDs can be used for. Supported values are 'files'
|
1074
|
-
# and 'shortcuts'. Note that 'shortcuts' are only supported in the drive '
|
1075
|
-
# (Default: 'files')
|
1025
|
+
# and 'shortcuts'. Note that 'shortcuts' are only supported in the `drive` '
|
1026
|
+
# space'. (Default: 'files')
|
1076
1027
|
# @param [String] fields
|
1077
1028
|
# Selector specifying which fields to include in a partial response.
|
1078
1029
|
# @param [String] quota_user
|
1079
|
-
#
|
1080
|
-
# characters.
|
1081
|
-
# @param [String] user_ip
|
1082
|
-
# 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.
|
1083
1032
|
# @param [Google::Apis::RequestOptions] options
|
1084
1033
|
# Request-specific options
|
1085
1034
|
#
|
@@ -1092,7 +1041,7 @@ module Google
|
|
1092
1041
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1093
1042
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1094
1043
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1095
|
-
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)
|
1096
1045
|
command = make_simple_command(:get, 'files/generateIds', options)
|
1097
1046
|
command.response_representation = Google::Apis::DriveV3::GeneratedIds::Representation
|
1098
1047
|
command.response_class = Google::Apis::DriveV3::GeneratedIds
|
@@ -1101,18 +1050,22 @@ module Google
|
|
1101
1050
|
command.query['type'] = type unless type.nil?
|
1102
1051
|
command.query['fields'] = fields unless fields.nil?
|
1103
1052
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1104
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1105
1053
|
execute_or_queue_command(command, &block)
|
1106
1054
|
end
|
1107
1055
|
|
1108
|
-
# 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).
|
1109
1062
|
# @param [String] file_id
|
1110
1063
|
# The ID of the file.
|
1111
1064
|
# @param [Boolean] acknowledge_abuse
|
1112
1065
|
# Whether the user is acknowledging the risk of downloading known malware or
|
1113
1066
|
# other abusive files. This is only applicable when alt=media.
|
1114
1067
|
# @param [String] include_labels
|
1115
|
-
# 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
|
1116
1069
|
# the response.
|
1117
1070
|
# @param [String] include_permissions_for_view
|
1118
1071
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1120,14 +1073,12 @@ module Google
|
|
1120
1073
|
# @param [Boolean] supports_all_drives
|
1121
1074
|
# Whether the requesting application supports both My Drives and shared drives.
|
1122
1075
|
# @param [Boolean] supports_team_drives
|
1123
|
-
# Deprecated
|
1076
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1124
1077
|
# @param [String] fields
|
1125
1078
|
# Selector specifying which fields to include in a partial response.
|
1126
1079
|
# @param [String] quota_user
|
1127
|
-
#
|
1128
|
-
# characters.
|
1129
|
-
# @param [String] user_ip
|
1130
|
-
# 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.
|
1131
1082
|
# @param [IO, String] download_dest
|
1132
1083
|
# IO stream or filename to receive content download
|
1133
1084
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1142,7 +1093,7 @@ module Google
|
|
1142
1093
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1143
1094
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1144
1095
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1145
|
-
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)
|
1146
1097
|
if download_dest.nil?
|
1147
1098
|
command = make_simple_command(:get, 'files/{fileId}', options)
|
1148
1099
|
else
|
@@ -1159,40 +1110,40 @@ module Google
|
|
1159
1110
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1160
1111
|
command.query['fields'] = fields unless fields.nil?
|
1161
1112
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1162
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1163
1113
|
execute_or_queue_command(command, &block)
|
1164
1114
|
end
|
1165
1115
|
|
1166
|
-
# 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.
|
1167
1122
|
# @param [String] corpora
|
1168
|
-
#
|
1169
|
-
#
|
1170
|
-
#
|
1171
|
-
#
|
1172
|
-
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
1173
|
-
# 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.
|
1174
1127
|
# @param [String] corpus
|
1175
|
-
# The source of files to list.
|
1128
|
+
# Deprecated: The source of files to list. Use 'corpora' instead.
|
1176
1129
|
# @param [String] drive_id
|
1177
1130
|
# ID of the shared drive to search.
|
1178
1131
|
# @param [Boolean] include_items_from_all_drives
|
1179
1132
|
# Whether both My Drive and shared drive items should be included in results.
|
1180
1133
|
# @param [String] include_labels
|
1181
|
-
# 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
|
1182
1135
|
# the response.
|
1183
1136
|
# @param [String] include_permissions_for_view
|
1184
1137
|
# Specifies which additional view's permissions to include in the response. Only
|
1185
1138
|
# 'published' is supported.
|
1186
1139
|
# @param [Boolean] include_team_drive_items
|
1187
|
-
# Deprecated
|
1140
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
1188
1141
|
# @param [String] order_by
|
1189
1142
|
# A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', '
|
1190
1143
|
# modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', '
|
1191
1144
|
# recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts
|
1192
|
-
# ascending by default, but
|
1193
|
-
# usage: ?orderBy=folder,modifiedTime desc,name.
|
1194
|
-
# current limitation for users with approximately one million files in which the
|
1195
|
-
# 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.
|
1196
1147
|
# @param [Fixnum] page_size
|
1197
1148
|
# The maximum number of files to return per page. Partial or empty result pages
|
1198
1149
|
# are possible even before the end of the files list has been reached.
|
@@ -1200,24 +1151,22 @@ module Google
|
|
1200
1151
|
# The token for continuing a previous list request on the next page. This should
|
1201
1152
|
# be set to the value of 'nextPageToken' from the previous response.
|
1202
1153
|
# @param [String] q
|
1203
|
-
# A query for filtering the file results. See the "Search for
|
1204
|
-
# supported syntax.
|
1154
|
+
# A query for filtering the file results. See the "Search for files & folders"
|
1155
|
+
# guide for supported syntax.
|
1205
1156
|
# @param [String] spaces
|
1206
|
-
# A comma-separated list of spaces to query within the
|
1157
|
+
# A comma-separated list of spaces to query within the corpora. Supported values
|
1207
1158
|
# are 'drive' and 'appDataFolder'.
|
1208
1159
|
# @param [Boolean] supports_all_drives
|
1209
1160
|
# Whether the requesting application supports both My Drives and shared drives.
|
1210
1161
|
# @param [Boolean] supports_team_drives
|
1211
|
-
# Deprecated
|
1162
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1212
1163
|
# @param [String] team_drive_id
|
1213
|
-
# Deprecated
|
1164
|
+
# Deprecated: Use `driveId` instead.
|
1214
1165
|
# @param [String] fields
|
1215
1166
|
# Selector specifying which fields to include in a partial response.
|
1216
1167
|
# @param [String] quota_user
|
1217
|
-
#
|
1218
|
-
# characters.
|
1219
|
-
# @param [String] user_ip
|
1220
|
-
# 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.
|
1221
1170
|
# @param [Google::Apis::RequestOptions] options
|
1222
1171
|
# Request-specific options
|
1223
1172
|
#
|
@@ -1230,7 +1179,7 @@ module Google
|
|
1230
1179
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1231
1180
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1232
1181
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1233
|
-
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)
|
1234
1183
|
command = make_simple_command(:get, 'files', options)
|
1235
1184
|
command.response_representation = Google::Apis::DriveV3::FileList::Representation
|
1236
1185
|
command.response_class = Google::Apis::DriveV3::FileList
|
@@ -1251,26 +1200,22 @@ module Google
|
|
1251
1200
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
1252
1201
|
command.query['fields'] = fields unless fields.nil?
|
1253
1202
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1254
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1255
1203
|
execute_or_queue_command(command, &block)
|
1256
1204
|
end
|
1257
1205
|
|
1258
1206
|
# Lists the labels on a file.
|
1259
1207
|
# @param [String] file_id
|
1260
|
-
# The ID
|
1208
|
+
# The ID for the file.
|
1261
1209
|
# @param [Fixnum] max_results
|
1262
|
-
# The maximum number of labels to return per page. When not set,
|
1263
|
-
# to 100.
|
1210
|
+
# The maximum number of labels to return per page. When not set, defaults to 100.
|
1264
1211
|
# @param [String] page_token
|
1265
1212
|
# The token for continuing a previous list request on the next page. This should
|
1266
1213
|
# be set to the value of 'nextPageToken' from the previous response.
|
1267
1214
|
# @param [String] fields
|
1268
1215
|
# Selector specifying which fields to include in a partial response.
|
1269
1216
|
# @param [String] quota_user
|
1270
|
-
#
|
1271
|
-
# characters.
|
1272
|
-
# @param [String] user_ip
|
1273
|
-
# 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.
|
1274
1219
|
# @param [Google::Apis::RequestOptions] options
|
1275
1220
|
# Request-specific options
|
1276
1221
|
#
|
@@ -1283,7 +1228,7 @@ module Google
|
|
1283
1228
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1284
1229
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1285
1230
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1286
|
-
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)
|
1287
1232
|
command = make_simple_command(:get, 'files/{fileId}/listLabels', options)
|
1288
1233
|
command.response_representation = Google::Apis::DriveV3::LabelList::Representation
|
1289
1234
|
command.response_class = Google::Apis::DriveV3::LabelList
|
@@ -1292,21 +1237,19 @@ module Google
|
|
1292
1237
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1293
1238
|
command.query['fields'] = fields unless fields.nil?
|
1294
1239
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1295
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1296
1240
|
execute_or_queue_command(command, &block)
|
1297
1241
|
end
|
1298
1242
|
|
1299
|
-
# 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.
|
1300
1245
|
# @param [String] file_id
|
1301
|
-
# The ID of the file
|
1246
|
+
# The ID of the file to which the labels belong.
|
1302
1247
|
# @param [Google::Apis::DriveV3::ModifyLabelsRequest] modify_labels_request_object
|
1303
1248
|
# @param [String] fields
|
1304
1249
|
# Selector specifying which fields to include in a partial response.
|
1305
1250
|
# @param [String] quota_user
|
1306
|
-
#
|
1307
|
-
# characters.
|
1308
|
-
# @param [String] user_ip
|
1309
|
-
# 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.
|
1310
1253
|
# @param [Google::Apis::RequestOptions] options
|
1311
1254
|
# Request-specific options
|
1312
1255
|
#
|
@@ -1319,7 +1262,7 @@ module Google
|
|
1319
1262
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1320
1263
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1321
1264
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1322
|
-
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)
|
1323
1266
|
command = make_simple_command(:post, 'files/{fileId}/modifyLabels', options)
|
1324
1267
|
command.request_representation = Google::Apis::DriveV3::ModifyLabelsRequest::Representation
|
1325
1268
|
command.request_object = modify_labels_request_object
|
@@ -1328,24 +1271,28 @@ module Google
|
|
1328
1271
|
command.params['fileId'] = file_id unless file_id.nil?
|
1329
1272
|
command.query['fields'] = fields unless fields.nil?
|
1330
1273
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1331
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1332
1274
|
execute_or_queue_command(command, &block)
|
1333
1275
|
end
|
1334
1276
|
|
1335
1277
|
# Updates a file's metadata and/or content. When calling this method, only
|
1336
1278
|
# populate fields in the request that you want to modify. When updating fields,
|
1337
|
-
# some fields might
|
1338
|
-
# 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).
|
1339
1286
|
# @param [String] file_id
|
1340
1287
|
# The ID of the file.
|
1341
1288
|
# @param [Google::Apis::DriveV3::File] file_object
|
1342
1289
|
# @param [String] add_parents
|
1343
1290
|
# A comma-separated list of parent IDs to add.
|
1344
1291
|
# @param [Boolean] enforce_single_parent
|
1345
|
-
# Deprecated
|
1292
|
+
# Deprecated: Adding files to multiple folders is no longer supported. Use
|
1346
1293
|
# shortcuts instead.
|
1347
1294
|
# @param [String] include_labels
|
1348
|
-
# 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
|
1349
1296
|
# the response.
|
1350
1297
|
# @param [String] include_permissions_for_view
|
1351
1298
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1362,16 +1309,14 @@ module Google
|
|
1362
1309
|
# @param [Boolean] supports_all_drives
|
1363
1310
|
# Whether the requesting application supports both My Drives and shared drives.
|
1364
1311
|
# @param [Boolean] supports_team_drives
|
1365
|
-
# Deprecated
|
1312
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1366
1313
|
# @param [Boolean] use_content_as_indexable_text
|
1367
1314
|
# Whether to use the uploaded content as indexable text.
|
1368
1315
|
# @param [String] fields
|
1369
1316
|
# Selector specifying which fields to include in a partial response.
|
1370
1317
|
# @param [String] quota_user
|
1371
|
-
#
|
1372
|
-
# characters.
|
1373
|
-
# @param [String] user_ip
|
1374
|
-
# 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.
|
1375
1320
|
# @param [IO, String] upload_source
|
1376
1321
|
# IO stream or filename containing content to upload
|
1377
1322
|
# @param [String] content_type
|
@@ -1388,7 +1333,7 @@ module Google
|
|
1388
1333
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1389
1334
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1390
1335
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1391
|
-
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)
|
1392
1337
|
if upload_source.nil?
|
1393
1338
|
command = make_simple_command(:patch, 'files/{fileId}', options)
|
1394
1339
|
else
|
@@ -1413,13 +1358,10 @@ module Google
|
|
1413
1358
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
1414
1359
|
command.query['fields'] = fields unless fields.nil?
|
1415
1360
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1416
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1417
1361
|
execute_or_queue_command(command, &block)
|
1418
1362
|
end
|
1419
1363
|
|
1420
|
-
# Subscribes to changes to a file.
|
1421
|
-
# to a file on a shared drive, a change to a shared drive file won't create a
|
1422
|
-
# notification.
|
1364
|
+
# Subscribes to changes to a file.
|
1423
1365
|
# @param [String] file_id
|
1424
1366
|
# The ID of the file.
|
1425
1367
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
@@ -1427,7 +1369,7 @@ module Google
|
|
1427
1369
|
# Whether the user is acknowledging the risk of downloading known malware or
|
1428
1370
|
# other abusive files. This is only applicable when alt=media.
|
1429
1371
|
# @param [String] include_labels
|
1430
|
-
# 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
|
1431
1373
|
# the response.
|
1432
1374
|
# @param [String] include_permissions_for_view
|
1433
1375
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1435,16 +1377,12 @@ module Google
|
|
1435
1377
|
# @param [Boolean] supports_all_drives
|
1436
1378
|
# Whether the requesting application supports both My Drives and shared drives.
|
1437
1379
|
# @param [Boolean] supports_team_drives
|
1438
|
-
# Deprecated
|
1380
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1439
1381
|
# @param [String] fields
|
1440
1382
|
# Selector specifying which fields to include in a partial response.
|
1441
1383
|
# @param [String] quota_user
|
1442
|
-
#
|
1443
|
-
# characters.
|
1444
|
-
# @param [String] user_ip
|
1445
|
-
# Deprecated. Please use quotaUser instead.
|
1446
|
-
# @param [IO, String] download_dest
|
1447
|
-
# 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.
|
1448
1386
|
# @param [Google::Apis::RequestOptions] options
|
1449
1387
|
# Request-specific options
|
1450
1388
|
#
|
@@ -1457,13 +1395,8 @@ module Google
|
|
1457
1395
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1458
1396
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1459
1397
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1460
|
-
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,
|
1461
|
-
|
1462
|
-
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
1463
|
-
else
|
1464
|
-
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
1465
|
-
command.download_dest = download_dest
|
1466
|
-
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)
|
1467
1400
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
1468
1401
|
command.request_object = channel_object
|
1469
1402
|
command.response_representation = Google::Apis::DriveV3::Channel::Representation
|
@@ -1476,23 +1409,24 @@ module Google
|
|
1476
1409
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1477
1410
|
command.query['fields'] = fields unless fields.nil?
|
1478
1411
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1479
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1480
1412
|
execute_or_queue_command(command, &block)
|
1481
1413
|
end
|
1482
1414
|
|
1483
|
-
# Creates a permission for a file or shared drive.
|
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.
|
1484
1418
|
# @param [String] file_id
|
1485
1419
|
# The ID of the file or shared drive.
|
1486
1420
|
# @param [Google::Apis::DriveV3::Permission] permission_object
|
1487
1421
|
# @param [String] email_message
|
1488
1422
|
# A plain text custom message to include in the notification email.
|
1489
1423
|
# @param [Boolean] enforce_single_parent
|
1490
|
-
# Deprecated
|
1424
|
+
# Deprecated: See `moveToNewOwnersRoot` for details.
|
1491
1425
|
# @param [Boolean] move_to_new_owners_root
|
1492
1426
|
# This parameter will only take effect if the item is not in a shared drive and
|
1493
|
-
# the request is attempting to transfer the ownership of the item. If set to
|
1494
|
-
# true
|
1495
|
-
# 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.
|
1496
1430
|
# @param [Boolean] send_notification_email
|
1497
1431
|
# Whether to send a notification email when sharing to users or groups. This
|
1498
1432
|
# defaults to true for users and groups, and is not allowed for other requests.
|
@@ -1500,15 +1434,11 @@ module Google
|
|
1500
1434
|
# @param [Boolean] supports_all_drives
|
1501
1435
|
# Whether the requesting application supports both My Drives and shared drives.
|
1502
1436
|
# @param [Boolean] supports_team_drives
|
1503
|
-
# Deprecated
|
1437
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1504
1438
|
# @param [Boolean] transfer_ownership
|
1505
1439
|
# Whether to transfer ownership to the specified user and downgrade the current
|
1506
1440
|
# owner to a writer. This parameter is required as an acknowledgement of the
|
1507
|
-
# side effect.
|
1508
|
-
# Drive. Files existing in a shared drive are owned by the organization that
|
1509
|
-
# owns that shared drive. Ownership transfers are not supported for files and
|
1510
|
-
# folders in shared drives. Organizers of a shared drive can move items from
|
1511
|
-
# that shared drive into their My Drive which transfers the ownership to them.
|
1441
|
+
# side effect.
|
1512
1442
|
# @param [Boolean] use_domain_admin_access
|
1513
1443
|
# Issue the request as a domain administrator; if set to true, then the
|
1514
1444
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1517,10 +1447,8 @@ module Google
|
|
1517
1447
|
# @param [String] fields
|
1518
1448
|
# Selector specifying which fields to include in a partial response.
|
1519
1449
|
# @param [String] quota_user
|
1520
|
-
#
|
1521
|
-
# characters.
|
1522
|
-
# @param [String] user_ip
|
1523
|
-
# 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.
|
1524
1452
|
# @param [Google::Apis::RequestOptions] options
|
1525
1453
|
# Request-specific options
|
1526
1454
|
#
|
@@ -1533,7 +1461,7 @@ module Google
|
|
1533
1461
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1534
1462
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1535
1463
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1536
|
-
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)
|
1537
1465
|
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
1538
1466
|
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1539
1467
|
command.request_object = permission_object
|
@@ -1550,11 +1478,11 @@ module Google
|
|
1550
1478
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1551
1479
|
command.query['fields'] = fields unless fields.nil?
|
1552
1480
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1553
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1554
1481
|
execute_or_queue_command(command, &block)
|
1555
1482
|
end
|
1556
1483
|
|
1557
|
-
# 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.
|
1558
1486
|
# @param [String] file_id
|
1559
1487
|
# The ID of the file or shared drive.
|
1560
1488
|
# @param [String] permission_id
|
@@ -1562,7 +1490,7 @@ module Google
|
|
1562
1490
|
# @param [Boolean] supports_all_drives
|
1563
1491
|
# Whether the requesting application supports both My Drives and shared drives.
|
1564
1492
|
# @param [Boolean] supports_team_drives
|
1565
|
-
# Deprecated
|
1493
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1566
1494
|
# @param [Boolean] use_domain_admin_access
|
1567
1495
|
# Issue the request as a domain administrator; if set to true, then the
|
1568
1496
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1571,10 +1499,8 @@ module Google
|
|
1571
1499
|
# @param [String] fields
|
1572
1500
|
# Selector specifying which fields to include in a partial response.
|
1573
1501
|
# @param [String] quota_user
|
1574
|
-
#
|
1575
|
-
# characters.
|
1576
|
-
# @param [String] user_ip
|
1577
|
-
# 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.
|
1578
1504
|
# @param [Google::Apis::RequestOptions] options
|
1579
1505
|
# Request-specific options
|
1580
1506
|
#
|
@@ -1587,7 +1513,7 @@ module Google
|
|
1587
1513
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1588
1514
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1589
1515
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1590
|
-
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)
|
1591
1517
|
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
1592
1518
|
command.params['fileId'] = file_id unless file_id.nil?
|
1593
1519
|
command.params['permissionId'] = permission_id unless permission_id.nil?
|
@@ -1596,7 +1522,6 @@ module Google
|
|
1596
1522
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1597
1523
|
command.query['fields'] = fields unless fields.nil?
|
1598
1524
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1599
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1600
1525
|
execute_or_queue_command(command, &block)
|
1601
1526
|
end
|
1602
1527
|
|
@@ -1608,7 +1533,7 @@ module Google
|
|
1608
1533
|
# @param [Boolean] supports_all_drives
|
1609
1534
|
# Whether the requesting application supports both My Drives and shared drives.
|
1610
1535
|
# @param [Boolean] supports_team_drives
|
1611
|
-
# Deprecated
|
1536
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1612
1537
|
# @param [Boolean] use_domain_admin_access
|
1613
1538
|
# Issue the request as a domain administrator; if set to true, then the
|
1614
1539
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1617,10 +1542,8 @@ module Google
|
|
1617
1542
|
# @param [String] fields
|
1618
1543
|
# Selector specifying which fields to include in a partial response.
|
1619
1544
|
# @param [String] quota_user
|
1620
|
-
#
|
1621
|
-
# characters.
|
1622
|
-
# @param [String] user_ip
|
1623
|
-
# 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.
|
1624
1547
|
# @param [Google::Apis::RequestOptions] options
|
1625
1548
|
# Request-specific options
|
1626
1549
|
#
|
@@ -1633,7 +1556,7 @@ module Google
|
|
1633
1556
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1634
1557
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1635
1558
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1636
|
-
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)
|
1637
1560
|
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
1638
1561
|
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
1639
1562
|
command.response_class = Google::Apis::DriveV3::Permission
|
@@ -1644,7 +1567,6 @@ module Google
|
|
1644
1567
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1645
1568
|
command.query['fields'] = fields unless fields.nil?
|
1646
1569
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1647
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1648
1570
|
execute_or_queue_command(command, &block)
|
1649
1571
|
end
|
1650
1572
|
|
@@ -1664,7 +1586,7 @@ module Google
|
|
1664
1586
|
# @param [Boolean] supports_all_drives
|
1665
1587
|
# Whether the requesting application supports both My Drives and shared drives.
|
1666
1588
|
# @param [Boolean] supports_team_drives
|
1667
|
-
# Deprecated
|
1589
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1668
1590
|
# @param [Boolean] use_domain_admin_access
|
1669
1591
|
# Issue the request as a domain administrator; if set to true, then the
|
1670
1592
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1673,10 +1595,8 @@ module Google
|
|
1673
1595
|
# @param [String] fields
|
1674
1596
|
# Selector specifying which fields to include in a partial response.
|
1675
1597
|
# @param [String] quota_user
|
1676
|
-
#
|
1677
|
-
# characters.
|
1678
|
-
# @param [String] user_ip
|
1679
|
-
# 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.
|
1680
1600
|
# @param [Google::Apis::RequestOptions] options
|
1681
1601
|
# Request-specific options
|
1682
1602
|
#
|
@@ -1689,7 +1609,7 @@ module Google
|
|
1689
1609
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1690
1610
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1691
1611
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1692
|
-
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)
|
1693
1613
|
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
1694
1614
|
command.response_representation = Google::Apis::DriveV3::PermissionList::Representation
|
1695
1615
|
command.response_class = Google::Apis::DriveV3::PermissionList
|
@@ -1702,11 +1622,11 @@ module Google
|
|
1702
1622
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1703
1623
|
command.query['fields'] = fields unless fields.nil?
|
1704
1624
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1705
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1706
1625
|
execute_or_queue_command(command, &block)
|
1707
1626
|
end
|
1708
1627
|
|
1709
|
-
# 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.
|
1710
1630
|
# @param [String] file_id
|
1711
1631
|
# The ID of the file or shared drive.
|
1712
1632
|
# @param [String] permission_id
|
@@ -1717,15 +1637,11 @@ module Google
|
|
1717
1637
|
# @param [Boolean] supports_all_drives
|
1718
1638
|
# Whether the requesting application supports both My Drives and shared drives.
|
1719
1639
|
# @param [Boolean] supports_team_drives
|
1720
|
-
# Deprecated
|
1640
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1721
1641
|
# @param [Boolean] transfer_ownership
|
1722
1642
|
# Whether to transfer ownership to the specified user and downgrade the current
|
1723
1643
|
# owner to a writer. This parameter is required as an acknowledgement of the
|
1724
|
-
# side effect.
|
1725
|
-
# Drive. Files existing in a shared drive are owned by the organization that
|
1726
|
-
# owns that shared drive. Ownership transfers are not supported for files and
|
1727
|
-
# folders in shared drives. Organizers of a shared drive can move items from
|
1728
|
-
# that shared drive into their My Drive which transfers the ownership to them.
|
1644
|
+
# side effect.
|
1729
1645
|
# @param [Boolean] use_domain_admin_access
|
1730
1646
|
# Issue the request as a domain administrator; if set to true, then the
|
1731
1647
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1734,10 +1650,8 @@ module Google
|
|
1734
1650
|
# @param [String] fields
|
1735
1651
|
# Selector specifying which fields to include in a partial response.
|
1736
1652
|
# @param [String] quota_user
|
1737
|
-
#
|
1738
|
-
# characters.
|
1739
|
-
# @param [String] user_ip
|
1740
|
-
# 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.
|
1741
1655
|
# @param [Google::Apis::RequestOptions] options
|
1742
1656
|
# Request-specific options
|
1743
1657
|
#
|
@@ -1750,7 +1664,7 @@ module Google
|
|
1750
1664
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1751
1665
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1752
1666
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1753
|
-
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)
|
1754
1668
|
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
1755
1669
|
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1756
1670
|
command.request_object = permission_object
|
@@ -1765,11 +1679,10 @@ module Google
|
|
1765
1679
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1766
1680
|
command.query['fields'] = fields unless fields.nil?
|
1767
1681
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1768
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1769
1682
|
execute_or_queue_command(command, &block)
|
1770
1683
|
end
|
1771
1684
|
|
1772
|
-
# Creates a
|
1685
|
+
# Creates a reply to a comment.
|
1773
1686
|
# @param [String] file_id
|
1774
1687
|
# The ID of the file.
|
1775
1688
|
# @param [String] comment_id
|
@@ -1778,10 +1691,8 @@ module Google
|
|
1778
1691
|
# @param [String] fields
|
1779
1692
|
# Selector specifying which fields to include in a partial response.
|
1780
1693
|
# @param [String] quota_user
|
1781
|
-
#
|
1782
|
-
# characters.
|
1783
|
-
# @param [String] user_ip
|
1784
|
-
# 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.
|
1785
1696
|
# @param [Google::Apis::RequestOptions] options
|
1786
1697
|
# Request-specific options
|
1787
1698
|
#
|
@@ -1794,7 +1705,7 @@ module Google
|
|
1794
1705
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1795
1706
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1796
1707
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1797
|
-
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)
|
1798
1709
|
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
1799
1710
|
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1800
1711
|
command.request_object = reply_object
|
@@ -1804,7 +1715,6 @@ module Google
|
|
1804
1715
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
1805
1716
|
command.query['fields'] = fields unless fields.nil?
|
1806
1717
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1807
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1808
1718
|
execute_or_queue_command(command, &block)
|
1809
1719
|
end
|
1810
1720
|
|
@@ -1818,10 +1728,8 @@ module Google
|
|
1818
1728
|
# @param [String] fields
|
1819
1729
|
# Selector specifying which fields to include in a partial response.
|
1820
1730
|
# @param [String] quota_user
|
1821
|
-
#
|
1822
|
-
# characters.
|
1823
|
-
# @param [String] user_ip
|
1824
|
-
# 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.
|
1825
1733
|
# @param [Google::Apis::RequestOptions] options
|
1826
1734
|
# Request-specific options
|
1827
1735
|
#
|
@@ -1834,14 +1742,13 @@ module Google
|
|
1834
1742
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1835
1743
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1836
1744
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1837
|
-
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)
|
1838
1746
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1839
1747
|
command.params['fileId'] = file_id unless file_id.nil?
|
1840
1748
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
1841
1749
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
1842
1750
|
command.query['fields'] = fields unless fields.nil?
|
1843
1751
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1844
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1845
1752
|
execute_or_queue_command(command, &block)
|
1846
1753
|
end
|
1847
1754
|
|
@@ -1858,10 +1765,8 @@ module Google
|
|
1858
1765
|
# @param [String] fields
|
1859
1766
|
# Selector specifying which fields to include in a partial response.
|
1860
1767
|
# @param [String] quota_user
|
1861
|
-
#
|
1862
|
-
# characters.
|
1863
|
-
# @param [String] user_ip
|
1864
|
-
# 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.
|
1865
1770
|
# @param [Google::Apis::RequestOptions] options
|
1866
1771
|
# Request-specific options
|
1867
1772
|
#
|
@@ -1874,7 +1779,7 @@ module Google
|
|
1874
1779
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1875
1780
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1876
1781
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1877
|
-
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)
|
1878
1783
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1879
1784
|
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
1880
1785
|
command.response_class = Google::Apis::DriveV3::Reply
|
@@ -1884,7 +1789,6 @@ module Google
|
|
1884
1789
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
1885
1790
|
command.query['fields'] = fields unless fields.nil?
|
1886
1791
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1887
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1888
1792
|
execute_or_queue_command(command, &block)
|
1889
1793
|
end
|
1890
1794
|
|
@@ -1904,10 +1808,8 @@ module Google
|
|
1904
1808
|
# @param [String] fields
|
1905
1809
|
# Selector specifying which fields to include in a partial response.
|
1906
1810
|
# @param [String] quota_user
|
1907
|
-
#
|
1908
|
-
# characters.
|
1909
|
-
# @param [String] user_ip
|
1910
|
-
# 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.
|
1911
1813
|
# @param [Google::Apis::RequestOptions] options
|
1912
1814
|
# Request-specific options
|
1913
1815
|
#
|
@@ -1920,7 +1822,7 @@ module Google
|
|
1920
1822
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1921
1823
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1922
1824
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1923
|
-
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)
|
1924
1826
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
1925
1827
|
command.response_representation = Google::Apis::DriveV3::ReplyList::Representation
|
1926
1828
|
command.response_class = Google::Apis::DriveV3::ReplyList
|
@@ -1931,7 +1833,6 @@ module Google
|
|
1931
1833
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1932
1834
|
command.query['fields'] = fields unless fields.nil?
|
1933
1835
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1934
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1935
1836
|
execute_or_queue_command(command, &block)
|
1936
1837
|
end
|
1937
1838
|
|
@@ -1946,10 +1847,8 @@ module Google
|
|
1946
1847
|
# @param [String] fields
|
1947
1848
|
# Selector specifying which fields to include in a partial response.
|
1948
1849
|
# @param [String] quota_user
|
1949
|
-
#
|
1950
|
-
# characters.
|
1951
|
-
# @param [String] user_ip
|
1952
|
-
# 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.
|
1953
1852
|
# @param [Google::Apis::RequestOptions] options
|
1954
1853
|
# Request-specific options
|
1955
1854
|
#
|
@@ -1962,7 +1861,7 @@ module Google
|
|
1962
1861
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1963
1862
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1964
1863
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1965
|
-
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)
|
1966
1865
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1967
1866
|
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1968
1867
|
command.request_object = reply_object
|
@@ -1973,7 +1872,6 @@ module Google
|
|
1973
1872
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
1974
1873
|
command.query['fields'] = fields unless fields.nil?
|
1975
1874
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1976
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1977
1875
|
execute_or_queue_command(command, &block)
|
1978
1876
|
end
|
1979
1877
|
|
@@ -1988,10 +1886,8 @@ module Google
|
|
1988
1886
|
# @param [String] fields
|
1989
1887
|
# Selector specifying which fields to include in a partial response.
|
1990
1888
|
# @param [String] quota_user
|
1991
|
-
#
|
1992
|
-
# characters.
|
1993
|
-
# @param [String] user_ip
|
1994
|
-
# 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.
|
1995
1891
|
# @param [Google::Apis::RequestOptions] options
|
1996
1892
|
# Request-specific options
|
1997
1893
|
#
|
@@ -2004,13 +1900,12 @@ module Google
|
|
2004
1900
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2005
1901
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2006
1902
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2007
|
-
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)
|
2008
1904
|
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
2009
1905
|
command.params['fileId'] = file_id unless file_id.nil?
|
2010
1906
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
2011
1907
|
command.query['fields'] = fields unless fields.nil?
|
2012
1908
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2013
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2014
1909
|
execute_or_queue_command(command, &block)
|
2015
1910
|
end
|
2016
1911
|
|
@@ -2025,10 +1920,8 @@ module Google
|
|
2025
1920
|
# @param [String] fields
|
2026
1921
|
# Selector specifying which fields to include in a partial response.
|
2027
1922
|
# @param [String] quota_user
|
2028
|
-
#
|
2029
|
-
# characters.
|
2030
|
-
# @param [String] user_ip
|
2031
|
-
# 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.
|
2032
1925
|
# @param [IO, String] download_dest
|
2033
1926
|
# IO stream or filename to receive content download
|
2034
1927
|
# @param [Google::Apis::RequestOptions] options
|
@@ -2043,7 +1936,7 @@ module Google
|
|
2043
1936
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2044
1937
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2045
1938
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2046
|
-
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)
|
2047
1940
|
if download_dest.nil?
|
2048
1941
|
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
2049
1942
|
else
|
@@ -2057,7 +1950,6 @@ module Google
|
|
2057
1950
|
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
2058
1951
|
command.query['fields'] = fields unless fields.nil?
|
2059
1952
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2060
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2061
1953
|
execute_or_queue_command(command, &block)
|
2062
1954
|
end
|
2063
1955
|
|
@@ -2072,10 +1964,8 @@ module Google
|
|
2072
1964
|
# @param [String] fields
|
2073
1965
|
# Selector specifying which fields to include in a partial response.
|
2074
1966
|
# @param [String] quota_user
|
2075
|
-
#
|
2076
|
-
# characters.
|
2077
|
-
# @param [String] user_ip
|
2078
|
-
# 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.
|
2079
1969
|
# @param [Google::Apis::RequestOptions] options
|
2080
1970
|
# Request-specific options
|
2081
1971
|
#
|
@@ -2088,7 +1978,7 @@ module Google
|
|
2088
1978
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2089
1979
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2090
1980
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2091
|
-
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)
|
2092
1982
|
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
2093
1983
|
command.response_representation = Google::Apis::DriveV3::RevisionList::Representation
|
2094
1984
|
command.response_class = Google::Apis::DriveV3::RevisionList
|
@@ -2097,7 +1987,6 @@ module Google
|
|
2097
1987
|
command.query['pageToken'] = page_token unless page_token.nil?
|
2098
1988
|
command.query['fields'] = fields unless fields.nil?
|
2099
1989
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2100
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2101
1990
|
execute_or_queue_command(command, &block)
|
2102
1991
|
end
|
2103
1992
|
|
@@ -2110,10 +1999,8 @@ module Google
|
|
2110
1999
|
# @param [String] fields
|
2111
2000
|
# Selector specifying which fields to include in a partial response.
|
2112
2001
|
# @param [String] quota_user
|
2113
|
-
#
|
2114
|
-
# characters.
|
2115
|
-
# @param [String] user_ip
|
2116
|
-
# 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.
|
2117
2004
|
# @param [Google::Apis::RequestOptions] options
|
2118
2005
|
# Request-specific options
|
2119
2006
|
#
|
@@ -2126,7 +2013,7 @@ module Google
|
|
2126
2013
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2127
2014
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2128
2015
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2129
|
-
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)
|
2130
2017
|
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
2131
2018
|
command.request_representation = Google::Apis::DriveV3::Revision::Representation
|
2132
2019
|
command.request_object = revision_object
|
@@ -2136,25 +2023,22 @@ module Google
|
|
2136
2023
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
2137
2024
|
command.query['fields'] = fields unless fields.nil?
|
2138
2025
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2139
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2140
2026
|
execute_or_queue_command(command, &block)
|
2141
2027
|
end
|
2142
2028
|
|
2143
|
-
# Deprecated
|
2029
|
+
# Deprecated: Use `drives.create` instead.
|
2144
2030
|
# @param [String] request_id
|
2145
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
2146
|
-
# for idempotent creation of a Team Drive. A repeated request by the
|
2147
|
-
# and with the same request ID will avoid creating duplicates by
|
2148
|
-
# create the same Team Drive. If the Team Drive already exists a
|
2149
|
-
# 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.
|
2150
2036
|
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
2151
2037
|
# @param [String] fields
|
2152
2038
|
# Selector specifying which fields to include in a partial response.
|
2153
2039
|
# @param [String] quota_user
|
2154
|
-
#
|
2155
|
-
# characters.
|
2156
|
-
# @param [String] user_ip
|
2157
|
-
# 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.
|
2158
2042
|
# @param [Google::Apis::RequestOptions] options
|
2159
2043
|
# Request-specific options
|
2160
2044
|
#
|
@@ -2167,7 +2051,7 @@ module Google
|
|
2167
2051
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2168
2052
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2169
2053
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2170
|
-
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)
|
2171
2055
|
command = make_simple_command(:post, 'teamdrives', options)
|
2172
2056
|
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2173
2057
|
command.request_object = team_drive_object
|
@@ -2176,20 +2060,17 @@ module Google
|
|
2176
2060
|
command.query['requestId'] = request_id unless request_id.nil?
|
2177
2061
|
command.query['fields'] = fields unless fields.nil?
|
2178
2062
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2179
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2180
2063
|
execute_or_queue_command(command, &block)
|
2181
2064
|
end
|
2182
2065
|
|
2183
|
-
# Deprecated
|
2066
|
+
# Deprecated: Use `drives.delete` instead.
|
2184
2067
|
# @param [String] team_drive_id
|
2185
2068
|
# The ID of the Team Drive
|
2186
2069
|
# @param [String] fields
|
2187
2070
|
# Selector specifying which fields to include in a partial response.
|
2188
2071
|
# @param [String] quota_user
|
2189
|
-
#
|
2190
|
-
# characters.
|
2191
|
-
# @param [String] user_ip
|
2192
|
-
# 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.
|
2193
2074
|
# @param [Google::Apis::RequestOptions] options
|
2194
2075
|
# Request-specific options
|
2195
2076
|
#
|
@@ -2202,16 +2083,15 @@ module Google
|
|
2202
2083
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2203
2084
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2204
2085
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2205
|
-
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)
|
2206
2087
|
command = make_simple_command(:delete, 'teamdrives/{teamDriveId}', options)
|
2207
2088
|
command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2208
2089
|
command.query['fields'] = fields unless fields.nil?
|
2209
2090
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2210
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2211
2091
|
execute_or_queue_command(command, &block)
|
2212
2092
|
end
|
2213
2093
|
|
2214
|
-
# Deprecated
|
2094
|
+
# Deprecated: Use `drives.get` instead.
|
2215
2095
|
# @param [String] team_drive_id
|
2216
2096
|
# The ID of the Team Drive
|
2217
2097
|
# @param [Boolean] use_domain_admin_access
|
@@ -2221,10 +2101,8 @@ module Google
|
|
2221
2101
|
# @param [String] fields
|
2222
2102
|
# Selector specifying which fields to include in a partial response.
|
2223
2103
|
# @param [String] quota_user
|
2224
|
-
#
|
2225
|
-
# characters.
|
2226
|
-
# @param [String] user_ip
|
2227
|
-
# 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.
|
2228
2106
|
# @param [Google::Apis::RequestOptions] options
|
2229
2107
|
# Request-specific options
|
2230
2108
|
#
|
@@ -2237,7 +2115,7 @@ module Google
|
|
2237
2115
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2238
2116
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2239
2117
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2240
|
-
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)
|
2241
2119
|
command = make_simple_command(:get, 'teamdrives/{teamDriveId}', options)
|
2242
2120
|
command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2243
2121
|
command.response_class = Google::Apis::DriveV3::TeamDrive
|
@@ -2245,11 +2123,10 @@ module Google
|
|
2245
2123
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2246
2124
|
command.query['fields'] = fields unless fields.nil?
|
2247
2125
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2248
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2249
2126
|
execute_or_queue_command(command, &block)
|
2250
2127
|
end
|
2251
2128
|
|
2252
|
-
# Deprecated
|
2129
|
+
# Deprecated: Use `drives.list` instead.
|
2253
2130
|
# @param [Fixnum] page_size
|
2254
2131
|
# Maximum number of Team Drives to return.
|
2255
2132
|
# @param [String] page_token
|
@@ -2262,10 +2139,8 @@ module Google
|
|
2262
2139
|
# @param [String] fields
|
2263
2140
|
# Selector specifying which fields to include in a partial response.
|
2264
2141
|
# @param [String] quota_user
|
2265
|
-
#
|
2266
|
-
# characters.
|
2267
|
-
# @param [String] user_ip
|
2268
|
-
# 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.
|
2269
2144
|
# @param [Google::Apis::RequestOptions] options
|
2270
2145
|
# Request-specific options
|
2271
2146
|
#
|
@@ -2278,7 +2153,7 @@ module Google
|
|
2278
2153
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2279
2154
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2280
2155
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2281
|
-
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)
|
2282
2157
|
command = make_simple_command(:get, 'teamdrives', options)
|
2283
2158
|
command.response_representation = Google::Apis::DriveV3::TeamDriveList::Representation
|
2284
2159
|
command.response_class = Google::Apis::DriveV3::TeamDriveList
|
@@ -2288,11 +2163,10 @@ module Google
|
|
2288
2163
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2289
2164
|
command.query['fields'] = fields unless fields.nil?
|
2290
2165
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2291
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2292
2166
|
execute_or_queue_command(command, &block)
|
2293
2167
|
end
|
2294
2168
|
|
2295
|
-
# Deprecated
|
2169
|
+
# Deprecated: Use `drives.update` instead.
|
2296
2170
|
# @param [String] team_drive_id
|
2297
2171
|
# The ID of the Team Drive
|
2298
2172
|
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
@@ -2303,10 +2177,8 @@ module Google
|
|
2303
2177
|
# @param [String] fields
|
2304
2178
|
# Selector specifying which fields to include in a partial response.
|
2305
2179
|
# @param [String] quota_user
|
2306
|
-
#
|
2307
|
-
# characters.
|
2308
|
-
# @param [String] user_ip
|
2309
|
-
# 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.
|
2310
2182
|
# @param [Google::Apis::RequestOptions] options
|
2311
2183
|
# Request-specific options
|
2312
2184
|
#
|
@@ -2319,7 +2191,7 @@ module Google
|
|
2319
2191
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2320
2192
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2321
2193
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2322
|
-
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)
|
2323
2195
|
command = make_simple_command(:patch, 'teamdrives/{teamDriveId}', options)
|
2324
2196
|
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2325
2197
|
command.request_object = team_drive_object
|
@@ -2329,7 +2201,6 @@ module Google
|
|
2329
2201
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2330
2202
|
command.query['fields'] = fields unless fields.nil?
|
2331
2203
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2332
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2333
2204
|
execute_or_queue_command(command, &block)
|
2334
2205
|
end
|
2335
2206
|
|
@@ -2338,7 +2209,6 @@ module Google
|
|
2338
2209
|
def apply_command_defaults(command)
|
2339
2210
|
command.query['key'] = key unless key.nil?
|
2340
2211
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2341
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2342
2212
|
end
|
2343
2213
|
end
|
2344
2214
|
end
|