google-apis-drive_v2 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/OVERVIEW.md +3 -3
- data/lib/google/apis/drive_v2/classes.rb +500 -505
- data/lib/google/apis/drive_v2/gem_version.rb +2 -2
- data/lib/google/apis/drive_v2/service.rb +466 -664
- data/lib/google/apis/drive_v2.rb +3 -4
- metadata +7 -7
@@ -20,10 +20,9 @@ require 'google/apis/errors'
|
|
20
20
|
module Google
|
21
21
|
module Apis
|
22
22
|
module DriveV2
|
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_v2'
|
@@ -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/v2/',
|
52
47
|
client_name: 'google-apis-drive_v2',
|
@@ -58,8 +53,8 @@ module Google
|
|
58
53
|
# @param [Boolean] include_subscribed
|
59
54
|
# Whether to count changes outside the My Drive hierarchy. When set to false,
|
60
55
|
# changes to files such as those in the Application Data folder or shared files
|
61
|
-
# which have not been added to My Drive will be omitted from the
|
62
|
-
# maxChangeIdCount
|
56
|
+
# which have not been added to My Drive will be omitted from the `
|
57
|
+
# maxChangeIdCount`.
|
63
58
|
# @param [Fixnum] max_change_id_count
|
64
59
|
# Maximum number of remaining change IDs to count
|
65
60
|
# @param [Fixnum] start_change_id
|
@@ -68,10 +63,8 @@ module Google
|
|
68
63
|
# @param [String] fields
|
69
64
|
# Selector specifying which fields to include in a partial response.
|
70
65
|
# @param [String] quota_user
|
71
|
-
#
|
72
|
-
# characters.
|
73
|
-
# @param [String] user_ip
|
74
|
-
# Deprecated. Please use quotaUser instead.
|
66
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
67
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
75
68
|
# @param [Google::Apis::RequestOptions] options
|
76
69
|
# Request-specific options
|
77
70
|
#
|
@@ -84,7 +77,7 @@ module Google
|
|
84
77
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
85
78
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
86
79
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
87
|
-
def get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil,
|
80
|
+
def get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
88
81
|
command = make_simple_command(:get, 'about', options)
|
89
82
|
command.response_representation = Google::Apis::DriveV2::About::Representation
|
90
83
|
command.response_class = Google::Apis::DriveV2::About
|
@@ -93,7 +86,6 @@ module Google
|
|
93
86
|
command.query['startChangeId'] = start_change_id unless start_change_id.nil?
|
94
87
|
command.query['fields'] = fields unless fields.nil?
|
95
88
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
96
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
97
89
|
execute_or_queue_command(command, &block)
|
98
90
|
end
|
99
91
|
|
@@ -103,10 +95,8 @@ module Google
|
|
103
95
|
# @param [String] fields
|
104
96
|
# Selector specifying which fields to include in a partial response.
|
105
97
|
# @param [String] quota_user
|
106
|
-
#
|
107
|
-
# characters.
|
108
|
-
# @param [String] user_ip
|
109
|
-
# Deprecated. Please use quotaUser instead.
|
98
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
99
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
110
100
|
# @param [Google::Apis::RequestOptions] options
|
111
101
|
# Request-specific options
|
112
102
|
#
|
@@ -119,14 +109,13 @@ module Google
|
|
119
109
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
120
110
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
121
111
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
122
|
-
def get_app(app_id, fields: nil, quota_user: nil,
|
112
|
+
def get_app(app_id, fields: nil, quota_user: nil, options: nil, &block)
|
123
113
|
command = make_simple_command(:get, 'apps/{appId}', options)
|
124
114
|
command.response_representation = Google::Apis::DriveV2::App::Representation
|
125
115
|
command.response_class = Google::Apis::DriveV2::App
|
126
116
|
command.params['appId'] = app_id unless app_id.nil?
|
127
117
|
command.query['fields'] = fields unless fields.nil?
|
128
118
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
129
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
130
119
|
execute_or_queue_command(command, &block)
|
131
120
|
end
|
132
121
|
|
@@ -134,12 +123,12 @@ module Google
|
|
134
123
|
# @param [String] app_filter_extensions
|
135
124
|
# A comma-separated list of file extensions for open with filtering. All apps
|
136
125
|
# within the given app query scope which can open any of the given file
|
137
|
-
# extensions will be included in the response. If appFilterMimeTypes are
|
126
|
+
# extensions will be included in the response. If `appFilterMimeTypes` are
|
138
127
|
# provided as well, the result is a union of the two resulting app lists.
|
139
128
|
# @param [String] app_filter_mime_types
|
140
129
|
# A comma-separated list of MIME types for open with filtering. All apps within
|
141
130
|
# the given app query scope which can open any of the given MIME types will be
|
142
|
-
# included in the response. If appFilterExtensions are provided as well, the
|
131
|
+
# included in the response. If `appFilterExtensions` are provided as well, the
|
143
132
|
# result is a union of the two resulting app lists.
|
144
133
|
# @param [String] language_code
|
145
134
|
# A language or locale code, as defined by BCP 47, with some extensions from
|
@@ -147,10 +136,8 @@ module Google
|
|
147
136
|
# @param [String] fields
|
148
137
|
# Selector specifying which fields to include in a partial response.
|
149
138
|
# @param [String] quota_user
|
150
|
-
#
|
151
|
-
# characters.
|
152
|
-
# @param [String] user_ip
|
153
|
-
# Deprecated. Please use quotaUser instead.
|
139
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
140
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
154
141
|
# @param [Google::Apis::RequestOptions] options
|
155
142
|
# Request-specific options
|
156
143
|
#
|
@@ -163,7 +150,7 @@ module Google
|
|
163
150
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
164
151
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
165
152
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
166
|
-
def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil,
|
153
|
+
def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
|
167
154
|
command = make_simple_command(:get, 'apps', options)
|
168
155
|
command.response_representation = Google::Apis::DriveV2::AppList::Representation
|
169
156
|
command.response_class = Google::Apis::DriveV2::AppList
|
@@ -172,29 +159,26 @@ module Google
|
|
172
159
|
command.query['languageCode'] = language_code unless language_code.nil?
|
173
160
|
command.query['fields'] = fields unless fields.nil?
|
174
161
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
175
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
176
162
|
execute_or_queue_command(command, &block)
|
177
163
|
end
|
178
164
|
|
179
|
-
# Deprecated
|
180
|
-
# changes.
|
165
|
+
# Deprecated: Use `changes.getStartPageToken` and `changes.list` to retrieve
|
166
|
+
# recent changes.
|
181
167
|
# @param [String] change_id
|
182
168
|
# The ID of the change.
|
183
169
|
# @param [String] drive_id
|
184
|
-
# The shared drive from which the change
|
170
|
+
# The shared drive from which the change will be returned.
|
185
171
|
# @param [Boolean] supports_all_drives
|
186
172
|
# Whether the requesting application supports both My Drives and shared drives.
|
187
173
|
# @param [Boolean] supports_team_drives
|
188
|
-
# Deprecated
|
174
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
189
175
|
# @param [String] team_drive_id
|
190
|
-
# Deprecated
|
176
|
+
# Deprecated: Use `driveId` instead.
|
191
177
|
# @param [String] fields
|
192
178
|
# Selector specifying which fields to include in a partial response.
|
193
179
|
# @param [String] quota_user
|
194
|
-
#
|
195
|
-
# characters.
|
196
|
-
# @param [String] user_ip
|
197
|
-
# Deprecated. Please use quotaUser instead.
|
180
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
181
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
198
182
|
# @param [Google::Apis::RequestOptions] options
|
199
183
|
# Request-specific options
|
200
184
|
#
|
@@ -207,7 +191,7 @@ module Google
|
|
207
191
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
208
192
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
209
193
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
210
|
-
def get_change(change_id, drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
194
|
+
def get_change(change_id, drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
211
195
|
command = make_simple_command(:get, 'changes/{changeId}', options)
|
212
196
|
command.response_representation = Google::Apis::DriveV2::Change::Representation
|
213
197
|
command.response_class = Google::Apis::DriveV2::Change
|
@@ -218,27 +202,24 @@ module Google
|
|
218
202
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
219
203
|
command.query['fields'] = fields unless fields.nil?
|
220
204
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
221
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
222
205
|
execute_or_queue_command(command, &block)
|
223
206
|
end
|
224
207
|
|
225
208
|
# Gets the starting pageToken for listing future changes.
|
226
209
|
# @param [String] drive_id
|
227
210
|
# The ID of the shared drive for which the starting pageToken for listing future
|
228
|
-
# changes from that shared drive
|
211
|
+
# changes from that shared drive will be returned.
|
229
212
|
# @param [Boolean] supports_all_drives
|
230
213
|
# Whether the requesting application supports both My Drives and shared drives.
|
231
214
|
# @param [Boolean] supports_team_drives
|
232
|
-
# Deprecated
|
215
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
233
216
|
# @param [String] team_drive_id
|
234
|
-
# Deprecated
|
217
|
+
# Deprecated: Use `driveId` instead.
|
235
218
|
# @param [String] fields
|
236
219
|
# Selector specifying which fields to include in a partial response.
|
237
220
|
# @param [String] quota_user
|
238
|
-
#
|
239
|
-
# characters.
|
240
|
-
# @param [String] user_ip
|
241
|
-
# Deprecated. Please use quotaUser instead.
|
221
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
222
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
242
223
|
# @param [Google::Apis::RequestOptions] options
|
243
224
|
# Request-specific options
|
244
225
|
#
|
@@ -251,7 +232,7 @@ module Google
|
|
251
232
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
252
233
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
253
234
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
254
|
-
def get_change_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
235
|
+
def get_change_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)
|
255
236
|
command = make_simple_command(:get, 'changes/startPageToken', options)
|
256
237
|
command.response_representation = Google::Apis::DriveV2::StartPageToken::Representation
|
257
238
|
command.response_class = Google::Apis::DriveV2::StartPageToken
|
@@ -261,15 +242,14 @@ module Google
|
|
261
242
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
262
243
|
command.query['fields'] = fields unless fields.nil?
|
263
244
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
264
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
265
245
|
execute_or_queue_command(command, &block)
|
266
246
|
end
|
267
247
|
|
268
248
|
# Lists the changes for a user or shared drive.
|
269
249
|
# @param [String] drive_id
|
270
|
-
# The shared drive from which changes
|
271
|
-
# will be reflective of the shared drive; use the combined drive ID and
|
272
|
-
# ID as an identifier.
|
250
|
+
# The shared drive from which changes will be returned. If specified the change
|
251
|
+
# IDs will be reflective of the shared drive; use the combined drive ID and
|
252
|
+
# change ID as an identifier.
|
273
253
|
# @param [Boolean] include_corpus_removals
|
274
254
|
# Whether changes should include the file resource if the file is still
|
275
255
|
# accessible by the user at the time of the request, even when a file was
|
@@ -281,41 +261,40 @@ module Google
|
|
281
261
|
# @param [Boolean] include_items_from_all_drives
|
282
262
|
# Whether both My Drive and shared drive items should be included in results.
|
283
263
|
# @param [String] include_labels
|
284
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
264
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
285
265
|
# the response.
|
286
266
|
# @param [String] include_permissions_for_view
|
287
267
|
# Specifies which additional view's permissions to include in the response. Only
|
288
|
-
#
|
268
|
+
# `published` is supported.
|
289
269
|
# @param [Boolean] include_subscribed
|
290
270
|
# Whether to include changes outside the My Drive hierarchy in the result. When
|
291
271
|
# set to false, changes to files such as those in the Application Data folder or
|
292
|
-
# shared files which have not been added to My Drive
|
272
|
+
# shared files which have not been added to My Drive will be omitted from the
|
273
|
+
# result.
|
293
274
|
# @param [Boolean] include_team_drive_items
|
294
|
-
# Deprecated
|
275
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
295
276
|
# @param [Fixnum] max_results
|
296
277
|
# Maximum number of changes to return.
|
297
278
|
# @param [String] page_token
|
298
279
|
# The token for continuing a previous list request on the next page. This should
|
299
|
-
# be set to the value of
|
280
|
+
# be set to the value of `nextPageToken` from the previous response or to the
|
300
281
|
# response from the getStartPageToken method.
|
301
282
|
# @param [String] spaces
|
302
|
-
# A comma-separated list of spaces to query. Supported values are
|
303
|
-
# appDataFolder
|
283
|
+
# A comma-separated list of spaces to query. Supported values are `drive`, `
|
284
|
+
# appDataFolder` and `photos`.
|
304
285
|
# @param [Fixnum] start_change_id
|
305
|
-
# Deprecated
|
286
|
+
# Deprecated: Use `pageToken` instead.
|
306
287
|
# @param [Boolean] supports_all_drives
|
307
288
|
# Whether the requesting application supports both My Drives and shared drives.
|
308
289
|
# @param [Boolean] supports_team_drives
|
309
|
-
# Deprecated
|
290
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
310
291
|
# @param [String] team_drive_id
|
311
|
-
# Deprecated
|
292
|
+
# Deprecated: Use `driveId` instead.
|
312
293
|
# @param [String] fields
|
313
294
|
# Selector specifying which fields to include in a partial response.
|
314
295
|
# @param [String] quota_user
|
315
|
-
#
|
316
|
-
# characters.
|
317
|
-
# @param [String] user_ip
|
318
|
-
# Deprecated. Please use quotaUser instead.
|
296
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
297
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
319
298
|
# @param [Google::Apis::RequestOptions] options
|
320
299
|
# Request-specific options
|
321
300
|
#
|
@@ -328,7 +307,7 @@ module Google
|
|
328
307
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
329
308
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
330
309
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
331
|
-
def list_changes(drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
310
|
+
def list_changes(drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
332
311
|
command = make_simple_command(:get, 'changes', options)
|
333
312
|
command.response_representation = Google::Apis::DriveV2::ChangeList::Representation
|
334
313
|
command.response_class = Google::Apis::DriveV2::ChangeList
|
@@ -349,16 +328,15 @@ module Google
|
|
349
328
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
350
329
|
command.query['fields'] = fields unless fields.nil?
|
351
330
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
352
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
353
331
|
execute_or_queue_command(command, &block)
|
354
332
|
end
|
355
333
|
|
356
334
|
# Subscribe to changes for a user.
|
357
335
|
# @param [Google::Apis::DriveV2::Channel] channel_object
|
358
336
|
# @param [String] drive_id
|
359
|
-
# The shared drive from which changes
|
360
|
-
# will be reflective of the shared drive; use the combined drive ID and
|
361
|
-
# ID as an identifier.
|
337
|
+
# The shared drive from which changes will be returned. If specified the change
|
338
|
+
# IDs will be reflective of the shared drive; use the combined drive ID and
|
339
|
+
# change ID as an identifier.
|
362
340
|
# @param [Boolean] include_corpus_removals
|
363
341
|
# Whether changes should include the file resource if the file is still
|
364
342
|
# accessible by the user at the time of the request, even when a file was
|
@@ -370,41 +348,40 @@ module Google
|
|
370
348
|
# @param [Boolean] include_items_from_all_drives
|
371
349
|
# Whether both My Drive and shared drive items should be included in results.
|
372
350
|
# @param [String] include_labels
|
373
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
351
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
374
352
|
# the response.
|
375
353
|
# @param [String] include_permissions_for_view
|
376
354
|
# Specifies which additional view's permissions to include in the response. Only
|
377
|
-
#
|
355
|
+
# `published` is supported.
|
378
356
|
# @param [Boolean] include_subscribed
|
379
357
|
# Whether to include changes outside the My Drive hierarchy in the result. When
|
380
358
|
# set to false, changes to files such as those in the Application Data folder or
|
381
|
-
# shared files which have not been added to My Drive
|
359
|
+
# shared files which have not been added to My Drive will be omitted from the
|
360
|
+
# result.
|
382
361
|
# @param [Boolean] include_team_drive_items
|
383
|
-
# Deprecated
|
362
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
384
363
|
# @param [Fixnum] max_results
|
385
364
|
# Maximum number of changes to return.
|
386
365
|
# @param [String] page_token
|
387
366
|
# The token for continuing a previous list request on the next page. This should
|
388
|
-
# be set to the value of
|
367
|
+
# be set to the value of `nextPageToken` from the previous response or to the
|
389
368
|
# response from the getStartPageToken method.
|
390
369
|
# @param [String] spaces
|
391
|
-
# A comma-separated list of spaces to query. Supported values are
|
392
|
-
# appDataFolder
|
370
|
+
# A comma-separated list of spaces to query. Supported values are `drive`, `
|
371
|
+
# appDataFolder` and `photos`.
|
393
372
|
# @param [Fixnum] start_change_id
|
394
|
-
# Deprecated
|
373
|
+
# Deprecated: Use `pageToken` instead.
|
395
374
|
# @param [Boolean] supports_all_drives
|
396
375
|
# Whether the requesting application supports both My Drives and shared drives.
|
397
376
|
# @param [Boolean] supports_team_drives
|
398
|
-
# Deprecated
|
377
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
399
378
|
# @param [String] team_drive_id
|
400
|
-
# Deprecated
|
379
|
+
# Deprecated: Use `driveId` instead.
|
401
380
|
# @param [String] fields
|
402
381
|
# Selector specifying which fields to include in a partial response.
|
403
382
|
# @param [String] quota_user
|
404
|
-
#
|
405
|
-
# characters.
|
406
|
-
# @param [String] user_ip
|
407
|
-
# Deprecated. Please use quotaUser instead.
|
383
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
384
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
408
385
|
# @param [Google::Apis::RequestOptions] options
|
409
386
|
# Request-specific options
|
410
387
|
#
|
@@ -417,7 +394,7 @@ module Google
|
|
417
394
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
418
395
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
419
396
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
420
|
-
def watch_change(channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
397
|
+
def watch_change(channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_deleted: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
421
398
|
command = make_simple_command(:post, 'changes/watch', options)
|
422
399
|
command.request_representation = Google::Apis::DriveV2::Channel::Representation
|
423
400
|
command.request_object = channel_object
|
@@ -440,19 +417,16 @@ module Google
|
|
440
417
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
441
418
|
command.query['fields'] = fields unless fields.nil?
|
442
419
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
443
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
444
420
|
execute_or_queue_command(command, &block)
|
445
421
|
end
|
446
422
|
|
447
|
-
#
|
423
|
+
# Stops watching resources through this channel.
|
448
424
|
# @param [Google::Apis::DriveV2::Channel] channel_object
|
449
425
|
# @param [String] fields
|
450
426
|
# Selector specifying which fields to include in a partial response.
|
451
427
|
# @param [String] quota_user
|
452
|
-
#
|
453
|
-
# characters.
|
454
|
-
# @param [String] user_ip
|
455
|
-
# Deprecated. Please use quotaUser instead.
|
428
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
429
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
456
430
|
# @param [Google::Apis::RequestOptions] options
|
457
431
|
# Request-specific options
|
458
432
|
#
|
@@ -465,13 +439,12 @@ module Google
|
|
465
439
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
466
440
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
467
441
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
468
|
-
def stop_channel(channel_object = nil, fields: nil, quota_user: nil,
|
442
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
469
443
|
command = make_simple_command(:post, 'channels/stop', options)
|
470
444
|
command.request_representation = Google::Apis::DriveV2::Channel::Representation
|
471
445
|
command.request_object = channel_object
|
472
446
|
command.query['fields'] = fields unless fields.nil?
|
473
447
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
474
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
475
448
|
execute_or_queue_command(command, &block)
|
476
449
|
end
|
477
450
|
|
@@ -481,15 +454,13 @@ module Google
|
|
481
454
|
# @param [String] child_id
|
482
455
|
# The ID of the child.
|
483
456
|
# @param [Boolean] enforce_single_parent
|
484
|
-
# Deprecated
|
485
|
-
#
|
457
|
+
# Deprecated: If an item is not in a shared drive and its last parent is removed,
|
458
|
+
# the item is placed under its owner's root.
|
486
459
|
# @param [String] fields
|
487
460
|
# Selector specifying which fields to include in a partial response.
|
488
461
|
# @param [String] quota_user
|
489
|
-
#
|
490
|
-
# characters.
|
491
|
-
# @param [String] user_ip
|
492
|
-
# Deprecated. Please use quotaUser instead.
|
462
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
463
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
493
464
|
# @param [Google::Apis::RequestOptions] options
|
494
465
|
# Request-specific options
|
495
466
|
#
|
@@ -502,14 +473,13 @@ module Google
|
|
502
473
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
503
474
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
504
475
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
505
|
-
def delete_child(folder_id, child_id, enforce_single_parent: nil, fields: nil, quota_user: nil,
|
476
|
+
def delete_child(folder_id, child_id, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
506
477
|
command = make_simple_command(:delete, 'files/{folderId}/children/{childId}', options)
|
507
478
|
command.params['folderId'] = folder_id unless folder_id.nil?
|
508
479
|
command.params['childId'] = child_id unless child_id.nil?
|
509
480
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
510
481
|
command.query['fields'] = fields unless fields.nil?
|
511
482
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
512
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
513
483
|
execute_or_queue_command(command, &block)
|
514
484
|
end
|
515
485
|
|
@@ -521,10 +491,8 @@ module Google
|
|
521
491
|
# @param [String] fields
|
522
492
|
# Selector specifying which fields to include in a partial response.
|
523
493
|
# @param [String] quota_user
|
524
|
-
#
|
525
|
-
# characters.
|
526
|
-
# @param [String] user_ip
|
527
|
-
# Deprecated. Please use quotaUser instead.
|
494
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
495
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
528
496
|
# @param [Google::Apis::RequestOptions] options
|
529
497
|
# Request-specific options
|
530
498
|
#
|
@@ -537,7 +505,7 @@ module Google
|
|
537
505
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
538
506
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
539
507
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
540
|
-
def get_child(folder_id, child_id, fields: nil, quota_user: nil,
|
508
|
+
def get_child(folder_id, child_id, fields: nil, quota_user: nil, options: nil, &block)
|
541
509
|
command = make_simple_command(:get, 'files/{folderId}/children/{childId}', options)
|
542
510
|
command.response_representation = Google::Apis::DriveV2::ChildReference::Representation
|
543
511
|
command.response_class = Google::Apis::DriveV2::ChildReference
|
@@ -545,7 +513,6 @@ module Google
|
|
545
513
|
command.params['childId'] = child_id unless child_id.nil?
|
546
514
|
command.query['fields'] = fields unless fields.nil?
|
547
515
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
548
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
549
516
|
execute_or_queue_command(command, &block)
|
550
517
|
end
|
551
518
|
|
@@ -554,19 +521,17 @@ module Google
|
|
554
521
|
# The ID of the folder.
|
555
522
|
# @param [Google::Apis::DriveV2::ChildReference] child_reference_object
|
556
523
|
# @param [Boolean] enforce_single_parent
|
557
|
-
# Deprecated
|
558
|
-
# shortcuts instead.
|
524
|
+
# Deprecated: Adding files to multiple folders is no longer supported. Use `
|
525
|
+
# shortcuts` instead.
|
559
526
|
# @param [Boolean] supports_all_drives
|
560
527
|
# Whether the requesting application supports both My Drives and shared drives.
|
561
528
|
# @param [Boolean] supports_team_drives
|
562
|
-
# Deprecated
|
529
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
563
530
|
# @param [String] fields
|
564
531
|
# Selector specifying which fields to include in a partial response.
|
565
532
|
# @param [String] quota_user
|
566
|
-
#
|
567
|
-
# characters.
|
568
|
-
# @param [String] user_ip
|
569
|
-
# Deprecated. Please use quotaUser instead.
|
533
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
534
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
570
535
|
# @param [Google::Apis::RequestOptions] options
|
571
536
|
# Request-specific options
|
572
537
|
#
|
@@ -579,7 +544,7 @@ module Google
|
|
579
544
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
580
545
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
581
546
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
582
|
-
def insert_child(folder_id, child_reference_object = nil, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
547
|
+
def insert_child(folder_id, child_reference_object = nil, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
583
548
|
command = make_simple_command(:post, 'files/{folderId}/children', options)
|
584
549
|
command.request_representation = Google::Apis::DriveV2::ChildReference::Representation
|
585
550
|
command.request_object = child_reference_object
|
@@ -591,7 +556,6 @@ module Google
|
|
591
556
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
592
557
|
command.query['fields'] = fields unless fields.nil?
|
593
558
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
594
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
595
559
|
execute_or_queue_command(command, &block)
|
596
560
|
end
|
597
561
|
|
@@ -601,10 +565,10 @@ module Google
|
|
601
565
|
# @param [Fixnum] max_results
|
602
566
|
# Maximum number of children to return.
|
603
567
|
# @param [String] order_by
|
604
|
-
# A comma-separated list of sort keys. Valid keys are
|
605
|
-
# lastViewedByMeDate
|
606
|
-
# recency
|
607
|
-
# by default, but may be reversed with the
|
568
|
+
# A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, `
|
569
|
+
# lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `
|
570
|
+
# recency`, `sharedWithMeDate`, `starred`, and `title`. Each key sorts ascending
|
571
|
+
# by default, but may be reversed with the `desc` modifier. Example usage: ?
|
608
572
|
# orderBy=folder,modifiedDate desc,title. Please note that there is a current
|
609
573
|
# limitation for users with approximately one million files in which the
|
610
574
|
# requested sort order is ignored.
|
@@ -615,10 +579,8 @@ module Google
|
|
615
579
|
# @param [String] fields
|
616
580
|
# Selector specifying which fields to include in a partial response.
|
617
581
|
# @param [String] quota_user
|
618
|
-
#
|
619
|
-
# characters.
|
620
|
-
# @param [String] user_ip
|
621
|
-
# Deprecated. Please use quotaUser instead.
|
582
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
583
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
622
584
|
# @param [Google::Apis::RequestOptions] options
|
623
585
|
# Request-specific options
|
624
586
|
#
|
@@ -631,7 +593,7 @@ module Google
|
|
631
593
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
632
594
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
633
595
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
634
|
-
def list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil,
|
596
|
+
def list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, options: nil, &block)
|
635
597
|
command = make_simple_command(:get, 'files/{folderId}/children', options)
|
636
598
|
command.response_representation = Google::Apis::DriveV2::ChildList::Representation
|
637
599
|
command.response_class = Google::Apis::DriveV2::ChildList
|
@@ -642,7 +604,6 @@ module Google
|
|
642
604
|
command.query['q'] = q unless q.nil?
|
643
605
|
command.query['fields'] = fields unless fields.nil?
|
644
606
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
645
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
646
607
|
execute_or_queue_command(command, &block)
|
647
608
|
end
|
648
609
|
|
@@ -654,10 +615,8 @@ module Google
|
|
654
615
|
# @param [String] fields
|
655
616
|
# Selector specifying which fields to include in a partial response.
|
656
617
|
# @param [String] quota_user
|
657
|
-
#
|
658
|
-
# characters.
|
659
|
-
# @param [String] user_ip
|
660
|
-
# Deprecated. Please use quotaUser instead.
|
618
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
619
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
661
620
|
# @param [Google::Apis::RequestOptions] options
|
662
621
|
# Request-specific options
|
663
622
|
#
|
@@ -670,13 +629,12 @@ module Google
|
|
670
629
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
671
630
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
672
631
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
673
|
-
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil,
|
632
|
+
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
|
674
633
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
675
634
|
command.params['fileId'] = file_id unless file_id.nil?
|
676
635
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
677
636
|
command.query['fields'] = fields unless fields.nil?
|
678
637
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
679
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
680
638
|
execute_or_queue_command(command, &block)
|
681
639
|
end
|
682
640
|
|
@@ -691,10 +649,8 @@ module Google
|
|
691
649
|
# @param [String] fields
|
692
650
|
# Selector specifying which fields to include in a partial response.
|
693
651
|
# @param [String] quota_user
|
694
|
-
#
|
695
|
-
# characters.
|
696
|
-
# @param [String] user_ip
|
697
|
-
# 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.
|
698
654
|
# @param [Google::Apis::RequestOptions] options
|
699
655
|
# Request-specific options
|
700
656
|
#
|
@@ -707,7 +663,7 @@ module Google
|
|
707
663
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
708
664
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
709
665
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
710
|
-
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil,
|
666
|
+
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
711
667
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
712
668
|
command.response_representation = Google::Apis::DriveV2::Comment::Representation
|
713
669
|
command.response_class = Google::Apis::DriveV2::Comment
|
@@ -716,7 +672,6 @@ module Google
|
|
716
672
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
717
673
|
command.query['fields'] = fields unless fields.nil?
|
718
674
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
719
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
720
675
|
execute_or_queue_command(command, &block)
|
721
676
|
end
|
722
677
|
|
@@ -727,10 +682,8 @@ module Google
|
|
727
682
|
# @param [String] fields
|
728
683
|
# Selector specifying which fields to include in a partial response.
|
729
684
|
# @param [String] quota_user
|
730
|
-
#
|
731
|
-
# characters.
|
732
|
-
# @param [String] user_ip
|
733
|
-
# 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.
|
734
687
|
# @param [Google::Apis::RequestOptions] options
|
735
688
|
# Request-specific options
|
736
689
|
#
|
@@ -743,7 +696,7 @@ module Google
|
|
743
696
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
744
697
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
745
698
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
746
|
-
def insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil,
|
699
|
+
def insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
747
700
|
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
748
701
|
command.request_representation = Google::Apis::DriveV2::Comment::Representation
|
749
702
|
command.request_object = comment_object
|
@@ -752,7 +705,6 @@ module Google
|
|
752
705
|
command.params['fileId'] = file_id unless file_id.nil?
|
753
706
|
command.query['fields'] = fields unless fields.nil?
|
754
707
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
755
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
756
708
|
execute_or_queue_command(command, &block)
|
757
709
|
end
|
758
710
|
|
@@ -774,10 +726,8 @@ module Google
|
|
774
726
|
# @param [String] fields
|
775
727
|
# Selector specifying which fields to include in a partial response.
|
776
728
|
# @param [String] quota_user
|
777
|
-
#
|
778
|
-
# characters.
|
779
|
-
# @param [String] user_ip
|
780
|
-
# Deprecated. Please use quotaUser instead.
|
729
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
730
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
781
731
|
# @param [Google::Apis::RequestOptions] options
|
782
732
|
# Request-specific options
|
783
733
|
#
|
@@ -790,7 +740,7 @@ module Google
|
|
790
740
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
791
741
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
792
742
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
793
|
-
def list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil,
|
743
|
+
def list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, options: nil, &block)
|
794
744
|
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
795
745
|
command.response_representation = Google::Apis::DriveV2::CommentList::Representation
|
796
746
|
command.response_class = Google::Apis::DriveV2::CommentList
|
@@ -801,7 +751,6 @@ module Google
|
|
801
751
|
command.query['updatedMin'] = updated_min unless updated_min.nil?
|
802
752
|
command.query['fields'] = fields unless fields.nil?
|
803
753
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
804
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
805
754
|
execute_or_queue_command(command, &block)
|
806
755
|
end
|
807
756
|
|
@@ -814,10 +763,8 @@ module Google
|
|
814
763
|
# @param [String] fields
|
815
764
|
# Selector specifying which fields to include in a partial response.
|
816
765
|
# @param [String] quota_user
|
817
|
-
#
|
818
|
-
# characters.
|
819
|
-
# @param [String] user_ip
|
820
|
-
# Deprecated. Please use quotaUser instead.
|
766
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
767
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
821
768
|
# @param [Google::Apis::RequestOptions] options
|
822
769
|
# Request-specific options
|
823
770
|
#
|
@@ -830,7 +777,7 @@ module Google
|
|
830
777
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
831
778
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
832
779
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
833
|
-
def patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil,
|
780
|
+
def patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
834
781
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
835
782
|
command.request_representation = Google::Apis::DriveV2::Comment::Representation
|
836
783
|
command.request_object = comment_object
|
@@ -840,7 +787,6 @@ module Google
|
|
840
787
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
841
788
|
command.query['fields'] = fields unless fields.nil?
|
842
789
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
843
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
844
790
|
execute_or_queue_command(command, &block)
|
845
791
|
end
|
846
792
|
|
@@ -853,10 +799,8 @@ module Google
|
|
853
799
|
# @param [String] fields
|
854
800
|
# Selector specifying which fields to include in a partial response.
|
855
801
|
# @param [String] quota_user
|
856
|
-
#
|
857
|
-
# characters.
|
858
|
-
# @param [String] user_ip
|
859
|
-
# Deprecated. Please use quotaUser instead.
|
802
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
803
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
860
804
|
# @param [Google::Apis::RequestOptions] options
|
861
805
|
# Request-specific options
|
862
806
|
#
|
@@ -869,7 +813,7 @@ module Google
|
|
869
813
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
870
814
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
871
815
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
872
|
-
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil,
|
816
|
+
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
873
817
|
command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}', options)
|
874
818
|
command.request_representation = Google::Apis::DriveV2::Comment::Representation
|
875
819
|
command.request_object = comment_object
|
@@ -879,7 +823,6 @@ module Google
|
|
879
823
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
880
824
|
command.query['fields'] = fields unless fields.nil?
|
881
825
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
882
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
883
826
|
execute_or_queue_command(command, &block)
|
884
827
|
end
|
885
828
|
|
@@ -889,7 +832,7 @@ module Google
|
|
889
832
|
# The ID of the shared drive.
|
890
833
|
# @param [Boolean] allow_item_deletion
|
891
834
|
# Whether any items inside the shared drive should also be deleted. This option
|
892
|
-
# is only supported when useDomainAdminAccess is also set to true
|
835
|
+
# is only supported when `useDomainAdminAccess` is also set to `true`.
|
893
836
|
# @param [Boolean] use_domain_admin_access
|
894
837
|
# Issue the request as a domain administrator; if set to true, then the
|
895
838
|
# requester will be granted access if they are an administrator of the domain to
|
@@ -897,10 +840,8 @@ module Google
|
|
897
840
|
# @param [String] fields
|
898
841
|
# Selector specifying which fields to include in a partial response.
|
899
842
|
# @param [String] quota_user
|
900
|
-
#
|
901
|
-
# characters.
|
902
|
-
# @param [String] user_ip
|
903
|
-
# Deprecated. Please use quotaUser instead.
|
843
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
844
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
904
845
|
# @param [Google::Apis::RequestOptions] options
|
905
846
|
# Request-specific options
|
906
847
|
#
|
@@ -913,14 +854,13 @@ module Google
|
|
913
854
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
914
855
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
915
856
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
916
|
-
def delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
857
|
+
def delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
917
858
|
command = make_simple_command(:delete, 'drives/{driveId}', options)
|
918
859
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
919
860
|
command.query['allowItemDeletion'] = allow_item_deletion unless allow_item_deletion.nil?
|
920
861
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
921
862
|
command.query['fields'] = fields unless fields.nil?
|
922
863
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
923
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
924
864
|
execute_or_queue_command(command, &block)
|
925
865
|
end
|
926
866
|
|
@@ -934,10 +874,8 @@ module Google
|
|
934
874
|
# @param [String] fields
|
935
875
|
# Selector specifying which fields to include in a partial response.
|
936
876
|
# @param [String] quota_user
|
937
|
-
#
|
938
|
-
# characters.
|
939
|
-
# @param [String] user_ip
|
940
|
-
# Deprecated. Please use quotaUser instead.
|
877
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
878
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
941
879
|
# @param [Google::Apis::RequestOptions] options
|
942
880
|
# Request-specific options
|
943
881
|
#
|
@@ -950,7 +888,7 @@ module Google
|
|
950
888
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
951
889
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
952
890
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
953
|
-
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
891
|
+
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
954
892
|
command = make_simple_command(:get, 'drives/{driveId}', options)
|
955
893
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
956
894
|
command.response_class = Google::Apis::DriveV2::Drive
|
@@ -958,7 +896,6 @@ module Google
|
|
958
896
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
959
897
|
command.query['fields'] = fields unless fields.nil?
|
960
898
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
961
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
962
899
|
execute_or_queue_command(command, &block)
|
963
900
|
end
|
964
901
|
|
@@ -968,10 +905,8 @@ module Google
|
|
968
905
|
# @param [String] fields
|
969
906
|
# Selector specifying which fields to include in a partial response.
|
970
907
|
# @param [String] quota_user
|
971
|
-
#
|
972
|
-
# characters.
|
973
|
-
# @param [String] user_ip
|
974
|
-
# Deprecated. Please use quotaUser instead.
|
908
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
909
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
975
910
|
# @param [Google::Apis::RequestOptions] options
|
976
911
|
# Request-specific options
|
977
912
|
#
|
@@ -984,32 +919,29 @@ module Google
|
|
984
919
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
985
920
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
986
921
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
987
|
-
def hide_drive(drive_id, fields: nil, quota_user: nil,
|
922
|
+
def hide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
988
923
|
command = make_simple_command(:post, 'drives/{driveId}/hide', options)
|
989
924
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
990
925
|
command.response_class = Google::Apis::DriveV2::Drive
|
991
926
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
992
927
|
command.query['fields'] = fields unless fields.nil?
|
993
928
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
994
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
995
929
|
execute_or_queue_command(command, &block)
|
996
930
|
end
|
997
931
|
|
998
932
|
# Creates a new shared drive.
|
999
933
|
# @param [String] request_id
|
1000
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
1001
|
-
# for idempotent creation of a shared drive. A repeated request by the
|
1002
|
-
# and with the same request ID will avoid creating duplicates by
|
1003
|
-
# create the same shared drive. If the shared drive already exists
|
1004
|
-
# will be returned.
|
934
|
+
# Required. An ID, such as a random UUID, which uniquely identifies this user's
|
935
|
+
# request for idempotent creation of a shared drive. A repeated request by the
|
936
|
+
# same user and with the same request ID will avoid creating duplicates by
|
937
|
+
# attempting to create the same shared drive. If the shared drive already exists
|
938
|
+
# a 409 error will be returned.
|
1005
939
|
# @param [Google::Apis::DriveV2::Drive] drive_object
|
1006
940
|
# @param [String] fields
|
1007
941
|
# Selector specifying which fields to include in a partial response.
|
1008
942
|
# @param [String] quota_user
|
1009
|
-
#
|
1010
|
-
# characters.
|
1011
|
-
# @param [String] user_ip
|
1012
|
-
# Deprecated. Please use quotaUser instead.
|
943
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
944
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1013
945
|
# @param [Google::Apis::RequestOptions] options
|
1014
946
|
# Request-specific options
|
1015
947
|
#
|
@@ -1022,7 +954,7 @@ module Google
|
|
1022
954
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1023
955
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1024
956
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1025
|
-
def insert_drive(request_id, drive_object = nil, fields: nil, quota_user: nil,
|
957
|
+
def insert_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1026
958
|
command = make_simple_command(:post, 'drives', options)
|
1027
959
|
command.request_representation = Google::Apis::DriveV2::Drive::Representation
|
1028
960
|
command.request_object = drive_object
|
@@ -1031,11 +963,13 @@ module Google
|
|
1031
963
|
command.query['requestId'] = request_id unless request_id.nil?
|
1032
964
|
command.query['fields'] = fields unless fields.nil?
|
1033
965
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1034
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1035
966
|
execute_or_queue_command(command, &block)
|
1036
967
|
end
|
1037
968
|
|
1038
|
-
# Lists the user's shared drives.
|
969
|
+
# Lists the user's shared drives. This method accepts the `q` parameter, which
|
970
|
+
# is a search query combining one or more search terms. For more information,
|
971
|
+
# see the [Search for shared drives](/drive/api/guides/search-shareddrives)
|
972
|
+
# guide.
|
1039
973
|
# @param [Fixnum] max_results
|
1040
974
|
# Maximum number of shared drives to return per page.
|
1041
975
|
# @param [String] page_token
|
@@ -1048,10 +982,8 @@ module Google
|
|
1048
982
|
# @param [String] fields
|
1049
983
|
# Selector specifying which fields to include in a partial response.
|
1050
984
|
# @param [String] quota_user
|
1051
|
-
#
|
1052
|
-
# characters.
|
1053
|
-
# @param [String] user_ip
|
1054
|
-
# Deprecated. Please use quotaUser instead.
|
985
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
986
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1055
987
|
# @param [Google::Apis::RequestOptions] options
|
1056
988
|
# Request-specific options
|
1057
989
|
#
|
@@ -1064,7 +996,7 @@ module Google
|
|
1064
996
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1065
997
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1066
998
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1067
|
-
def list_drives(max_results: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
999
|
+
def list_drives(max_results: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1068
1000
|
command = make_simple_command(:get, 'drives', options)
|
1069
1001
|
command.response_representation = Google::Apis::DriveV2::DriveList::Representation
|
1070
1002
|
command.response_class = Google::Apis::DriveV2::DriveList
|
@@ -1074,7 +1006,6 @@ module Google
|
|
1074
1006
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1075
1007
|
command.query['fields'] = fields unless fields.nil?
|
1076
1008
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1077
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1078
1009
|
execute_or_queue_command(command, &block)
|
1079
1010
|
end
|
1080
1011
|
|
@@ -1084,10 +1015,8 @@ module Google
|
|
1084
1015
|
# @param [String] fields
|
1085
1016
|
# Selector specifying which fields to include in a partial response.
|
1086
1017
|
# @param [String] quota_user
|
1087
|
-
#
|
1088
|
-
# characters.
|
1089
|
-
# @param [String] user_ip
|
1090
|
-
# Deprecated. Please use quotaUser instead.
|
1018
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1019
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1091
1020
|
# @param [Google::Apis::RequestOptions] options
|
1092
1021
|
# Request-specific options
|
1093
1022
|
#
|
@@ -1100,14 +1029,13 @@ module Google
|
|
1100
1029
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1101
1030
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1102
1031
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1103
|
-
def unhide_drive(drive_id, fields: nil, quota_user: nil,
|
1032
|
+
def unhide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
1104
1033
|
command = make_simple_command(:post, 'drives/{driveId}/unhide', options)
|
1105
1034
|
command.response_representation = Google::Apis::DriveV2::Drive::Representation
|
1106
1035
|
command.response_class = Google::Apis::DriveV2::Drive
|
1107
1036
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
1108
1037
|
command.query['fields'] = fields unless fields.nil?
|
1109
1038
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1110
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1111
1039
|
execute_or_queue_command(command, &block)
|
1112
1040
|
end
|
1113
1041
|
|
@@ -1122,10 +1050,8 @@ module Google
|
|
1122
1050
|
# @param [String] fields
|
1123
1051
|
# Selector specifying which fields to include in a partial response.
|
1124
1052
|
# @param [String] quota_user
|
1125
|
-
#
|
1126
|
-
# characters.
|
1127
|
-
# @param [String] user_ip
|
1128
|
-
# Deprecated. Please use quotaUser instead.
|
1053
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1054
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1129
1055
|
# @param [Google::Apis::RequestOptions] options
|
1130
1056
|
# Request-specific options
|
1131
1057
|
#
|
@@ -1138,7 +1064,7 @@ module Google
|
|
1138
1064
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1139
1065
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1140
1066
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1141
|
-
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1067
|
+
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1142
1068
|
command = make_simple_command(:put, 'drives/{driveId}', options)
|
1143
1069
|
command.request_representation = Google::Apis::DriveV2::Drive::Representation
|
1144
1070
|
command.request_object = drive_object
|
@@ -1148,36 +1074,35 @@ module Google
|
|
1148
1074
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1149
1075
|
command.query['fields'] = fields unless fields.nil?
|
1150
1076
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1151
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1152
1077
|
execute_or_queue_command(command, &block)
|
1153
1078
|
end
|
1154
1079
|
|
1155
|
-
# Creates a copy of the specified file.
|
1080
|
+
# Creates a copy of the specified file.
|
1156
1081
|
# @param [String] file_id
|
1157
1082
|
# The ID of the file to copy.
|
1158
1083
|
# @param [Google::Apis::DriveV2::File] file_object
|
1159
1084
|
# @param [Boolean] convert
|
1160
1085
|
# Whether to convert this file to the corresponding Docs Editors format.
|
1161
1086
|
# @param [Boolean] enforce_single_parent
|
1162
|
-
# Deprecated
|
1087
|
+
# Deprecated: Copying files into multiple folders is no longer supported. Use
|
1163
1088
|
# shortcuts instead.
|
1164
1089
|
# @param [String] include_labels
|
1165
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1090
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1166
1091
|
# the response.
|
1167
1092
|
# @param [String] include_permissions_for_view
|
1168
1093
|
# Specifies which additional view's permissions to include in the response. Only
|
1169
|
-
#
|
1094
|
+
# `published` is supported.
|
1170
1095
|
# @param [Boolean] ocr
|
1171
1096
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
1172
1097
|
# @param [String] ocr_language
|
1173
|
-
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
1098
|
+
# If `ocr` is true, hints at the language to use. Valid values are BCP 47 codes.
|
1174
1099
|
# @param [Boolean] pinned
|
1175
1100
|
# Whether to pin the head revision of the new copy. A file can have a maximum of
|
1176
1101
|
# 200 pinned revisions.
|
1177
1102
|
# @param [Boolean] supports_all_drives
|
1178
1103
|
# Whether the requesting application supports both My Drives and shared drives.
|
1179
1104
|
# @param [Boolean] supports_team_drives
|
1180
|
-
# Deprecated
|
1105
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1181
1106
|
# @param [String] timed_text_language
|
1182
1107
|
# The language of the timed text.
|
1183
1108
|
# @param [String] timed_text_track_name
|
@@ -1188,10 +1113,8 @@ module Google
|
|
1188
1113
|
# @param [String] fields
|
1189
1114
|
# Selector specifying which fields to include in a partial response.
|
1190
1115
|
# @param [String] quota_user
|
1191
|
-
#
|
1192
|
-
# characters.
|
1193
|
-
# @param [String] user_ip
|
1194
|
-
# Deprecated. Please use quotaUser instead.
|
1116
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1117
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1195
1118
|
# @param [Google::Apis::RequestOptions] options
|
1196
1119
|
# Request-specific options
|
1197
1120
|
#
|
@@ -1204,7 +1127,7 @@ module Google
|
|
1204
1127
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1205
1128
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1206
1129
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1207
|
-
def copy_file(file_id, file_object = nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil,
|
1130
|
+
def copy_file(file_id, file_object = nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1208
1131
|
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
1209
1132
|
command.request_representation = Google::Apis::DriveV2::File::Representation
|
1210
1133
|
command.request_object = file_object
|
@@ -1225,7 +1148,6 @@ module Google
|
|
1225
1148
|
command.query['visibility'] = visibility unless visibility.nil?
|
1226
1149
|
command.query['fields'] = fields unless fields.nil?
|
1227
1150
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1228
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1229
1151
|
execute_or_queue_command(command, &block)
|
1230
1152
|
end
|
1231
1153
|
|
@@ -1234,19 +1156,17 @@ module Google
|
|
1234
1156
|
# @param [String] file_id
|
1235
1157
|
# The ID of the file to delete.
|
1236
1158
|
# @param [Boolean] enforce_single_parent
|
1237
|
-
# Deprecated
|
1238
|
-
# but the item itself is not, the item
|
1159
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
1160
|
+
# but the item itself is not, the item is placed under its owner's root.
|
1239
1161
|
# @param [Boolean] supports_all_drives
|
1240
1162
|
# Whether the requesting application supports both My Drives and shared drives.
|
1241
1163
|
# @param [Boolean] supports_team_drives
|
1242
|
-
# Deprecated
|
1164
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1243
1165
|
# @param [String] fields
|
1244
1166
|
# Selector specifying which fields to include in a partial response.
|
1245
1167
|
# @param [String] quota_user
|
1246
|
-
#
|
1247
|
-
# characters.
|
1248
|
-
# @param [String] user_ip
|
1249
|
-
# 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.
|
1250
1170
|
# @param [Google::Apis::RequestOptions] options
|
1251
1171
|
# Request-specific options
|
1252
1172
|
#
|
@@ -1259,7 +1179,7 @@ module Google
|
|
1259
1179
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1260
1180
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1261
1181
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1262
|
-
def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1182
|
+
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)
|
1263
1183
|
command = make_simple_command(:delete, 'files/{fileId}', options)
|
1264
1184
|
command.params['fileId'] = file_id unless file_id.nil?
|
1265
1185
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
@@ -1267,23 +1187,20 @@ module Google
|
|
1267
1187
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1268
1188
|
command.query['fields'] = fields unless fields.nil?
|
1269
1189
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1270
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1271
1190
|
execute_or_queue_command(command, &block)
|
1272
1191
|
end
|
1273
1192
|
|
1274
|
-
# Permanently deletes all
|
1193
|
+
# Permanently deletes all of the user's trashed files.
|
1275
1194
|
# @param [String] drive_id
|
1276
1195
|
# If set, empties the trash of the provided shared drive.
|
1277
1196
|
# @param [Boolean] enforce_single_parent
|
1278
|
-
# Deprecated
|
1279
|
-
# but the item itself is not, the item
|
1197
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
1198
|
+
# but the item itself is not, the item is placed under its owner's root.
|
1280
1199
|
# @param [String] fields
|
1281
1200
|
# Selector specifying which fields to include in a partial response.
|
1282
1201
|
# @param [String] quota_user
|
1283
|
-
#
|
1284
|
-
# characters.
|
1285
|
-
# @param [String] user_ip
|
1286
|
-
# Deprecated. Please use quotaUser instead.
|
1202
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1203
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1287
1204
|
# @param [Google::Apis::RequestOptions] options
|
1288
1205
|
# Request-specific options
|
1289
1206
|
#
|
@@ -1296,13 +1213,12 @@ module Google
|
|
1296
1213
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1297
1214
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1298
1215
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1299
|
-
def empty_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil,
|
1216
|
+
def empty_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1300
1217
|
command = make_simple_command(:delete, 'files/trash', options)
|
1301
1218
|
command.query['driveId'] = drive_id unless drive_id.nil?
|
1302
1219
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
1303
1220
|
command.query['fields'] = fields unless fields.nil?
|
1304
1221
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1305
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1306
1222
|
execute_or_queue_command(command, &block)
|
1307
1223
|
end
|
1308
1224
|
|
@@ -1311,14 +1227,12 @@ module Google
|
|
1311
1227
|
# @param [String] file_id
|
1312
1228
|
# The ID of the file.
|
1313
1229
|
# @param [String] mime_type
|
1314
|
-
# The MIME type of the format requested for this export.
|
1230
|
+
# Required. The MIME type of the format requested for this export.
|
1315
1231
|
# @param [String] fields
|
1316
1232
|
# Selector specifying which fields to include in a partial response.
|
1317
1233
|
# @param [String] quota_user
|
1318
|
-
#
|
1319
|
-
# characters.
|
1320
|
-
# @param [String] user_ip
|
1321
|
-
# Deprecated. Please use quotaUser instead.
|
1234
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1235
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1322
1236
|
# @param [IO, String] download_dest
|
1323
1237
|
# IO stream or filename to receive content download
|
1324
1238
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1333,7 +1247,7 @@ module Google
|
|
1333
1247
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1334
1248
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1335
1249
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1336
|
-
def export_file(file_id, mime_type, fields: nil, quota_user: nil,
|
1250
|
+
def export_file(file_id, mime_type, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
1337
1251
|
if download_dest.nil?
|
1338
1252
|
command = make_simple_command(:get, 'files/{fileId}/export', options)
|
1339
1253
|
else
|
@@ -1344,7 +1258,6 @@ module Google
|
|
1344
1258
|
command.query['mimeType'] = mime_type unless mime_type.nil?
|
1345
1259
|
command.query['fields'] = fields unless fields.nil?
|
1346
1260
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1347
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1348
1261
|
execute_or_queue_command(command, &block)
|
1349
1262
|
end
|
1350
1263
|
|
@@ -1353,18 +1266,16 @@ module Google
|
|
1353
1266
|
# Maximum number of IDs to return.
|
1354
1267
|
# @param [String] space
|
1355
1268
|
# The space in which the IDs can be used to create new files. Supported values
|
1356
|
-
# are
|
1269
|
+
# are `drive` and `appDataFolder`. (Default: `drive`)
|
1357
1270
|
# @param [String] type
|
1358
|
-
# The type of items which the IDs can be used for. Supported values are
|
1359
|
-
# and
|
1360
|
-
# (Default:
|
1271
|
+
# The type of items which the IDs can be used for. Supported values are `files`
|
1272
|
+
# and `shortcuts`. Note that `shortcuts` are only supported in the `drive` `
|
1273
|
+
# space`. (Default: `files`)
|
1361
1274
|
# @param [String] fields
|
1362
1275
|
# Selector specifying which fields to include in a partial response.
|
1363
1276
|
# @param [String] quota_user
|
1364
|
-
#
|
1365
|
-
# characters.
|
1366
|
-
# @param [String] user_ip
|
1367
|
-
# Deprecated. Please use quotaUser instead.
|
1277
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1278
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1368
1279
|
# @param [Google::Apis::RequestOptions] options
|
1369
1280
|
# Request-specific options
|
1370
1281
|
#
|
@@ -1377,7 +1288,7 @@ module Google
|
|
1377
1288
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1378
1289
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1379
1290
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1380
|
-
def generate_file_ids(max_results: nil, space: nil, type: nil, fields: nil, quota_user: nil,
|
1291
|
+
def generate_file_ids(max_results: nil, space: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1381
1292
|
command = make_simple_command(:get, 'files/generateIds', options)
|
1382
1293
|
command.response_representation = Google::Apis::DriveV2::GeneratedIds::Representation
|
1383
1294
|
command.response_class = Google::Apis::DriveV2::GeneratedIds
|
@@ -1386,41 +1297,43 @@ module Google
|
|
1386
1297
|
command.query['type'] = type unless type.nil?
|
1387
1298
|
command.query['fields'] = fields unless fields.nil?
|
1388
1299
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1389
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1390
1300
|
execute_or_queue_command(command, &block)
|
1391
1301
|
end
|
1392
1302
|
|
1393
|
-
# Gets a file's metadata or content by ID.
|
1303
|
+
# Gets a file's metadata or content by ID. If you provide the URL parameter `
|
1304
|
+
# alt=media`, then the response includes the file contents in the response body.
|
1305
|
+
# Downloading content with `alt=media` only works if the file is stored in Drive.
|
1306
|
+
# To download Google Docs, Sheets, and Slides use [`files.export`](/drive/api/
|
1307
|
+
# reference/rest/v2/files/export) instead. For more information, see [Download &
|
1308
|
+
# export files](/drive/api/guides/manage-downloads).
|
1394
1309
|
# @param [String] file_id
|
1395
1310
|
# The ID for the file in question.
|
1396
1311
|
# @param [Boolean] acknowledge_abuse
|
1397
1312
|
# Whether the user is acknowledging the risk of downloading known malware or
|
1398
1313
|
# other abusive files.
|
1399
1314
|
# @param [String] include_labels
|
1400
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1315
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1401
1316
|
# the response.
|
1402
1317
|
# @param [String] include_permissions_for_view
|
1403
1318
|
# Specifies which additional view's permissions to include in the response. Only
|
1404
|
-
#
|
1319
|
+
# `published` is supported.
|
1405
1320
|
# @param [String] projection
|
1406
|
-
# This parameter
|
1321
|
+
# Deprecated: This parameter has no function.
|
1407
1322
|
# @param [String] revision_id
|
1408
1323
|
# Specifies the Revision ID that should be downloaded. Ignored unless alt=media
|
1409
1324
|
# is specified.
|
1410
1325
|
# @param [Boolean] supports_all_drives
|
1411
1326
|
# Whether the requesting application supports both My Drives and shared drives.
|
1412
1327
|
# @param [Boolean] supports_team_drives
|
1413
|
-
# Deprecated
|
1328
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1414
1329
|
# @param [Boolean] update_viewed_date
|
1415
|
-
# Deprecated: Use files.update with modifiedDateBehavior=noChange,
|
1416
|
-
# updateViewedDate=true and an empty request body.
|
1330
|
+
# Deprecated: Use `files.update` with `modifiedDateBehavior=noChange,
|
1331
|
+
# updateViewedDate=true` and an empty request body.
|
1417
1332
|
# @param [String] fields
|
1418
1333
|
# Selector specifying which fields to include in a partial response.
|
1419
1334
|
# @param [String] quota_user
|
1420
|
-
#
|
1421
|
-
# characters.
|
1422
|
-
# @param [String] user_ip
|
1423
|
-
# Deprecated. Please use quotaUser instead.
|
1335
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1336
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1424
1337
|
# @param [IO, String] download_dest
|
1425
1338
|
# IO stream or filename to receive content download
|
1426
1339
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1435,7 +1348,7 @@ module Google
|
|
1435
1348
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1436
1349
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1437
1350
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1438
|
-
def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil,
|
1351
|
+
def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
1439
1352
|
if download_dest.nil?
|
1440
1353
|
command = make_simple_command(:get, 'files/{fileId}', options)
|
1441
1354
|
else
|
@@ -1455,22 +1368,37 @@ module Google
|
|
1455
1368
|
command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
|
1456
1369
|
command.query['fields'] = fields unless fields.nil?
|
1457
1370
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1458
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1459
1371
|
execute_or_queue_command(command, &block)
|
1460
1372
|
end
|
1461
1373
|
|
1462
|
-
#
|
1374
|
+
# Inserts a new file. This method supports an */upload* URI and accepts
|
1375
|
+
# uploaded media with the following characteristics: - *Maximum file size:* 5,
|
1376
|
+
# 120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type,
|
1377
|
+
# rather than the literal `*/*` value. The literal `*/*` is only used to
|
1378
|
+
# indicate that any valid MIME type can be uploaded. For more information on
|
1379
|
+
# uploading files, see [Upload file data](/drive/api/guides/manage-uploads).
|
1380
|
+
# Apps creating shortcuts with `files.insert` must specify the MIME type `
|
1381
|
+
# application/vnd.google-apps.shortcut`. Apps should specify a file extension in
|
1382
|
+
# the `title` property when inserting files with the API. For example, an
|
1383
|
+
# operation to insert a JPEG file should specify something like `"title": "cat.
|
1384
|
+
# jpg"` in the metadata. Subsequent `GET` requests include the read-only `
|
1385
|
+
# fileExtension` property populated with the extension originally specified in
|
1386
|
+
# the `title` property. When a Google Drive user requests to download a file, or
|
1387
|
+
# when the file is downloaded through the sync client, Drive builds a full
|
1388
|
+
# filename (with extension) based on the title. In cases where the extension is
|
1389
|
+
# missing, Drive attempts to determine the extension based on the file's MIME
|
1390
|
+
# type.
|
1463
1391
|
# @param [Google::Apis::DriveV2::File] file_object
|
1464
1392
|
# @param [Boolean] convert
|
1465
1393
|
# Whether to convert this file to the corresponding Docs Editors format.
|
1466
1394
|
# @param [Boolean] enforce_single_parent
|
1467
|
-
# Deprecated
|
1395
|
+
# Deprecated: Creating files in multiple folders is no longer supported.
|
1468
1396
|
# @param [String] include_labels
|
1469
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1397
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1470
1398
|
# the response.
|
1471
1399
|
# @param [String] include_permissions_for_view
|
1472
1400
|
# Specifies which additional view's permissions to include in the response. Only
|
1473
|
-
#
|
1401
|
+
# `published` is supported.
|
1474
1402
|
# @param [Boolean] ocr
|
1475
1403
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
1476
1404
|
# @param [String] ocr_language
|
@@ -1481,7 +1409,7 @@ module Google
|
|
1481
1409
|
# @param [Boolean] supports_all_drives
|
1482
1410
|
# Whether the requesting application supports both My Drives and shared drives.
|
1483
1411
|
# @param [Boolean] supports_team_drives
|
1484
|
-
# Deprecated
|
1412
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1485
1413
|
# @param [String] timed_text_language
|
1486
1414
|
# The language of the timed text.
|
1487
1415
|
# @param [String] timed_text_track_name
|
@@ -1494,10 +1422,8 @@ module Google
|
|
1494
1422
|
# @param [String] fields
|
1495
1423
|
# Selector specifying which fields to include in a partial response.
|
1496
1424
|
# @param [String] quota_user
|
1497
|
-
#
|
1498
|
-
# characters.
|
1499
|
-
# @param [String] user_ip
|
1500
|
-
# Deprecated. Please use quotaUser instead.
|
1425
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1426
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1501
1427
|
# @param [IO, String] upload_source
|
1502
1428
|
# IO stream or filename containing content to upload
|
1503
1429
|
# @param [String] content_type
|
@@ -1514,7 +1440,7 @@ module Google
|
|
1514
1440
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1515
1441
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1516
1442
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1517
|
-
def insert_file(file_object = nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil,
|
1443
|
+
def insert_file(file_object = nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
1518
1444
|
if upload_source.nil?
|
1519
1445
|
command = make_simple_command(:post, 'files', options)
|
1520
1446
|
else
|
@@ -1541,66 +1467,65 @@ module Google
|
|
1541
1467
|
command.query['visibility'] = visibility unless visibility.nil?
|
1542
1468
|
command.query['fields'] = fields unless fields.nil?
|
1543
1469
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1544
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1545
1470
|
execute_or_queue_command(command, &block)
|
1546
1471
|
end
|
1547
1472
|
|
1548
|
-
# Lists the user's files.
|
1473
|
+
# Lists the user's files. This method accepts the `q` parameter, which is a
|
1474
|
+
# search query combining one or more search terms. For more information, see the
|
1475
|
+
# [Search for files & folders](/drive/api/guides/search-files) guide. *Note:*
|
1476
|
+
# This method returns *all* files by default, including trashed files. If you
|
1477
|
+
# don't want trashed files to appear in the list, use the `trashed=false` query
|
1478
|
+
# parameter to remove trashed files from the results.
|
1549
1479
|
# @param [String] corpora
|
1550
|
-
#
|
1551
|
-
#
|
1552
|
-
#
|
1553
|
-
# files shared to the user's domain), and 'allDrives' (A combination of 'user'
|
1554
|
-
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
1555
|
-
# or 'drive', instead of 'allDrives', for efficiency.
|
1480
|
+
# Bodies of items (files/documents) to which the query applies. Supported bodies
|
1481
|
+
# are `default`, `domain`, `drive` and `allDrives`. Prefer `default` or `drive`
|
1482
|
+
# to `allDrives` for efficiency.
|
1556
1483
|
# @param [String] corpus
|
1557
|
-
# The body of items (files/documents) to which the query applies.
|
1558
|
-
#
|
1484
|
+
# Deprecated: The body of items (files/documents) to which the query applies.
|
1485
|
+
# Use `corpora` instead.
|
1559
1486
|
# @param [String] drive_id
|
1560
1487
|
# ID of the shared drive to search.
|
1561
1488
|
# @param [Boolean] include_items_from_all_drives
|
1562
1489
|
# Whether both My Drive and shared drive items should be included in results.
|
1563
1490
|
# @param [String] include_labels
|
1564
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1491
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1565
1492
|
# the response.
|
1566
1493
|
# @param [String] include_permissions_for_view
|
1567
1494
|
# Specifies which additional view's permissions to include in the response. Only
|
1568
|
-
#
|
1495
|
+
# `published` is supported.
|
1569
1496
|
# @param [Boolean] include_team_drive_items
|
1570
|
-
# Deprecated
|
1497
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
1571
1498
|
# @param [Fixnum] max_results
|
1572
1499
|
# The maximum number of files to return per page. Partial or empty result pages
|
1573
1500
|
# are possible even before the end of the files list has been reached.
|
1574
1501
|
# @param [String] order_by
|
1575
|
-
# A comma-separated list of sort keys. Valid keys are
|
1576
|
-
# lastViewedByMeDate
|
1577
|
-
# recency
|
1578
|
-
# key sorts ascending by default, but may be reversed with the
|
1502
|
+
# A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, `
|
1503
|
+
# lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `
|
1504
|
+
# recency`, `sharedWithMeDate`, `starred`, `title`, and `title_natural`. Each
|
1505
|
+
# key sorts ascending by default, but may be reversed with the `desc` modifier.
|
1579
1506
|
# Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there
|
1580
1507
|
# is a current limitation for users with approximately one million files in
|
1581
1508
|
# which the requested sort order is ignored.
|
1582
1509
|
# @param [String] page_token
|
1583
1510
|
# Page token for files.
|
1584
1511
|
# @param [String] projection
|
1585
|
-
# This parameter
|
1512
|
+
# Deprecated: This parameter has no function.
|
1586
1513
|
# @param [String] q
|
1587
1514
|
# Query string for searching files.
|
1588
1515
|
# @param [String] spaces
|
1589
|
-
# A comma-separated list of spaces to query. Supported values are
|
1590
|
-
# appDataFolder
|
1516
|
+
# A comma-separated list of spaces to query. Supported values are `drive`, and `
|
1517
|
+
# appDataFolder`.
|
1591
1518
|
# @param [Boolean] supports_all_drives
|
1592
1519
|
# Whether the requesting application supports both My Drives and shared drives.
|
1593
1520
|
# @param [Boolean] supports_team_drives
|
1594
|
-
# Deprecated
|
1521
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1595
1522
|
# @param [String] team_drive_id
|
1596
|
-
# Deprecated
|
1523
|
+
# Deprecated: Use `driveId` instead.
|
1597
1524
|
# @param [String] fields
|
1598
1525
|
# Selector specifying which fields to include in a partial response.
|
1599
1526
|
# @param [String] quota_user
|
1600
|
-
#
|
1601
|
-
# characters.
|
1602
|
-
# @param [String] user_ip
|
1603
|
-
# Deprecated. Please use quotaUser instead.
|
1527
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1528
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1604
1529
|
# @param [Google::Apis::RequestOptions] options
|
1605
1530
|
# Request-specific options
|
1606
1531
|
#
|
@@ -1613,7 +1538,7 @@ module Google
|
|
1613
1538
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1614
1539
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1615
1540
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1616
|
-
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, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
1541
|
+
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, max_results: nil, order_by: nil, page_token: nil, projection: 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)
|
1617
1542
|
command = make_simple_command(:get, 'files', options)
|
1618
1543
|
command.response_representation = Google::Apis::DriveV2::FileList::Representation
|
1619
1544
|
command.response_class = Google::Apis::DriveV2::FileList
|
@@ -1635,26 +1560,22 @@ module Google
|
|
1635
1560
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
1636
1561
|
command.query['fields'] = fields unless fields.nil?
|
1637
1562
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1638
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1639
1563
|
execute_or_queue_command(command, &block)
|
1640
1564
|
end
|
1641
1565
|
|
1642
1566
|
# Lists the labels on a file.
|
1643
1567
|
# @param [String] file_id
|
1644
|
-
# The ID
|
1568
|
+
# The ID for the file or shared drive.
|
1645
1569
|
# @param [Fixnum] max_results
|
1646
|
-
# The maximum number of labels to return per page. When not set,
|
1647
|
-
# to 100.
|
1570
|
+
# The maximum number of labels to return per page. When not set, defaults to 100.
|
1648
1571
|
# @param [String] page_token
|
1649
1572
|
# The token for continuing a previous list request on the next page. This should
|
1650
|
-
# be set to the value of
|
1573
|
+
# be set to the value of `nextPageToken` from the previous response.
|
1651
1574
|
# @param [String] fields
|
1652
1575
|
# Selector specifying which fields to include in a partial response.
|
1653
1576
|
# @param [String] quota_user
|
1654
|
-
#
|
1655
|
-
# characters.
|
1656
|
-
# @param [String] user_ip
|
1657
|
-
# Deprecated. Please use quotaUser instead.
|
1577
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1578
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1658
1579
|
# @param [Google::Apis::RequestOptions] options
|
1659
1580
|
# Request-specific options
|
1660
1581
|
#
|
@@ -1667,7 +1588,7 @@ module Google
|
|
1667
1588
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1668
1589
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1669
1590
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1670
|
-
def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil,
|
1591
|
+
def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1671
1592
|
command = make_simple_command(:get, 'files/{fileId}/listLabels', options)
|
1672
1593
|
command.response_representation = Google::Apis::DriveV2::LabelList::Representation
|
1673
1594
|
command.response_class = Google::Apis::DriveV2::LabelList
|
@@ -1676,21 +1597,19 @@ module Google
|
|
1676
1597
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1677
1598
|
command.query['fields'] = fields unless fields.nil?
|
1678
1599
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1679
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1680
1600
|
execute_or_queue_command(command, &block)
|
1681
1601
|
end
|
1682
1602
|
|
1683
|
-
# Modifies the set of labels
|
1603
|
+
# Modifies the set of labels applied to a file. Returns a list of the labels
|
1604
|
+
# that were added or modified.
|
1684
1605
|
# @param [String] file_id
|
1685
|
-
# The ID of the file
|
1606
|
+
# The ID of the file to which the labels belong.
|
1686
1607
|
# @param [Google::Apis::DriveV2::ModifyLabelsRequest] modify_labels_request_object
|
1687
1608
|
# @param [String] fields
|
1688
1609
|
# Selector specifying which fields to include in a partial response.
|
1689
1610
|
# @param [String] quota_user
|
1690
|
-
#
|
1691
|
-
# characters.
|
1692
|
-
# @param [String] user_ip
|
1693
|
-
# Deprecated. Please use quotaUser instead.
|
1611
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1612
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1694
1613
|
# @param [Google::Apis::RequestOptions] options
|
1695
1614
|
# Request-specific options
|
1696
1615
|
#
|
@@ -1703,7 +1622,7 @@ module Google
|
|
1703
1622
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1704
1623
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1705
1624
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1706
|
-
def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil,
|
1625
|
+
def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1707
1626
|
command = make_simple_command(:post, 'files/{fileId}/modifyLabels', options)
|
1708
1627
|
command.request_representation = Google::Apis::DriveV2::ModifyLabelsRequest::Representation
|
1709
1628
|
command.request_object = modify_labels_request_object
|
@@ -1712,7 +1631,6 @@ module Google
|
|
1712
1631
|
command.params['fileId'] = file_id unless file_id.nil?
|
1713
1632
|
command.query['fields'] = fields unless fields.nil?
|
1714
1633
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1715
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1716
1634
|
execute_or_queue_command(command, &block)
|
1717
1635
|
end
|
1718
1636
|
|
@@ -1726,27 +1644,28 @@ module Google
|
|
1726
1644
|
# @param [String] add_parents
|
1727
1645
|
# Comma-separated list of parent IDs to add.
|
1728
1646
|
# @param [Boolean] convert
|
1729
|
-
# This parameter
|
1647
|
+
# Deprecated: This parameter has no function.
|
1730
1648
|
# @param [Boolean] enforce_single_parent
|
1731
|
-
# Deprecated
|
1732
|
-
# shortcuts instead.
|
1649
|
+
# Deprecated: Adding files to multiple folders is no longer supported. Use `
|
1650
|
+
# shortcuts` instead.
|
1733
1651
|
# @param [String] include_labels
|
1734
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1652
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1735
1653
|
# the response.
|
1736
1654
|
# @param [String] include_permissions_for_view
|
1737
1655
|
# Specifies which additional view's permissions to include in the response. Only
|
1738
|
-
#
|
1656
|
+
# `published` is supported.
|
1739
1657
|
# @param [String] modified_date_behavior
|
1740
|
-
# Determines the behavior in which modifiedDate is updated. This overrides
|
1741
|
-
# setModifiedDate
|
1658
|
+
# Determines the behavior in which `modifiedDate` is updated. This overrides `
|
1659
|
+
# setModifiedDate`.
|
1742
1660
|
# @param [Boolean] new_revision
|
1743
1661
|
# Whether a blob upload should create a new revision. If false, the blob data in
|
1744
1662
|
# the current head revision is replaced. If true or not set, a new blob is
|
1745
1663
|
# created as head revision, and previous unpinned revisions are preserved for a
|
1746
1664
|
# short period of time. Pinned revisions are stored indefinitely, using
|
1747
1665
|
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
1748
|
-
# revisions are retained, see the Drive Help Center.
|
1749
|
-
# ignored if there is no payload
|
1666
|
+
# revisions are retained, see the [Drive Help Center](https://support.google.com/
|
1667
|
+
# drive/answer/2409045). Note that this field is ignored if there is no payload
|
1668
|
+
# in the request.
|
1750
1669
|
# @param [Boolean] ocr
|
1751
1670
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
1752
1671
|
# @param [String] ocr_language
|
@@ -1759,13 +1678,13 @@ module Google
|
|
1759
1678
|
# Comma-separated list of parent IDs to remove.
|
1760
1679
|
# @param [Boolean] set_modified_date
|
1761
1680
|
# Whether to set the modified date using the value supplied in the request body.
|
1762
|
-
# Setting this field to true is equivalent to modifiedDateBehavior=
|
1763
|
-
# and false is equivalent to modifiedDateBehavior=now
|
1764
|
-
# to the modified date set modifiedDateBehavior=noChange
|
1681
|
+
# Setting this field to `true` is equivalent to `modifiedDateBehavior=
|
1682
|
+
# fromBodyOrNow`, and `false` is equivalent to `modifiedDateBehavior=now`. To
|
1683
|
+
# prevent any changes to the modified date set `modifiedDateBehavior=noChange`.
|
1765
1684
|
# @param [Boolean] supports_all_drives
|
1766
1685
|
# Whether the requesting application supports both My Drives and shared drives.
|
1767
1686
|
# @param [Boolean] supports_team_drives
|
1768
|
-
# Deprecated
|
1687
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1769
1688
|
# @param [String] timed_text_language
|
1770
1689
|
# The language of the timed text.
|
1771
1690
|
# @param [String] timed_text_track_name
|
@@ -1777,10 +1696,8 @@ module Google
|
|
1777
1696
|
# @param [String] fields
|
1778
1697
|
# Selector specifying which fields to include in a partial response.
|
1779
1698
|
# @param [String] quota_user
|
1780
|
-
#
|
1781
|
-
# characters.
|
1782
|
-
# @param [String] user_ip
|
1783
|
-
# Deprecated. Please use quotaUser instead.
|
1699
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1700
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1784
1701
|
# @param [Google::Apis::RequestOptions] options
|
1785
1702
|
# Request-specific options
|
1786
1703
|
#
|
@@ -1793,7 +1710,7 @@ module Google
|
|
1793
1710
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1794
1711
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1795
1712
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1796
|
-
def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil,
|
1713
|
+
def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1797
1714
|
command = make_simple_command(:patch, 'files/{fileId}', options)
|
1798
1715
|
command.request_representation = Google::Apis::DriveV2::File::Representation
|
1799
1716
|
command.request_object = file_object
|
@@ -1820,7 +1737,6 @@ module Google
|
|
1820
1737
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
1821
1738
|
command.query['fields'] = fields unless fields.nil?
|
1822
1739
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1823
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1824
1740
|
execute_or_queue_command(command, &block)
|
1825
1741
|
end
|
1826
1742
|
|
@@ -1828,22 +1744,20 @@ module Google
|
|
1828
1744
|
# @param [String] file_id
|
1829
1745
|
# The ID of the file to update.
|
1830
1746
|
# @param [String] include_labels
|
1831
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1747
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1832
1748
|
# the response.
|
1833
1749
|
# @param [String] include_permissions_for_view
|
1834
1750
|
# Specifies which additional view's permissions to include in the response. Only
|
1835
|
-
#
|
1751
|
+
# `published` is supported.
|
1836
1752
|
# @param [Boolean] supports_all_drives
|
1837
1753
|
# Whether the requesting application supports both My Drives and shared drives.
|
1838
1754
|
# @param [Boolean] supports_team_drives
|
1839
|
-
# Deprecated
|
1755
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1840
1756
|
# @param [String] fields
|
1841
1757
|
# Selector specifying which fields to include in a partial response.
|
1842
1758
|
# @param [String] quota_user
|
1843
|
-
#
|
1844
|
-
# characters.
|
1845
|
-
# @param [String] user_ip
|
1846
|
-
# Deprecated. Please use quotaUser instead.
|
1759
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1760
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1847
1761
|
# @param [Google::Apis::RequestOptions] options
|
1848
1762
|
# Request-specific options
|
1849
1763
|
#
|
@@ -1856,7 +1770,7 @@ module Google
|
|
1856
1770
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1857
1771
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1858
1772
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1859
|
-
def touch_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1773
|
+
def touch_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1860
1774
|
command = make_simple_command(:post, 'files/{fileId}/touch', options)
|
1861
1775
|
command.response_representation = Google::Apis::DriveV2::File::Representation
|
1862
1776
|
command.response_class = Google::Apis::DriveV2::File
|
@@ -1867,35 +1781,34 @@ module Google
|
|
1867
1781
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1868
1782
|
command.query['fields'] = fields unless fields.nil?
|
1869
1783
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1870
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1871
1784
|
execute_or_queue_command(command, &block)
|
1872
1785
|
end
|
1873
1786
|
|
1874
1787
|
# Moves a file to the trash. The currently authenticated user must own the file
|
1875
|
-
# or be at least a fileOrganizer on the parent for shared drive files. Only
|
1876
|
-
# owner may trash a file. The trashed item is excluded from all files.list
|
1877
|
-
# responses returned for any user who
|
1788
|
+
# or be at least a `fileOrganizer` on the parent for shared drive files. Only
|
1789
|
+
# the owner may trash a file. The trashed item is excluded from all `files.list`
|
1790
|
+
# responses returned for any user who doesn't own the file. However, all users
|
1878
1791
|
# with access to the file can see the trashed item metadata in an API response.
|
1879
|
-
# All users with access can copy, download, export, and share the file.
|
1792
|
+
# All users with access can copy, download, export, and share the file. *Note:*
|
1793
|
+
# Files moved to the trash still appear by default in results from the `files.
|
1794
|
+
# list` method. To permanently remove a file, use `files.delete`.
|
1880
1795
|
# @param [String] file_id
|
1881
1796
|
# The ID of the file to trash.
|
1882
1797
|
# @param [String] include_labels
|
1883
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1798
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1884
1799
|
# the response.
|
1885
1800
|
# @param [String] include_permissions_for_view
|
1886
1801
|
# Specifies which additional view's permissions to include in the response. Only
|
1887
|
-
#
|
1802
|
+
# `published` is supported.
|
1888
1803
|
# @param [Boolean] supports_all_drives
|
1889
1804
|
# Whether the requesting application supports both My Drives and shared drives.
|
1890
1805
|
# @param [Boolean] supports_team_drives
|
1891
|
-
# Deprecated
|
1806
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1892
1807
|
# @param [String] fields
|
1893
1808
|
# Selector specifying which fields to include in a partial response.
|
1894
1809
|
# @param [String] quota_user
|
1895
|
-
#
|
1896
|
-
# characters.
|
1897
|
-
# @param [String] user_ip
|
1898
|
-
# Deprecated. Please use quotaUser instead.
|
1810
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1811
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1899
1812
|
# @param [Google::Apis::RequestOptions] options
|
1900
1813
|
# Request-specific options
|
1901
1814
|
#
|
@@ -1908,7 +1821,7 @@ module Google
|
|
1908
1821
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1909
1822
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1910
1823
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1911
|
-
def trash_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1824
|
+
def trash_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1912
1825
|
command = make_simple_command(:post, 'files/{fileId}/trash', options)
|
1913
1826
|
command.response_representation = Google::Apis::DriveV2::File::Representation
|
1914
1827
|
command.response_class = Google::Apis::DriveV2::File
|
@@ -1919,32 +1832,29 @@ module Google
|
|
1919
1832
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1920
1833
|
command.query['fields'] = fields unless fields.nil?
|
1921
1834
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1922
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1923
1835
|
execute_or_queue_command(command, &block)
|
1924
1836
|
end
|
1925
1837
|
|
1926
1838
|
# Restores a file from the trash. The currently authenticated user must own the
|
1927
|
-
# file or be at least a fileOrganizer on the parent for shared drive files.
|
1928
|
-
# the owner may untrash a file.
|
1839
|
+
# file or be at least a `fileOrganizer` on the parent for shared drive files.
|
1840
|
+
# Only the owner may untrash a file.
|
1929
1841
|
# @param [String] file_id
|
1930
1842
|
# The ID of the file to untrash.
|
1931
1843
|
# @param [String] include_labels
|
1932
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1844
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1933
1845
|
# the response.
|
1934
1846
|
# @param [String] include_permissions_for_view
|
1935
1847
|
# Specifies which additional view's permissions to include in the response. Only
|
1936
|
-
#
|
1848
|
+
# `published` is supported.
|
1937
1849
|
# @param [Boolean] supports_all_drives
|
1938
1850
|
# Whether the requesting application supports both My Drives and shared drives.
|
1939
1851
|
# @param [Boolean] supports_team_drives
|
1940
|
-
# Deprecated
|
1852
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1941
1853
|
# @param [String] fields
|
1942
1854
|
# Selector specifying which fields to include in a partial response.
|
1943
1855
|
# @param [String] quota_user
|
1944
|
-
#
|
1945
|
-
# characters.
|
1946
|
-
# @param [String] user_ip
|
1947
|
-
# Deprecated. Please use quotaUser instead.
|
1856
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1857
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1948
1858
|
# @param [Google::Apis::RequestOptions] options
|
1949
1859
|
# Request-specific options
|
1950
1860
|
#
|
@@ -1957,7 +1867,7 @@ module Google
|
|
1957
1867
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1958
1868
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1959
1869
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1960
|
-
def untrash_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1870
|
+
def untrash_file(file_id, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1961
1871
|
command = make_simple_command(:post, 'files/{fileId}/untrash', options)
|
1962
1872
|
command.response_representation = Google::Apis::DriveV2::File::Representation
|
1963
1873
|
command.response_class = Google::Apis::DriveV2::File
|
@@ -1968,60 +1878,63 @@ module Google
|
|
1968
1878
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1969
1879
|
command.query['fields'] = fields unless fields.nil?
|
1970
1880
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1971
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1972
1881
|
execute_or_queue_command(command, &block)
|
1973
1882
|
end
|
1974
1883
|
|
1975
1884
|
# Updates a file's metadata and/or content. When calling this method, only
|
1976
1885
|
# populate fields in the request that you want to modify. When updating fields,
|
1977
|
-
# some fields might be changed automatically, such as modifiedDate
|
1978
|
-
# supports patch semantics.
|
1886
|
+
# some fields might be changed automatically, such as `modifiedDate`. This
|
1887
|
+
# method supports patch semantics. This method supports an */upload* URI and
|
1888
|
+
# accepts uploaded media with the following characteristics: - *Maximum file
|
1889
|
+
# size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME
|
1890
|
+
# type, rather than the literal `*/*` value. The literal `*/*` is only used to
|
1891
|
+
# indicate that any valid MIME type can be uploaded. For more information on
|
1892
|
+
# uploading files, see [Upload file data](/drive/api/guides/manage-uploads).
|
1979
1893
|
# @param [String] file_id
|
1980
1894
|
# The ID of the file to update.
|
1981
1895
|
# @param [Google::Apis::DriveV2::File] file_object
|
1982
1896
|
# @param [String] add_parents
|
1983
1897
|
# Comma-separated list of parent IDs to add.
|
1984
1898
|
# @param [Boolean] convert
|
1985
|
-
# This parameter
|
1899
|
+
# Deprecated: This parameter has no function.
|
1986
1900
|
# @param [Boolean] enforce_single_parent
|
1987
|
-
# Deprecated
|
1988
|
-
# shortcuts instead.
|
1901
|
+
# Deprecated: Adding files to multiple folders is no longer supported. Use `
|
1902
|
+
# shortcuts` instead.
|
1989
1903
|
# @param [String] include_labels
|
1990
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1904
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1991
1905
|
# the response.
|
1992
1906
|
# @param [String] include_permissions_for_view
|
1993
1907
|
# Specifies which additional view's permissions to include in the response. Only
|
1994
|
-
#
|
1908
|
+
# `published` is supported.
|
1995
1909
|
# @param [String] modified_date_behavior
|
1996
|
-
# Determines the behavior in which modifiedDate is updated. This overrides
|
1997
|
-
# setModifiedDate
|
1910
|
+
# Determines the behavior in which `modifiedDate` is updated. This overrides `
|
1911
|
+
# setModifiedDate`.
|
1998
1912
|
# @param [Boolean] new_revision
|
1999
1913
|
# Whether a blob upload should create a new revision. If false, the blob data in
|
2000
1914
|
# the current head revision is replaced. If true or not set, a new blob is
|
2001
1915
|
# created as head revision, and previous unpinned revisions are preserved for a
|
2002
1916
|
# short period of time. Pinned revisions are stored indefinitely, using
|
2003
1917
|
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
2004
|
-
# revisions are retained, see the Drive Help Center.
|
2005
|
-
#
|
1918
|
+
# revisions are retained, see the [Drive Help Center](https://support.google.com/
|
1919
|
+
# drive/answer/2409045).
|
2006
1920
|
# @param [Boolean] ocr
|
2007
1921
|
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
2008
1922
|
# @param [String] ocr_language
|
2009
1923
|
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
2010
1924
|
# @param [Boolean] pinned
|
2011
1925
|
# Whether to pin the new revision. A file can have a maximum of 200 pinned
|
2012
|
-
# revisions.
|
2013
|
-
# request.
|
1926
|
+
# revisions.
|
2014
1927
|
# @param [String] remove_parents
|
2015
1928
|
# Comma-separated list of parent IDs to remove.
|
2016
1929
|
# @param [Boolean] set_modified_date
|
2017
1930
|
# Whether to set the modified date using the value supplied in the request body.
|
2018
|
-
# Setting this field to true is equivalent to modifiedDateBehavior=
|
2019
|
-
# and false is equivalent to modifiedDateBehavior=now
|
2020
|
-
# to the modified date set modifiedDateBehavior=noChange
|
1931
|
+
# Setting this field to `true` is equivalent to `modifiedDateBehavior=
|
1932
|
+
# fromBodyOrNow`, and `false` is equivalent to `modifiedDateBehavior=now`. To
|
1933
|
+
# prevent any changes to the modified date set `modifiedDateBehavior=noChange`.
|
2021
1934
|
# @param [Boolean] supports_all_drives
|
2022
1935
|
# Whether the requesting application supports both My Drives and shared drives.
|
2023
1936
|
# @param [Boolean] supports_team_drives
|
2024
|
-
# Deprecated
|
1937
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2025
1938
|
# @param [String] timed_text_language
|
2026
1939
|
# The language of the timed text.
|
2027
1940
|
# @param [String] timed_text_track_name
|
@@ -2033,10 +1946,8 @@ module Google
|
|
2033
1946
|
# @param [String] fields
|
2034
1947
|
# Selector specifying which fields to include in a partial response.
|
2035
1948
|
# @param [String] quota_user
|
2036
|
-
#
|
2037
|
-
# characters.
|
2038
|
-
# @param [String] user_ip
|
2039
|
-
# Deprecated. Please use quotaUser instead.
|
1949
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1950
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2040
1951
|
# @param [IO, String] upload_source
|
2041
1952
|
# IO stream or filename containing content to upload
|
2042
1953
|
# @param [String] content_type
|
@@ -2053,7 +1964,7 @@ module Google
|
|
2053
1964
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2054
1965
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2055
1966
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2056
|
-
def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil,
|
1967
|
+
def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_all_drives: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
2057
1968
|
if upload_source.nil?
|
2058
1969
|
command = make_simple_command(:put, 'files/{fileId}', options)
|
2059
1970
|
else
|
@@ -2086,11 +1997,10 @@ module Google
|
|
2086
1997
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
2087
1998
|
command.query['fields'] = fields unless fields.nil?
|
2088
1999
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2089
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2090
2000
|
execute_or_queue_command(command, &block)
|
2091
2001
|
end
|
2092
2002
|
|
2093
|
-
#
|
2003
|
+
# Subscribes to changes to a file.
|
2094
2004
|
# @param [String] file_id
|
2095
2005
|
# The ID for the file in question.
|
2096
2006
|
# @param [Google::Apis::DriveV2::Channel] channel_object
|
@@ -2098,32 +2008,28 @@ module Google
|
|
2098
2008
|
# Whether the user is acknowledging the risk of downloading known malware or
|
2099
2009
|
# other abusive files.
|
2100
2010
|
# @param [String] include_labels
|
2101
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
2011
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
2102
2012
|
# the response.
|
2103
2013
|
# @param [String] include_permissions_for_view
|
2104
2014
|
# Specifies which additional view's permissions to include in the response. Only
|
2105
|
-
#
|
2015
|
+
# `published` is supported.
|
2106
2016
|
# @param [String] projection
|
2107
|
-
# This parameter
|
2017
|
+
# Deprecated: This parameter has no function.
|
2108
2018
|
# @param [String] revision_id
|
2109
2019
|
# Specifies the Revision ID that should be downloaded. Ignored unless alt=media
|
2110
2020
|
# is specified.
|
2111
2021
|
# @param [Boolean] supports_all_drives
|
2112
2022
|
# Whether the requesting application supports both My Drives and shared drives.
|
2113
2023
|
# @param [Boolean] supports_team_drives
|
2114
|
-
# Deprecated
|
2024
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2115
2025
|
# @param [Boolean] update_viewed_date
|
2116
2026
|
# Deprecated: Use files.update with modifiedDateBehavior=noChange,
|
2117
2027
|
# updateViewedDate=true and an empty request body.
|
2118
2028
|
# @param [String] fields
|
2119
2029
|
# Selector specifying which fields to include in a partial response.
|
2120
2030
|
# @param [String] quota_user
|
2121
|
-
#
|
2122
|
-
# characters.
|
2123
|
-
# @param [String] user_ip
|
2124
|
-
# Deprecated. Please use quotaUser instead.
|
2125
|
-
# @param [IO, String] download_dest
|
2126
|
-
# IO stream or filename to receive content download
|
2031
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2032
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2127
2033
|
# @param [Google::Apis::RequestOptions] options
|
2128
2034
|
# Request-specific options
|
2129
2035
|
#
|
@@ -2136,13 +2042,8 @@ module Google
|
|
2136
2042
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2137
2043
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2138
2044
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2139
|
-
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil,
|
2140
|
-
|
2141
|
-
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
2142
|
-
else
|
2143
|
-
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
2144
|
-
command.download_dest = download_dest
|
2145
|
-
end
|
2045
|
+
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, projection: nil, revision_id: nil, supports_all_drives: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2046
|
+
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
2146
2047
|
command.request_representation = Google::Apis::DriveV2::Channel::Representation
|
2147
2048
|
command.request_object = channel_object
|
2148
2049
|
command.response_representation = Google::Apis::DriveV2::Channel::Representation
|
@@ -2158,7 +2059,6 @@ module Google
|
|
2158
2059
|
command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
|
2159
2060
|
command.query['fields'] = fields unless fields.nil?
|
2160
2061
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2161
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2162
2062
|
execute_or_queue_command(command, &block)
|
2163
2063
|
end
|
2164
2064
|
|
@@ -2168,15 +2068,13 @@ module Google
|
|
2168
2068
|
# @param [String] parent_id
|
2169
2069
|
# The ID of the parent.
|
2170
2070
|
# @param [Boolean] enforce_single_parent
|
2171
|
-
# Deprecated
|
2172
|
-
#
|
2071
|
+
# Deprecated: If an item is not in a shared drive and its last parent is removed,
|
2072
|
+
# the item is placed under its owner's root.
|
2173
2073
|
# @param [String] fields
|
2174
2074
|
# Selector specifying which fields to include in a partial response.
|
2175
2075
|
# @param [String] quota_user
|
2176
|
-
#
|
2177
|
-
# characters.
|
2178
|
-
# @param [String] user_ip
|
2179
|
-
# Deprecated. Please use quotaUser instead.
|
2076
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2077
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2180
2078
|
# @param [Google::Apis::RequestOptions] options
|
2181
2079
|
# Request-specific options
|
2182
2080
|
#
|
@@ -2189,14 +2087,13 @@ module Google
|
|
2189
2087
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2190
2088
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2191
2089
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2192
|
-
def delete_parent(file_id, parent_id, enforce_single_parent: nil, fields: nil, quota_user: nil,
|
2090
|
+
def delete_parent(file_id, parent_id, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2193
2091
|
command = make_simple_command(:delete, 'files/{fileId}/parents/{parentId}', options)
|
2194
2092
|
command.params['fileId'] = file_id unless file_id.nil?
|
2195
2093
|
command.params['parentId'] = parent_id unless parent_id.nil?
|
2196
2094
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
2197
2095
|
command.query['fields'] = fields unless fields.nil?
|
2198
2096
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2199
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2200
2097
|
execute_or_queue_command(command, &block)
|
2201
2098
|
end
|
2202
2099
|
|
@@ -2208,10 +2105,8 @@ module Google
|
|
2208
2105
|
# @param [String] fields
|
2209
2106
|
# Selector specifying which fields to include in a partial response.
|
2210
2107
|
# @param [String] quota_user
|
2211
|
-
#
|
2212
|
-
# characters.
|
2213
|
-
# @param [String] user_ip
|
2214
|
-
# Deprecated. Please use quotaUser instead.
|
2108
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2109
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2215
2110
|
# @param [Google::Apis::RequestOptions] options
|
2216
2111
|
# Request-specific options
|
2217
2112
|
#
|
@@ -2224,7 +2119,7 @@ module Google
|
|
2224
2119
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2225
2120
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2226
2121
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2227
|
-
def get_parent(file_id, parent_id, fields: nil, quota_user: nil,
|
2122
|
+
def get_parent(file_id, parent_id, fields: nil, quota_user: nil, options: nil, &block)
|
2228
2123
|
command = make_simple_command(:get, 'files/{fileId}/parents/{parentId}', options)
|
2229
2124
|
command.response_representation = Google::Apis::DriveV2::ParentReference::Representation
|
2230
2125
|
command.response_class = Google::Apis::DriveV2::ParentReference
|
@@ -2232,7 +2127,6 @@ module Google
|
|
2232
2127
|
command.params['parentId'] = parent_id unless parent_id.nil?
|
2233
2128
|
command.query['fields'] = fields unless fields.nil?
|
2234
2129
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2235
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2236
2130
|
execute_or_queue_command(command, &block)
|
2237
2131
|
end
|
2238
2132
|
|
@@ -2241,19 +2135,17 @@ module Google
|
|
2241
2135
|
# The ID of the file.
|
2242
2136
|
# @param [Google::Apis::DriveV2::ParentReference] parent_reference_object
|
2243
2137
|
# @param [Boolean] enforce_single_parent
|
2244
|
-
# Deprecated
|
2245
|
-
# shortcuts instead.
|
2138
|
+
# Deprecated: Adding files to multiple folders is no longer supported. Use `
|
2139
|
+
# shortcuts` instead.
|
2246
2140
|
# @param [Boolean] supports_all_drives
|
2247
2141
|
# Whether the requesting application supports both My Drives and shared drives.
|
2248
2142
|
# @param [Boolean] supports_team_drives
|
2249
|
-
# Deprecated
|
2143
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2250
2144
|
# @param [String] fields
|
2251
2145
|
# Selector specifying which fields to include in a partial response.
|
2252
2146
|
# @param [String] quota_user
|
2253
|
-
#
|
2254
|
-
# characters.
|
2255
|
-
# @param [String] user_ip
|
2256
|
-
# Deprecated. Please use quotaUser instead.
|
2147
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2148
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2257
2149
|
# @param [Google::Apis::RequestOptions] options
|
2258
2150
|
# Request-specific options
|
2259
2151
|
#
|
@@ -2266,7 +2158,7 @@ module Google
|
|
2266
2158
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2267
2159
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2268
2160
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2269
|
-
def insert_parent(file_id, parent_reference_object = nil, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
2161
|
+
def insert_parent(file_id, parent_reference_object = nil, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2270
2162
|
command = make_simple_command(:post, 'files/{fileId}/parents', options)
|
2271
2163
|
command.request_representation = Google::Apis::DriveV2::ParentReference::Representation
|
2272
2164
|
command.request_object = parent_reference_object
|
@@ -2278,7 +2170,6 @@ module Google
|
|
2278
2170
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
2279
2171
|
command.query['fields'] = fields unless fields.nil?
|
2280
2172
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2281
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2282
2173
|
execute_or_queue_command(command, &block)
|
2283
2174
|
end
|
2284
2175
|
|
@@ -2288,10 +2179,8 @@ module Google
|
|
2288
2179
|
# @param [String] fields
|
2289
2180
|
# Selector specifying which fields to include in a partial response.
|
2290
2181
|
# @param [String] quota_user
|
2291
|
-
#
|
2292
|
-
# characters.
|
2293
|
-
# @param [String] user_ip
|
2294
|
-
# Deprecated. Please use quotaUser instead.
|
2182
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2183
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2295
2184
|
# @param [Google::Apis::RequestOptions] options
|
2296
2185
|
# Request-specific options
|
2297
2186
|
#
|
@@ -2304,18 +2193,19 @@ module Google
|
|
2304
2193
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2305
2194
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2306
2195
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2307
|
-
def list_parents(file_id, fields: nil, quota_user: nil,
|
2196
|
+
def list_parents(file_id, fields: nil, quota_user: nil, options: nil, &block)
|
2308
2197
|
command = make_simple_command(:get, 'files/{fileId}/parents', options)
|
2309
2198
|
command.response_representation = Google::Apis::DriveV2::ParentList::Representation
|
2310
2199
|
command.response_class = Google::Apis::DriveV2::ParentList
|
2311
2200
|
command.params['fileId'] = file_id unless file_id.nil?
|
2312
2201
|
command.query['fields'] = fields unless fields.nil?
|
2313
2202
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2314
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2315
2203
|
execute_or_queue_command(command, &block)
|
2316
2204
|
end
|
2317
2205
|
|
2318
|
-
# Deletes a permission from a file or shared drive.
|
2206
|
+
# Deletes a permission from a file or shared drive. **Warning:** Concurrent
|
2207
|
+
# permissions operations on the same file are not supported; only the last
|
2208
|
+
# update is applied.
|
2319
2209
|
# @param [String] file_id
|
2320
2210
|
# The ID for the file or shared drive.
|
2321
2211
|
# @param [String] permission_id
|
@@ -2323,7 +2213,7 @@ module Google
|
|
2323
2213
|
# @param [Boolean] supports_all_drives
|
2324
2214
|
# Whether the requesting application supports both My Drives and shared drives.
|
2325
2215
|
# @param [Boolean] supports_team_drives
|
2326
|
-
# Deprecated
|
2216
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2327
2217
|
# @param [Boolean] use_domain_admin_access
|
2328
2218
|
# Issue the request as a domain administrator; if set to true, then the
|
2329
2219
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -2332,10 +2222,8 @@ module Google
|
|
2332
2222
|
# @param [String] fields
|
2333
2223
|
# Selector specifying which fields to include in a partial response.
|
2334
2224
|
# @param [String] quota_user
|
2335
|
-
#
|
2336
|
-
# characters.
|
2337
|
-
# @param [String] user_ip
|
2338
|
-
# Deprecated. Please use quotaUser instead.
|
2225
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2226
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2339
2227
|
# @param [Google::Apis::RequestOptions] options
|
2340
2228
|
# Request-specific options
|
2341
2229
|
#
|
@@ -2348,7 +2236,7 @@ module Google
|
|
2348
2236
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2349
2237
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2350
2238
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2351
|
-
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,
|
2239
|
+
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)
|
2352
2240
|
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
2353
2241
|
command.params['fileId'] = file_id unless file_id.nil?
|
2354
2242
|
command.params['permissionId'] = permission_id unless permission_id.nil?
|
@@ -2357,7 +2245,6 @@ module Google
|
|
2357
2245
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2358
2246
|
command.query['fields'] = fields unless fields.nil?
|
2359
2247
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2360
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2361
2248
|
execute_or_queue_command(command, &block)
|
2362
2249
|
end
|
2363
2250
|
|
@@ -2369,7 +2256,7 @@ module Google
|
|
2369
2256
|
# @param [Boolean] supports_all_drives
|
2370
2257
|
# Whether the requesting application supports both My Drives and shared drives.
|
2371
2258
|
# @param [Boolean] supports_team_drives
|
2372
|
-
# Deprecated
|
2259
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2373
2260
|
# @param [Boolean] use_domain_admin_access
|
2374
2261
|
# Issue the request as a domain administrator; if set to true, then the
|
2375
2262
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -2378,10 +2265,8 @@ module Google
|
|
2378
2265
|
# @param [String] fields
|
2379
2266
|
# Selector specifying which fields to include in a partial response.
|
2380
2267
|
# @param [String] quota_user
|
2381
|
-
#
|
2382
|
-
# characters.
|
2383
|
-
# @param [String] user_ip
|
2384
|
-
# Deprecated. Please use quotaUser instead.
|
2268
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2269
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2385
2270
|
# @param [Google::Apis::RequestOptions] options
|
2386
2271
|
# Request-specific options
|
2387
2272
|
#
|
@@ -2394,7 +2279,7 @@ module Google
|
|
2394
2279
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2395
2280
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2396
2281
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2397
|
-
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,
|
2282
|
+
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)
|
2398
2283
|
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
2399
2284
|
command.response_representation = Google::Apis::DriveV2::Permission::Representation
|
2400
2285
|
command.response_class = Google::Apis::DriveV2::Permission
|
@@ -2405,7 +2290,6 @@ module Google
|
|
2405
2290
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2406
2291
|
command.query['fields'] = fields unless fields.nil?
|
2407
2292
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2408
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2409
2293
|
execute_or_queue_command(command, &block)
|
2410
2294
|
end
|
2411
2295
|
|
@@ -2415,10 +2299,8 @@ module Google
|
|
2415
2299
|
# @param [String] fields
|
2416
2300
|
# Selector specifying which fields to include in a partial response.
|
2417
2301
|
# @param [String] quota_user
|
2418
|
-
#
|
2419
|
-
# characters.
|
2420
|
-
# @param [String] user_ip
|
2421
|
-
# Deprecated. Please use quotaUser instead.
|
2302
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2303
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2422
2304
|
# @param [Google::Apis::RequestOptions] options
|
2423
2305
|
# Request-specific options
|
2424
2306
|
#
|
@@ -2431,37 +2313,38 @@ module Google
|
|
2431
2313
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2432
2314
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2433
2315
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2434
|
-
def get_permission_id_for_email(email, fields: nil, quota_user: nil,
|
2316
|
+
def get_permission_id_for_email(email, fields: nil, quota_user: nil, options: nil, &block)
|
2435
2317
|
command = make_simple_command(:get, 'permissionIds/{email}', options)
|
2436
2318
|
command.response_representation = Google::Apis::DriveV2::PermissionId::Representation
|
2437
2319
|
command.response_class = Google::Apis::DriveV2::PermissionId
|
2438
2320
|
command.params['email'] = email unless email.nil?
|
2439
2321
|
command.query['fields'] = fields unless fields.nil?
|
2440
2322
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2441
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2442
2323
|
execute_or_queue_command(command, &block)
|
2443
2324
|
end
|
2444
2325
|
|
2445
|
-
# Inserts a permission for a file or shared drive.
|
2326
|
+
# Inserts a permission for a file or shared drive. **Warning:** Concurrent
|
2327
|
+
# permissions operations on the same file are not supported; only the last
|
2328
|
+
# update is applied.
|
2446
2329
|
# @param [String] file_id
|
2447
2330
|
# The ID for the file or shared drive.
|
2448
2331
|
# @param [Google::Apis::DriveV2::Permission] permission_object
|
2449
2332
|
# @param [String] email_message
|
2450
2333
|
# A plain text custom message to include in notification emails.
|
2451
2334
|
# @param [Boolean] enforce_single_parent
|
2452
|
-
# Deprecated
|
2335
|
+
# Deprecated: See `moveToNewOwnersRoot` for details.
|
2453
2336
|
# @param [Boolean] move_to_new_owners_root
|
2454
2337
|
# This parameter will only take effect if the item is not in a shared drive and
|
2455
|
-
# the request is attempting to transfer the ownership of the item. If set to
|
2456
|
-
# true
|
2457
|
-
# prior parents removed. If set to false
|
2338
|
+
# the request is attempting to transfer the ownership of the item. If set to `
|
2339
|
+
# true`, the item will be moved to the new owner's My Drive root folder and all
|
2340
|
+
# prior parents removed. If set to `false`, parents are not changed.
|
2458
2341
|
# @param [Boolean] send_notification_emails
|
2459
2342
|
# Whether to send notification emails when sharing to users or groups. This
|
2460
|
-
# parameter is ignored and an email is sent if the role is owner
|
2343
|
+
# parameter is ignored and an email is sent if the `role` is `owner`.
|
2461
2344
|
# @param [Boolean] supports_all_drives
|
2462
2345
|
# Whether the requesting application supports both My Drives and shared drives.
|
2463
2346
|
# @param [Boolean] supports_team_drives
|
2464
|
-
# Deprecated
|
2347
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2465
2348
|
# @param [Boolean] use_domain_admin_access
|
2466
2349
|
# Issue the request as a domain administrator; if set to true, then the
|
2467
2350
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -2470,10 +2353,8 @@ module Google
|
|
2470
2353
|
# @param [String] fields
|
2471
2354
|
# Selector specifying which fields to include in a partial response.
|
2472
2355
|
# @param [String] quota_user
|
2473
|
-
#
|
2474
|
-
# characters.
|
2475
|
-
# @param [String] user_ip
|
2476
|
-
# Deprecated. Please use quotaUser instead.
|
2356
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2357
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2477
2358
|
# @param [Google::Apis::RequestOptions] options
|
2478
2359
|
# Request-specific options
|
2479
2360
|
#
|
@@ -2486,7 +2367,7 @@ module Google
|
|
2486
2367
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2487
2368
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2488
2369
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2489
|
-
def insert_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_emails: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2370
|
+
def insert_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_emails: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2490
2371
|
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
2491
2372
|
command.request_representation = Google::Apis::DriveV2::Permission::Representation
|
2492
2373
|
command.request_object = permission_object
|
@@ -2502,7 +2383,6 @@ module Google
|
|
2502
2383
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2503
2384
|
command.query['fields'] = fields unless fields.nil?
|
2504
2385
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2505
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2506
2386
|
execute_or_queue_command(command, &block)
|
2507
2387
|
end
|
2508
2388
|
|
@@ -2511,18 +2391,18 @@ module Google
|
|
2511
2391
|
# The ID for the file or shared drive.
|
2512
2392
|
# @param [String] include_permissions_for_view
|
2513
2393
|
# Specifies which additional view's permissions to include in the response. Only
|
2514
|
-
#
|
2394
|
+
# `published` is supported.
|
2515
2395
|
# @param [Fixnum] max_results
|
2516
2396
|
# The maximum number of permissions to return per page. When not set for files
|
2517
2397
|
# in a shared drive, at most 100 results will be returned. When not set for
|
2518
2398
|
# files that are not in a shared drive, the entire list will be returned.
|
2519
2399
|
# @param [String] page_token
|
2520
2400
|
# The token for continuing a previous list request on the next page. This should
|
2521
|
-
# be set to the value of
|
2401
|
+
# be set to the value of `nextPageToken` from the previous response.
|
2522
2402
|
# @param [Boolean] supports_all_drives
|
2523
2403
|
# Whether the requesting application supports both My Drives and shared drives.
|
2524
2404
|
# @param [Boolean] supports_team_drives
|
2525
|
-
# Deprecated
|
2405
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2526
2406
|
# @param [Boolean] use_domain_admin_access
|
2527
2407
|
# Issue the request as a domain administrator; if set to true, then the
|
2528
2408
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -2531,10 +2411,8 @@ module Google
|
|
2531
2411
|
# @param [String] fields
|
2532
2412
|
# Selector specifying which fields to include in a partial response.
|
2533
2413
|
# @param [String] quota_user
|
2534
|
-
#
|
2535
|
-
# characters.
|
2536
|
-
# @param [String] user_ip
|
2537
|
-
# Deprecated. Please use quotaUser instead.
|
2414
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2415
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2538
2416
|
# @param [Google::Apis::RequestOptions] options
|
2539
2417
|
# Request-specific options
|
2540
2418
|
#
|
@@ -2547,7 +2425,7 @@ module Google
|
|
2547
2425
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2548
2426
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2549
2427
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2550
|
-
def list_permissions(file_id, include_permissions_for_view: nil, max_results: nil, page_token: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2428
|
+
def list_permissions(file_id, include_permissions_for_view: nil, max_results: 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)
|
2551
2429
|
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
2552
2430
|
command.response_representation = Google::Apis::DriveV2::PermissionList::Representation
|
2553
2431
|
command.response_class = Google::Apis::DriveV2::PermissionList
|
@@ -2560,11 +2438,12 @@ module Google
|
|
2560
2438
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2561
2439
|
command.query['fields'] = fields unless fields.nil?
|
2562
2440
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2563
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2564
2441
|
execute_or_queue_command(command, &block)
|
2565
2442
|
end
|
2566
2443
|
|
2567
|
-
# Updates a permission using patch semantics.
|
2444
|
+
# Updates a permission using patch semantics. **Warning:** Concurrent
|
2445
|
+
# permissions operations on the same file are not supported; only the last
|
2446
|
+
# update is applied.
|
2568
2447
|
# @param [String] file_id
|
2569
2448
|
# The ID for the file or shared drive.
|
2570
2449
|
# @param [String] permission_id
|
@@ -2575,10 +2454,10 @@ module Google
|
|
2575
2454
|
# @param [Boolean] supports_all_drives
|
2576
2455
|
# Whether the requesting application supports both My Drives and shared drives.
|
2577
2456
|
# @param [Boolean] supports_team_drives
|
2578
|
-
# Deprecated
|
2457
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2579
2458
|
# @param [Boolean] transfer_ownership
|
2580
|
-
# Whether changing a role to
|
2581
|
-
# Does nothing if the specified role is not
|
2459
|
+
# Whether changing a role to `owner` downgrades the current owners to writers.
|
2460
|
+
# Does nothing if the specified role is not `owner`.
|
2582
2461
|
# @param [Boolean] use_domain_admin_access
|
2583
2462
|
# Issue the request as a domain administrator; if set to true, then the
|
2584
2463
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -2587,10 +2466,8 @@ module Google
|
|
2587
2466
|
# @param [String] fields
|
2588
2467
|
# Selector specifying which fields to include in a partial response.
|
2589
2468
|
# @param [String] quota_user
|
2590
|
-
#
|
2591
|
-
# characters.
|
2592
|
-
# @param [String] user_ip
|
2593
|
-
# Deprecated. Please use quotaUser instead.
|
2469
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2470
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2594
2471
|
# @param [Google::Apis::RequestOptions] options
|
2595
2472
|
# Request-specific options
|
2596
2473
|
#
|
@@ -2603,7 +2480,7 @@ module Google
|
|
2603
2480
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2604
2481
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2605
2482
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2606
|
-
def patch_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,
|
2483
|
+
def patch_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)
|
2607
2484
|
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
2608
2485
|
command.request_representation = Google::Apis::DriveV2::Permission::Representation
|
2609
2486
|
command.request_object = permission_object
|
@@ -2618,11 +2495,11 @@ module Google
|
|
2618
2495
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2619
2496
|
command.query['fields'] = fields unless fields.nil?
|
2620
2497
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2621
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2622
2498
|
execute_or_queue_command(command, &block)
|
2623
2499
|
end
|
2624
2500
|
|
2625
|
-
# Updates a permission.
|
2501
|
+
# Updates a permission. **Warning:** Concurrent permissions operations on the
|
2502
|
+
# same file are not supported; only the last update is applied.
|
2626
2503
|
# @param [String] file_id
|
2627
2504
|
# The ID for the file or shared drive.
|
2628
2505
|
# @param [String] permission_id
|
@@ -2633,15 +2510,10 @@ module Google
|
|
2633
2510
|
# @param [Boolean] supports_all_drives
|
2634
2511
|
# Whether the requesting application supports both My Drives and shared drives.
|
2635
2512
|
# @param [Boolean] supports_team_drives
|
2636
|
-
# Deprecated
|
2513
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
2637
2514
|
# @param [Boolean] transfer_ownership
|
2638
|
-
# Whether
|
2639
|
-
#
|
2640
|
-
# side effect. File owners can only transfer ownership of files existing on My
|
2641
|
-
# Drive. Files existing in a shared drive are owned by the organization that
|
2642
|
-
# owns that shared drive. Ownership transfers are not supported for files and
|
2643
|
-
# folders in shared drives. Organizers of a shared drive can move items from
|
2644
|
-
# that shared drive into their My Drive which transfers the ownership to them.
|
2515
|
+
# Whether changing a role to `owner` downgrades the current owners to writers.
|
2516
|
+
# Does nothing if the specified role is not `owner`.
|
2645
2517
|
# @param [Boolean] use_domain_admin_access
|
2646
2518
|
# Issue the request as a domain administrator; if set to true, then the
|
2647
2519
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -2650,10 +2522,8 @@ module Google
|
|
2650
2522
|
# @param [String] fields
|
2651
2523
|
# Selector specifying which fields to include in a partial response.
|
2652
2524
|
# @param [String] quota_user
|
2653
|
-
#
|
2654
|
-
# characters.
|
2655
|
-
# @param [String] user_ip
|
2656
|
-
# Deprecated. Please use quotaUser instead.
|
2525
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2526
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2657
2527
|
# @param [Google::Apis::RequestOptions] options
|
2658
2528
|
# Request-specific options
|
2659
2529
|
#
|
@@ -2666,7 +2536,7 @@ module Google
|
|
2666
2536
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2667
2537
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2668
2538
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2669
|
-
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,
|
2539
|
+
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)
|
2670
2540
|
command = make_simple_command(:put, 'files/{fileId}/permissions/{permissionId}', options)
|
2671
2541
|
command.request_representation = Google::Apis::DriveV2::Permission::Representation
|
2672
2542
|
command.request_object = permission_object
|
@@ -2681,7 +2551,6 @@ module Google
|
|
2681
2551
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2682
2552
|
command.query['fields'] = fields unless fields.nil?
|
2683
2553
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2684
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2685
2554
|
execute_or_queue_command(command, &block)
|
2686
2555
|
end
|
2687
2556
|
|
@@ -2695,10 +2564,8 @@ module Google
|
|
2695
2564
|
# @param [String] fields
|
2696
2565
|
# Selector specifying which fields to include in a partial response.
|
2697
2566
|
# @param [String] quota_user
|
2698
|
-
#
|
2699
|
-
# characters.
|
2700
|
-
# @param [String] user_ip
|
2701
|
-
# Deprecated. Please use quotaUser instead.
|
2567
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2568
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2702
2569
|
# @param [Google::Apis::RequestOptions] options
|
2703
2570
|
# Request-specific options
|
2704
2571
|
#
|
@@ -2711,14 +2578,13 @@ module Google
|
|
2711
2578
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2712
2579
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2713
2580
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2714
|
-
def delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil,
|
2581
|
+
def delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2715
2582
|
command = make_simple_command(:delete, 'files/{fileId}/properties/{propertyKey}', options)
|
2716
2583
|
command.params['fileId'] = file_id unless file_id.nil?
|
2717
2584
|
command.params['propertyKey'] = property_key unless property_key.nil?
|
2718
2585
|
command.query['visibility'] = visibility unless visibility.nil?
|
2719
2586
|
command.query['fields'] = fields unless fields.nil?
|
2720
2587
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2721
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2722
2588
|
execute_or_queue_command(command, &block)
|
2723
2589
|
end
|
2724
2590
|
|
@@ -2732,10 +2598,8 @@ module Google
|
|
2732
2598
|
# @param [String] fields
|
2733
2599
|
# Selector specifying which fields to include in a partial response.
|
2734
2600
|
# @param [String] quota_user
|
2735
|
-
#
|
2736
|
-
# characters.
|
2737
|
-
# @param [String] user_ip
|
2738
|
-
# Deprecated. Please use quotaUser instead.
|
2601
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2602
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2739
2603
|
# @param [Google::Apis::RequestOptions] options
|
2740
2604
|
# Request-specific options
|
2741
2605
|
#
|
@@ -2748,7 +2612,7 @@ module Google
|
|
2748
2612
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2749
2613
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2750
2614
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2751
|
-
def get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil,
|
2615
|
+
def get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2752
2616
|
command = make_simple_command(:get, 'files/{fileId}/properties/{propertyKey}', options)
|
2753
2617
|
command.response_representation = Google::Apis::DriveV2::Property::Representation
|
2754
2618
|
command.response_class = Google::Apis::DriveV2::Property
|
@@ -2757,7 +2621,6 @@ module Google
|
|
2757
2621
|
command.query['visibility'] = visibility unless visibility.nil?
|
2758
2622
|
command.query['fields'] = fields unless fields.nil?
|
2759
2623
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2760
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2761
2624
|
execute_or_queue_command(command, &block)
|
2762
2625
|
end
|
2763
2626
|
|
@@ -2768,10 +2631,8 @@ module Google
|
|
2768
2631
|
# @param [String] fields
|
2769
2632
|
# Selector specifying which fields to include in a partial response.
|
2770
2633
|
# @param [String] quota_user
|
2771
|
-
#
|
2772
|
-
# characters.
|
2773
|
-
# @param [String] user_ip
|
2774
|
-
# Deprecated. Please use quotaUser instead.
|
2634
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2635
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2775
2636
|
# @param [Google::Apis::RequestOptions] options
|
2776
2637
|
# Request-specific options
|
2777
2638
|
#
|
@@ -2784,7 +2645,7 @@ module Google
|
|
2784
2645
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2785
2646
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2786
2647
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2787
|
-
def insert_property(file_id, property_object = nil, fields: nil, quota_user: nil,
|
2648
|
+
def insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2788
2649
|
command = make_simple_command(:post, 'files/{fileId}/properties', options)
|
2789
2650
|
command.request_representation = Google::Apis::DriveV2::Property::Representation
|
2790
2651
|
command.request_object = property_object
|
@@ -2793,7 +2654,6 @@ module Google
|
|
2793
2654
|
command.params['fileId'] = file_id unless file_id.nil?
|
2794
2655
|
command.query['fields'] = fields unless fields.nil?
|
2795
2656
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2796
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2797
2657
|
execute_or_queue_command(command, &block)
|
2798
2658
|
end
|
2799
2659
|
|
@@ -2803,10 +2663,8 @@ module Google
|
|
2803
2663
|
# @param [String] fields
|
2804
2664
|
# Selector specifying which fields to include in a partial response.
|
2805
2665
|
# @param [String] quota_user
|
2806
|
-
#
|
2807
|
-
# characters.
|
2808
|
-
# @param [String] user_ip
|
2809
|
-
# Deprecated. Please use quotaUser instead.
|
2666
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2667
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2810
2668
|
# @param [Google::Apis::RequestOptions] options
|
2811
2669
|
# Request-specific options
|
2812
2670
|
#
|
@@ -2819,14 +2677,13 @@ module Google
|
|
2819
2677
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2820
2678
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2821
2679
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2822
|
-
def list_properties(file_id, fields: nil, quota_user: nil,
|
2680
|
+
def list_properties(file_id, fields: nil, quota_user: nil, options: nil, &block)
|
2823
2681
|
command = make_simple_command(:get, 'files/{fileId}/properties', options)
|
2824
2682
|
command.response_representation = Google::Apis::DriveV2::PropertyList::Representation
|
2825
2683
|
command.response_class = Google::Apis::DriveV2::PropertyList
|
2826
2684
|
command.params['fileId'] = file_id unless file_id.nil?
|
2827
2685
|
command.query['fields'] = fields unless fields.nil?
|
2828
2686
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2829
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2830
2687
|
execute_or_queue_command(command, &block)
|
2831
2688
|
end
|
2832
2689
|
|
@@ -2842,10 +2699,8 @@ module Google
|
|
2842
2699
|
# @param [String] fields
|
2843
2700
|
# Selector specifying which fields to include in a partial response.
|
2844
2701
|
# @param [String] quota_user
|
2845
|
-
#
|
2846
|
-
# characters.
|
2847
|
-
# @param [String] user_ip
|
2848
|
-
# Deprecated. Please use quotaUser instead.
|
2702
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2703
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2849
2704
|
# @param [Google::Apis::RequestOptions] options
|
2850
2705
|
# Request-specific options
|
2851
2706
|
#
|
@@ -2858,7 +2713,7 @@ module Google
|
|
2858
2713
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2859
2714
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2860
2715
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2861
|
-
def patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil,
|
2716
|
+
def patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2862
2717
|
command = make_simple_command(:patch, 'files/{fileId}/properties/{propertyKey}', options)
|
2863
2718
|
command.request_representation = Google::Apis::DriveV2::Property::Representation
|
2864
2719
|
command.request_object = property_object
|
@@ -2869,7 +2724,6 @@ module Google
|
|
2869
2724
|
command.query['visibility'] = visibility unless visibility.nil?
|
2870
2725
|
command.query['fields'] = fields unless fields.nil?
|
2871
2726
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2872
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2873
2727
|
execute_or_queue_command(command, &block)
|
2874
2728
|
end
|
2875
2729
|
|
@@ -2885,10 +2739,8 @@ module Google
|
|
2885
2739
|
# @param [String] fields
|
2886
2740
|
# Selector specifying which fields to include in a partial response.
|
2887
2741
|
# @param [String] quota_user
|
2888
|
-
#
|
2889
|
-
# characters.
|
2890
|
-
# @param [String] user_ip
|
2891
|
-
# Deprecated. Please use quotaUser instead.
|
2742
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2743
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2892
2744
|
# @param [Google::Apis::RequestOptions] options
|
2893
2745
|
# Request-specific options
|
2894
2746
|
#
|
@@ -2901,7 +2753,7 @@ module Google
|
|
2901
2753
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2902
2754
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2903
2755
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2904
|
-
def update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil,
|
2756
|
+
def update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2905
2757
|
command = make_simple_command(:put, 'files/{fileId}/properties/{propertyKey}', options)
|
2906
2758
|
command.request_representation = Google::Apis::DriveV2::Property::Representation
|
2907
2759
|
command.request_object = property_object
|
@@ -2912,7 +2764,6 @@ module Google
|
|
2912
2764
|
command.query['visibility'] = visibility unless visibility.nil?
|
2913
2765
|
command.query['fields'] = fields unless fields.nil?
|
2914
2766
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2915
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2916
2767
|
execute_or_queue_command(command, &block)
|
2917
2768
|
end
|
2918
2769
|
|
@@ -2926,10 +2777,8 @@ module Google
|
|
2926
2777
|
# @param [String] fields
|
2927
2778
|
# Selector specifying which fields to include in a partial response.
|
2928
2779
|
# @param [String] quota_user
|
2929
|
-
#
|
2930
|
-
# characters.
|
2931
|
-
# @param [String] user_ip
|
2932
|
-
# Deprecated. Please use quotaUser instead.
|
2780
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2781
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2933
2782
|
# @param [Google::Apis::RequestOptions] options
|
2934
2783
|
# Request-specific options
|
2935
2784
|
#
|
@@ -2942,14 +2791,13 @@ module Google
|
|
2942
2791
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2943
2792
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2944
2793
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2945
|
-
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil,
|
2794
|
+
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, options: nil, &block)
|
2946
2795
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
2947
2796
|
command.params['fileId'] = file_id unless file_id.nil?
|
2948
2797
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
2949
2798
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
2950
2799
|
command.query['fields'] = fields unless fields.nil?
|
2951
2800
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2952
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2953
2801
|
execute_or_queue_command(command, &block)
|
2954
2802
|
end
|
2955
2803
|
|
@@ -2965,10 +2813,8 @@ module Google
|
|
2965
2813
|
# @param [String] fields
|
2966
2814
|
# Selector specifying which fields to include in a partial response.
|
2967
2815
|
# @param [String] quota_user
|
2968
|
-
#
|
2969
|
-
# characters.
|
2970
|
-
# @param [String] user_ip
|
2971
|
-
# Deprecated. Please use quotaUser instead.
|
2816
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2817
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2972
2818
|
# @param [Google::Apis::RequestOptions] options
|
2973
2819
|
# Request-specific options
|
2974
2820
|
#
|
@@ -2981,7 +2827,7 @@ module Google
|
|
2981
2827
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2982
2828
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2983
2829
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2984
|
-
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil,
|
2830
|
+
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2985
2831
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
2986
2832
|
command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
|
2987
2833
|
command.response_class = Google::Apis::DriveV2::CommentReply
|
@@ -2991,7 +2837,6 @@ module Google
|
|
2991
2837
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
2992
2838
|
command.query['fields'] = fields unless fields.nil?
|
2993
2839
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2994
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2995
2840
|
execute_or_queue_command(command, &block)
|
2996
2841
|
end
|
2997
2842
|
|
@@ -3004,10 +2849,8 @@ module Google
|
|
3004
2849
|
# @param [String] fields
|
3005
2850
|
# Selector specifying which fields to include in a partial response.
|
3006
2851
|
# @param [String] quota_user
|
3007
|
-
#
|
3008
|
-
# characters.
|
3009
|
-
# @param [String] user_ip
|
3010
|
-
# Deprecated. Please use quotaUser instead.
|
2852
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2853
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3011
2854
|
# @param [Google::Apis::RequestOptions] options
|
3012
2855
|
# Request-specific options
|
3013
2856
|
#
|
@@ -3020,7 +2863,7 @@ module Google
|
|
3020
2863
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3021
2864
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3022
2865
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3023
|
-
def insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil,
|
2866
|
+
def insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
3024
2867
|
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
3025
2868
|
command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
|
3026
2869
|
command.request_object = comment_reply_object
|
@@ -3030,7 +2873,6 @@ module Google
|
|
3030
2873
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
3031
2874
|
command.query['fields'] = fields unless fields.nil?
|
3032
2875
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3033
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3034
2876
|
execute_or_queue_command(command, &block)
|
3035
2877
|
end
|
3036
2878
|
|
@@ -3051,10 +2893,8 @@ module Google
|
|
3051
2893
|
# @param [String] fields
|
3052
2894
|
# Selector specifying which fields to include in a partial response.
|
3053
2895
|
# @param [String] quota_user
|
3054
|
-
#
|
3055
|
-
# characters.
|
3056
|
-
# @param [String] user_ip
|
3057
|
-
# Deprecated. Please use quotaUser instead.
|
2896
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2897
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3058
2898
|
# @param [Google::Apis::RequestOptions] options
|
3059
2899
|
# Request-specific options
|
3060
2900
|
#
|
@@ -3067,7 +2907,7 @@ module Google
|
|
3067
2907
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3068
2908
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3069
2909
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3070
|
-
def list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil,
|
2910
|
+
def list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
3071
2911
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
3072
2912
|
command.response_representation = Google::Apis::DriveV2::CommentReplyList::Representation
|
3073
2913
|
command.response_class = Google::Apis::DriveV2::CommentReplyList
|
@@ -3078,7 +2918,6 @@ module Google
|
|
3078
2918
|
command.query['pageToken'] = page_token unless page_token.nil?
|
3079
2919
|
command.query['fields'] = fields unless fields.nil?
|
3080
2920
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3081
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3082
2921
|
execute_or_queue_command(command, &block)
|
3083
2922
|
end
|
3084
2923
|
|
@@ -3093,10 +2932,8 @@ module Google
|
|
3093
2932
|
# @param [String] fields
|
3094
2933
|
# Selector specifying which fields to include in a partial response.
|
3095
2934
|
# @param [String] quota_user
|
3096
|
-
#
|
3097
|
-
# characters.
|
3098
|
-
# @param [String] user_ip
|
3099
|
-
# Deprecated. Please use quotaUser instead.
|
2935
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2936
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3100
2937
|
# @param [Google::Apis::RequestOptions] options
|
3101
2938
|
# Request-specific options
|
3102
2939
|
#
|
@@ -3109,7 +2946,7 @@ module Google
|
|
3109
2946
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3110
2947
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3111
2948
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3112
|
-
def patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil,
|
2949
|
+
def patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
3113
2950
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
3114
2951
|
command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
|
3115
2952
|
command.request_object = comment_reply_object
|
@@ -3120,7 +2957,6 @@ module Google
|
|
3120
2957
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
3121
2958
|
command.query['fields'] = fields unless fields.nil?
|
3122
2959
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3123
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3124
2960
|
execute_or_queue_command(command, &block)
|
3125
2961
|
end
|
3126
2962
|
|
@@ -3135,10 +2971,8 @@ module Google
|
|
3135
2971
|
# @param [String] fields
|
3136
2972
|
# Selector specifying which fields to include in a partial response.
|
3137
2973
|
# @param [String] quota_user
|
3138
|
-
#
|
3139
|
-
# characters.
|
3140
|
-
# @param [String] user_ip
|
3141
|
-
# Deprecated. Please use quotaUser instead.
|
2974
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2975
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3142
2976
|
# @param [Google::Apis::RequestOptions] options
|
3143
2977
|
# Request-specific options
|
3144
2978
|
#
|
@@ -3151,7 +2985,7 @@ module Google
|
|
3151
2985
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3152
2986
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3153
2987
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3154
|
-
def update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil,
|
2988
|
+
def update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
3155
2989
|
command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
3156
2990
|
command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
|
3157
2991
|
command.request_object = comment_reply_object
|
@@ -3162,7 +2996,6 @@ module Google
|
|
3162
2996
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
3163
2997
|
command.query['fields'] = fields unless fields.nil?
|
3164
2998
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3165
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3166
2999
|
execute_or_queue_command(command, &block)
|
3167
3000
|
end
|
3168
3001
|
|
@@ -3176,10 +3009,8 @@ module Google
|
|
3176
3009
|
# @param [String] fields
|
3177
3010
|
# Selector specifying which fields to include in a partial response.
|
3178
3011
|
# @param [String] quota_user
|
3179
|
-
#
|
3180
|
-
# characters.
|
3181
|
-
# @param [String] user_ip
|
3182
|
-
# Deprecated. Please use quotaUser instead.
|
3012
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3013
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3183
3014
|
# @param [Google::Apis::RequestOptions] options
|
3184
3015
|
# Request-specific options
|
3185
3016
|
#
|
@@ -3192,13 +3023,12 @@ module Google
|
|
3192
3023
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3193
3024
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3194
3025
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3195
|
-
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil,
|
3026
|
+
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, options: nil, &block)
|
3196
3027
|
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
3197
3028
|
command.params['fileId'] = file_id unless file_id.nil?
|
3198
3029
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
3199
3030
|
command.query['fields'] = fields unless fields.nil?
|
3200
3031
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3201
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3202
3032
|
execute_or_queue_command(command, &block)
|
3203
3033
|
end
|
3204
3034
|
|
@@ -3210,10 +3040,8 @@ module Google
|
|
3210
3040
|
# @param [String] fields
|
3211
3041
|
# Selector specifying which fields to include in a partial response.
|
3212
3042
|
# @param [String] quota_user
|
3213
|
-
#
|
3214
|
-
# characters.
|
3215
|
-
# @param [String] user_ip
|
3216
|
-
# Deprecated. Please use quotaUser instead.
|
3043
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3044
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3217
3045
|
# @param [Google::Apis::RequestOptions] options
|
3218
3046
|
# Request-specific options
|
3219
3047
|
#
|
@@ -3226,7 +3054,7 @@ module Google
|
|
3226
3054
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3227
3055
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3228
3056
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3229
|
-
def get_revision(file_id, revision_id, fields: nil, quota_user: nil,
|
3057
|
+
def get_revision(file_id, revision_id, fields: nil, quota_user: nil, options: nil, &block)
|
3230
3058
|
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
3231
3059
|
command.response_representation = Google::Apis::DriveV2::Revision::Representation
|
3232
3060
|
command.response_class = Google::Apis::DriveV2::Revision
|
@@ -3234,7 +3062,6 @@ module Google
|
|
3234
3062
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
3235
3063
|
command.query['fields'] = fields unless fields.nil?
|
3236
3064
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3237
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3238
3065
|
execute_or_queue_command(command, &block)
|
3239
3066
|
end
|
3240
3067
|
|
@@ -3249,10 +3076,8 @@ module Google
|
|
3249
3076
|
# @param [String] fields
|
3250
3077
|
# Selector specifying which fields to include in a partial response.
|
3251
3078
|
# @param [String] quota_user
|
3252
|
-
#
|
3253
|
-
# characters.
|
3254
|
-
# @param [String] user_ip
|
3255
|
-
# Deprecated. Please use quotaUser instead.
|
3079
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3080
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3256
3081
|
# @param [Google::Apis::RequestOptions] options
|
3257
3082
|
# Request-specific options
|
3258
3083
|
#
|
@@ -3265,7 +3090,7 @@ module Google
|
|
3265
3090
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3266
3091
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3267
3092
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3268
|
-
def list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil,
|
3093
|
+
def list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
3269
3094
|
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
3270
3095
|
command.response_representation = Google::Apis::DriveV2::RevisionList::Representation
|
3271
3096
|
command.response_class = Google::Apis::DriveV2::RevisionList
|
@@ -3274,7 +3099,6 @@ module Google
|
|
3274
3099
|
command.query['pageToken'] = page_token unless page_token.nil?
|
3275
3100
|
command.query['fields'] = fields unless fields.nil?
|
3276
3101
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3277
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3278
3102
|
execute_or_queue_command(command, &block)
|
3279
3103
|
end
|
3280
3104
|
|
@@ -3287,10 +3111,8 @@ module Google
|
|
3287
3111
|
# @param [String] fields
|
3288
3112
|
# Selector specifying which fields to include in a partial response.
|
3289
3113
|
# @param [String] quota_user
|
3290
|
-
#
|
3291
|
-
# characters.
|
3292
|
-
# @param [String] user_ip
|
3293
|
-
# Deprecated. Please use quotaUser instead.
|
3114
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3115
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3294
3116
|
# @param [Google::Apis::RequestOptions] options
|
3295
3117
|
# Request-specific options
|
3296
3118
|
#
|
@@ -3303,7 +3125,7 @@ module Google
|
|
3303
3125
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3304
3126
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3305
3127
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3306
|
-
def patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil,
|
3128
|
+
def patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
3307
3129
|
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
3308
3130
|
command.request_representation = Google::Apis::DriveV2::Revision::Representation
|
3309
3131
|
command.request_object = revision_object
|
@@ -3313,7 +3135,6 @@ module Google
|
|
3313
3135
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
3314
3136
|
command.query['fields'] = fields unless fields.nil?
|
3315
3137
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3316
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3317
3138
|
execute_or_queue_command(command, &block)
|
3318
3139
|
end
|
3319
3140
|
|
@@ -3326,10 +3147,8 @@ module Google
|
|
3326
3147
|
# @param [String] fields
|
3327
3148
|
# Selector specifying which fields to include in a partial response.
|
3328
3149
|
# @param [String] quota_user
|
3329
|
-
#
|
3330
|
-
# characters.
|
3331
|
-
# @param [String] user_ip
|
3332
|
-
# Deprecated. Please use quotaUser instead.
|
3150
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3151
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3333
3152
|
# @param [Google::Apis::RequestOptions] options
|
3334
3153
|
# Request-specific options
|
3335
3154
|
#
|
@@ -3342,7 +3161,7 @@ module Google
|
|
3342
3161
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3343
3162
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3344
3163
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3345
|
-
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil,
|
3164
|
+
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
3346
3165
|
command = make_simple_command(:put, 'files/{fileId}/revisions/{revisionId}', options)
|
3347
3166
|
command.request_representation = Google::Apis::DriveV2::Revision::Representation
|
3348
3167
|
command.request_object = revision_object
|
@@ -3352,20 +3171,17 @@ module Google
|
|
3352
3171
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
3353
3172
|
command.query['fields'] = fields unless fields.nil?
|
3354
3173
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3355
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3356
3174
|
execute_or_queue_command(command, &block)
|
3357
3175
|
end
|
3358
3176
|
|
3359
|
-
# Deprecated
|
3177
|
+
# Deprecated: Use `drives.delete` instead.
|
3360
3178
|
# @param [String] team_drive_id
|
3361
3179
|
# The ID of the Team Drive
|
3362
3180
|
# @param [String] fields
|
3363
3181
|
# Selector specifying which fields to include in a partial response.
|
3364
3182
|
# @param [String] quota_user
|
3365
|
-
#
|
3366
|
-
# characters.
|
3367
|
-
# @param [String] user_ip
|
3368
|
-
# Deprecated. Please use quotaUser instead.
|
3183
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3184
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3369
3185
|
# @param [Google::Apis::RequestOptions] options
|
3370
3186
|
# Request-specific options
|
3371
3187
|
#
|
@@ -3378,16 +3194,15 @@ module Google
|
|
3378
3194
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3379
3195
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3380
3196
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3381
|
-
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil,
|
3197
|
+
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
3382
3198
|
command = make_simple_command(:delete, 'teamdrives/{teamDriveId}', options)
|
3383
3199
|
command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
3384
3200
|
command.query['fields'] = fields unless fields.nil?
|
3385
3201
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3386
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3387
3202
|
execute_or_queue_command(command, &block)
|
3388
3203
|
end
|
3389
3204
|
|
3390
|
-
# Deprecated
|
3205
|
+
# Deprecated: Use `drives.get` instead.
|
3391
3206
|
# @param [String] team_drive_id
|
3392
3207
|
# The ID of the Team Drive
|
3393
3208
|
# @param [Boolean] use_domain_admin_access
|
@@ -3397,10 +3212,8 @@ module Google
|
|
3397
3212
|
# @param [String] fields
|
3398
3213
|
# Selector specifying which fields to include in a partial response.
|
3399
3214
|
# @param [String] quota_user
|
3400
|
-
#
|
3401
|
-
# characters.
|
3402
|
-
# @param [String] user_ip
|
3403
|
-
# Deprecated. Please use quotaUser instead.
|
3215
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3216
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3404
3217
|
# @param [Google::Apis::RequestOptions] options
|
3405
3218
|
# Request-specific options
|
3406
3219
|
#
|
@@ -3413,7 +3226,7 @@ module Google
|
|
3413
3226
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3414
3227
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3415
3228
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3416
|
-
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
3229
|
+
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
3417
3230
|
command = make_simple_command(:get, 'teamdrives/{teamDriveId}', options)
|
3418
3231
|
command.response_representation = Google::Apis::DriveV2::TeamDrive::Representation
|
3419
3232
|
command.response_class = Google::Apis::DriveV2::TeamDrive
|
@@ -3421,25 +3234,22 @@ module Google
|
|
3421
3234
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
3422
3235
|
command.query['fields'] = fields unless fields.nil?
|
3423
3236
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3424
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3425
3237
|
execute_or_queue_command(command, &block)
|
3426
3238
|
end
|
3427
3239
|
|
3428
|
-
# Deprecated
|
3240
|
+
# Deprecated: Use `drives.insert` instead.
|
3429
3241
|
# @param [String] request_id
|
3430
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
3431
|
-
# for idempotent creation of a Team Drive. A repeated request by the
|
3432
|
-
# and with the same request ID will avoid creating duplicates by
|
3433
|
-
# create the same Team Drive. If the Team Drive already exists a
|
3434
|
-
# be returned.
|
3242
|
+
# Required. An ID, such as a random UUID, which uniquely identifies this user's
|
3243
|
+
# request for idempotent creation of a Team Drive. A repeated request by the
|
3244
|
+
# same user and with the same request ID will avoid creating duplicates by
|
3245
|
+
# attempting to create the same Team Drive. If the Team Drive already exists a
|
3246
|
+
# 409 error will be returned.
|
3435
3247
|
# @param [Google::Apis::DriveV2::TeamDrive] team_drive_object
|
3436
3248
|
# @param [String] fields
|
3437
3249
|
# Selector specifying which fields to include in a partial response.
|
3438
3250
|
# @param [String] quota_user
|
3439
|
-
#
|
3440
|
-
# characters.
|
3441
|
-
# @param [String] user_ip
|
3442
|
-
# Deprecated. Please use quotaUser instead.
|
3251
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3252
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3443
3253
|
# @param [Google::Apis::RequestOptions] options
|
3444
3254
|
# Request-specific options
|
3445
3255
|
#
|
@@ -3452,7 +3262,7 @@ module Google
|
|
3452
3262
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3453
3263
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3454
3264
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3455
|
-
def insert_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil,
|
3265
|
+
def insert_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
3456
3266
|
command = make_simple_command(:post, 'teamdrives', options)
|
3457
3267
|
command.request_representation = Google::Apis::DriveV2::TeamDrive::Representation
|
3458
3268
|
command.request_object = team_drive_object
|
@@ -3461,11 +3271,10 @@ module Google
|
|
3461
3271
|
command.query['requestId'] = request_id unless request_id.nil?
|
3462
3272
|
command.query['fields'] = fields unless fields.nil?
|
3463
3273
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3464
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3465
3274
|
execute_or_queue_command(command, &block)
|
3466
3275
|
end
|
3467
3276
|
|
3468
|
-
# Deprecated
|
3277
|
+
# Deprecated: Use `drives.list` instead.
|
3469
3278
|
# @param [Fixnum] max_results
|
3470
3279
|
# Maximum number of Team Drives to return.
|
3471
3280
|
# @param [String] page_token
|
@@ -3478,10 +3287,8 @@ module Google
|
|
3478
3287
|
# @param [String] fields
|
3479
3288
|
# Selector specifying which fields to include in a partial response.
|
3480
3289
|
# @param [String] quota_user
|
3481
|
-
#
|
3482
|
-
# characters.
|
3483
|
-
# @param [String] user_ip
|
3484
|
-
# Deprecated. Please use quotaUser instead.
|
3290
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3291
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3485
3292
|
# @param [Google::Apis::RequestOptions] options
|
3486
3293
|
# Request-specific options
|
3487
3294
|
#
|
@@ -3494,7 +3301,7 @@ module Google
|
|
3494
3301
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3495
3302
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3496
3303
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3497
|
-
def list_teamdrives(max_results: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
3304
|
+
def list_teamdrives(max_results: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
3498
3305
|
command = make_simple_command(:get, 'teamdrives', options)
|
3499
3306
|
command.response_representation = Google::Apis::DriveV2::TeamDriveList::Representation
|
3500
3307
|
command.response_class = Google::Apis::DriveV2::TeamDriveList
|
@@ -3504,11 +3311,10 @@ module Google
|
|
3504
3311
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
3505
3312
|
command.query['fields'] = fields unless fields.nil?
|
3506
3313
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3507
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3508
3314
|
execute_or_queue_command(command, &block)
|
3509
3315
|
end
|
3510
3316
|
|
3511
|
-
# Deprecated
|
3317
|
+
# Deprecated: Use `drives.update` instead.
|
3512
3318
|
# @param [String] team_drive_id
|
3513
3319
|
# The ID of the Team Drive
|
3514
3320
|
# @param [Google::Apis::DriveV2::TeamDrive] team_drive_object
|
@@ -3519,10 +3325,8 @@ module Google
|
|
3519
3325
|
# @param [String] fields
|
3520
3326
|
# Selector specifying which fields to include in a partial response.
|
3521
3327
|
# @param [String] quota_user
|
3522
|
-
#
|
3523
|
-
# characters.
|
3524
|
-
# @param [String] user_ip
|
3525
|
-
# Deprecated. Please use quotaUser instead.
|
3328
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3329
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3526
3330
|
# @param [Google::Apis::RequestOptions] options
|
3527
3331
|
# Request-specific options
|
3528
3332
|
#
|
@@ -3535,7 +3339,7 @@ module Google
|
|
3535
3339
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3536
3340
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3537
3341
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3538
|
-
def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
3342
|
+
def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
3539
3343
|
command = make_simple_command(:put, 'teamdrives/{teamDriveId}', options)
|
3540
3344
|
command.request_representation = Google::Apis::DriveV2::TeamDrive::Representation
|
3541
3345
|
command.request_object = team_drive_object
|
@@ -3545,7 +3349,6 @@ module Google
|
|
3545
3349
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
3546
3350
|
command.query['fields'] = fields unless fields.nil?
|
3547
3351
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3548
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3549
3352
|
execute_or_queue_command(command, &block)
|
3550
3353
|
end
|
3551
3354
|
|
@@ -3554,7 +3357,6 @@ module Google
|
|
3554
3357
|
def apply_command_defaults(command)
|
3555
3358
|
command.query['key'] = key unless key.nil?
|
3556
3359
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3557
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
3558
3360
|
end
|
3559
3361
|
end
|
3560
3362
|
end
|