google-apis-drive_v3 0.30.0 → 0.61.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 +129 -0
- data/OVERVIEW.md +5 -5
- data/lib/google/apis/drive_v3/classes.rb +1117 -470
- data/lib/google/apis/drive_v3/gem_version.rb +3 -3
- data/lib/google/apis/drive_v3/representations.rb +191 -0
- data/lib/google/apis/drive_v3/service.rb +716 -438
- data/lib/google/apis/drive_v3.rb +9 -4
- metadata +11 -11
@@ -20,10 +20,9 @@ require 'google/apis/errors'
|
|
20
20
|
module Google
|
21
21
|
module Apis
|
22
22
|
module DriveV3
|
23
|
-
# Drive API
|
23
|
+
# Google Drive API
|
24
24
|
#
|
25
|
-
#
|
26
|
-
# changes, and updating sharing permissions.
|
25
|
+
# The Google Drive API allows clients to access resources from Google Drive.
|
27
26
|
#
|
28
27
|
# @example
|
29
28
|
# require 'google/apis/drive_v3'
|
@@ -33,35 +32,35 @@ module Google
|
|
33
32
|
#
|
34
33
|
# @see https://developers.google.com/drive/
|
35
34
|
class DriveService < Google::Apis::Core::BaseService
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://www.$UNIVERSE_DOMAIN$/"
|
36
|
+
|
36
37
|
# @return [String]
|
37
38
|
# API key. Your API key identifies your project and provides you with API access,
|
38
39
|
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
40
|
attr_accessor :key
|
40
41
|
|
41
42
|
# @return [String]
|
42
|
-
#
|
43
|
-
# characters.
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
45
|
attr_accessor :quota_user
|
45
46
|
|
46
|
-
# @return [String]
|
47
|
-
# Deprecated. Please use quotaUser instead.
|
48
|
-
attr_accessor :user_ip
|
49
|
-
|
50
47
|
def initialize
|
51
|
-
super(
|
48
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, 'drive/v3/',
|
52
49
|
client_name: 'google-apis-drive_v3',
|
53
50
|
client_version: Google::Apis::DriveV3::GEM_VERSION)
|
54
51
|
@batch_path = 'batch/drive/v3'
|
55
52
|
end
|
56
53
|
|
57
54
|
# Gets information about the user, the user's Drive, and system capabilities.
|
55
|
+
# For more information, see [Return user info](https://developers.google.com/
|
56
|
+
# drive/api/guides/user-info). Required: The `fields` parameter must be set. To
|
57
|
+
# return the exact fields you need, see [Return specific fields](https://
|
58
|
+
# developers.google.com/drive/api/guides/fields-parameter).
|
58
59
|
# @param [String] fields
|
59
60
|
# Selector specifying which fields to include in a partial response.
|
60
61
|
# @param [String] quota_user
|
61
|
-
#
|
62
|
-
# characters.
|
63
|
-
# @param [String] user_ip
|
64
|
-
# Deprecated. Please use quotaUser instead.
|
62
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
63
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
64
|
# @param [Google::Apis::RequestOptions] options
|
66
65
|
# Request-specific options
|
67
66
|
#
|
@@ -74,33 +73,211 @@ module Google
|
|
74
73
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
74
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
75
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
-
def get_about(fields: nil, quota_user: nil,
|
76
|
+
def get_about(fields: nil, quota_user: nil, options: nil, &block)
|
78
77
|
command = make_simple_command(:get, 'about', options)
|
79
78
|
command.response_representation = Google::Apis::DriveV3::About::Representation
|
80
79
|
command.response_class = Google::Apis::DriveV3::About
|
81
80
|
command.query['fields'] = fields unless fields.nil?
|
82
81
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
84
82
|
execute_or_queue_command(command, &block)
|
85
83
|
end
|
86
84
|
|
87
|
-
#
|
85
|
+
# Retrieves an AccessProposal by ID.
|
86
|
+
# @param [String] file_id
|
87
|
+
# Required. The id of the item the request is on.
|
88
|
+
# @param [String] proposal_id
|
89
|
+
# Required. The id of the access proposal to resolve.
|
90
|
+
# @param [String] fields
|
91
|
+
# Selector specifying which fields to include in a partial response.
|
92
|
+
# @param [String] quota_user
|
93
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
94
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
95
|
+
# @param [Google::Apis::RequestOptions] options
|
96
|
+
# Request-specific options
|
97
|
+
#
|
98
|
+
# @yield [result, err] Result & error if block supplied
|
99
|
+
# @yieldparam result [Google::Apis::DriveV3::AccessProposal] parsed result object
|
100
|
+
# @yieldparam err [StandardError] error object if request failed
|
101
|
+
#
|
102
|
+
# @return [Google::Apis::DriveV3::AccessProposal]
|
103
|
+
#
|
104
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
105
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
106
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
107
|
+
def get_accessproposal(file_id, proposal_id, fields: nil, quota_user: nil, options: nil, &block)
|
108
|
+
command = make_simple_command(:get, 'files/{fileId}/accessproposals/{proposalId}', options)
|
109
|
+
command.response_representation = Google::Apis::DriveV3::AccessProposal::Representation
|
110
|
+
command.response_class = Google::Apis::DriveV3::AccessProposal
|
111
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
112
|
+
command.params['proposalId'] = proposal_id unless proposal_id.nil?
|
113
|
+
command.query['fields'] = fields unless fields.nil?
|
114
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
115
|
+
execute_or_queue_command(command, &block)
|
116
|
+
end
|
117
|
+
|
118
|
+
# List the AccessProposals on a file. Note: Only approvers are able to list
|
119
|
+
# AccessProposals on a file. If the user is not an approver, returns a 403.
|
120
|
+
# @param [String] file_id
|
121
|
+
# Required. The id of the item the request is on.
|
122
|
+
# @param [Fixnum] page_size
|
123
|
+
# Optional. The number of results per page
|
124
|
+
# @param [String] page_token
|
125
|
+
# Optional. The continuation token on the list of access requests.
|
126
|
+
# @param [String] fields
|
127
|
+
# Selector specifying which fields to include in a partial response.
|
128
|
+
# @param [String] quota_user
|
129
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
130
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
131
|
+
# @param [Google::Apis::RequestOptions] options
|
132
|
+
# Request-specific options
|
133
|
+
#
|
134
|
+
# @yield [result, err] Result & error if block supplied
|
135
|
+
# @yieldparam result [Google::Apis::DriveV3::ListAccessProposalsResponse] parsed result object
|
136
|
+
# @yieldparam err [StandardError] error object if request failed
|
137
|
+
#
|
138
|
+
# @return [Google::Apis::DriveV3::ListAccessProposalsResponse]
|
139
|
+
#
|
140
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
141
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
142
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
143
|
+
def list_accessproposals(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
144
|
+
command = make_simple_command(:get, 'files/{fileId}/accessproposals', options)
|
145
|
+
command.response_representation = Google::Apis::DriveV3::ListAccessProposalsResponse::Representation
|
146
|
+
command.response_class = Google::Apis::DriveV3::ListAccessProposalsResponse
|
147
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
148
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
149
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
150
|
+
command.query['fields'] = fields unless fields.nil?
|
151
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
152
|
+
execute_or_queue_command(command, &block)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Used to approve or deny an Access Proposal.
|
156
|
+
# @param [String] file_id
|
157
|
+
# Required. The id of the item the request is on.
|
158
|
+
# @param [String] proposal_id
|
159
|
+
# Required. The id of the access proposal to resolve.
|
160
|
+
# @param [Google::Apis::DriveV3::ResolveAccessProposalRequest] resolve_access_proposal_request_object
|
161
|
+
# @param [String] fields
|
162
|
+
# Selector specifying which fields to include in a partial response.
|
163
|
+
# @param [String] quota_user
|
164
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
165
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
166
|
+
# @param [Google::Apis::RequestOptions] options
|
167
|
+
# Request-specific options
|
168
|
+
#
|
169
|
+
# @yield [result, err] Result & error if block supplied
|
170
|
+
# @yieldparam result [NilClass] No result returned for this method
|
171
|
+
# @yieldparam err [StandardError] error object if request failed
|
172
|
+
#
|
173
|
+
# @return [void]
|
174
|
+
#
|
175
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
176
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
177
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
178
|
+
def resolve_accessproposal_access_proposal(file_id, proposal_id, resolve_access_proposal_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
179
|
+
command = make_simple_command(:post, 'files/{fileId}/accessproposals/{proposalId}:resolve', options)
|
180
|
+
command.request_representation = Google::Apis::DriveV3::ResolveAccessProposalRequest::Representation
|
181
|
+
command.request_object = resolve_access_proposal_request_object
|
182
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
183
|
+
command.params['proposalId'] = proposal_id unless proposal_id.nil?
|
184
|
+
command.query['fields'] = fields unless fields.nil?
|
185
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
186
|
+
execute_or_queue_command(command, &block)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Gets a specific app. For more information, see [Return user info](https://
|
190
|
+
# developers.google.com/drive/api/guides/user-info).
|
191
|
+
# @param [String] app_id
|
192
|
+
# The ID of the app.
|
193
|
+
# @param [String] fields
|
194
|
+
# Selector specifying which fields to include in a partial response.
|
195
|
+
# @param [String] quota_user
|
196
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
197
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
198
|
+
# @param [Google::Apis::RequestOptions] options
|
199
|
+
# Request-specific options
|
200
|
+
#
|
201
|
+
# @yield [result, err] Result & error if block supplied
|
202
|
+
# @yieldparam result [Google::Apis::DriveV3::App] parsed result object
|
203
|
+
# @yieldparam err [StandardError] error object if request failed
|
204
|
+
#
|
205
|
+
# @return [Google::Apis::DriveV3::App]
|
206
|
+
#
|
207
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
208
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
209
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
210
|
+
def get_app(app_id, fields: nil, quota_user: nil, options: nil, &block)
|
211
|
+
command = make_simple_command(:get, 'apps/{appId}', options)
|
212
|
+
command.response_representation = Google::Apis::DriveV3::App::Representation
|
213
|
+
command.response_class = Google::Apis::DriveV3::App
|
214
|
+
command.params['appId'] = app_id unless app_id.nil?
|
215
|
+
command.query['fields'] = fields unless fields.nil?
|
216
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
217
|
+
execute_or_queue_command(command, &block)
|
218
|
+
end
|
219
|
+
|
220
|
+
# Lists a user's installed apps. For more information, see [Return user info](
|
221
|
+
# https://developers.google.com/drive/api/guides/user-info).
|
222
|
+
# @param [String] app_filter_extensions
|
223
|
+
# A comma-separated list of file extensions to limit returned results. All
|
224
|
+
# results within the given app query scope which can open any of the given file
|
225
|
+
# extensions are included in the response. If `appFilterMimeTypes` are provided
|
226
|
+
# as well, the result is a union of the two resulting app lists.
|
227
|
+
# @param [String] app_filter_mime_types
|
228
|
+
# A comma-separated list of file extensions to limit returned results. All
|
229
|
+
# results within the given app query scope which can open any of the given MIME
|
230
|
+
# types will be included in the response. If `appFilterExtensions` are provided
|
231
|
+
# as well, the result is a union of the two resulting app lists.
|
232
|
+
# @param [String] language_code
|
233
|
+
# A language or locale code, as defined by BCP 47, with some extensions from
|
234
|
+
# Unicode's LDML format (http://www.unicode.org/reports/tr35/).
|
235
|
+
# @param [String] fields
|
236
|
+
# Selector specifying which fields to include in a partial response.
|
237
|
+
# @param [String] quota_user
|
238
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
239
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
240
|
+
# @param [Google::Apis::RequestOptions] options
|
241
|
+
# Request-specific options
|
242
|
+
#
|
243
|
+
# @yield [result, err] Result & error if block supplied
|
244
|
+
# @yieldparam result [Google::Apis::DriveV3::AppList] parsed result object
|
245
|
+
# @yieldparam err [StandardError] error object if request failed
|
246
|
+
#
|
247
|
+
# @return [Google::Apis::DriveV3::AppList]
|
248
|
+
#
|
249
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
250
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
251
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
252
|
+
def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
|
253
|
+
command = make_simple_command(:get, 'apps', options)
|
254
|
+
command.response_representation = Google::Apis::DriveV3::AppList::Representation
|
255
|
+
command.response_class = Google::Apis::DriveV3::AppList
|
256
|
+
command.query['appFilterExtensions'] = app_filter_extensions unless app_filter_extensions.nil?
|
257
|
+
command.query['appFilterMimeTypes'] = app_filter_mime_types unless app_filter_mime_types.nil?
|
258
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
259
|
+
command.query['fields'] = fields unless fields.nil?
|
260
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
261
|
+
execute_or_queue_command(command, &block)
|
262
|
+
end
|
263
|
+
|
264
|
+
# Gets the starting pageToken for listing future changes. For more information,
|
265
|
+
# see [Retrieve changes](https://developers.google.com/drive/api/guides/manage-
|
266
|
+
# changes).
|
88
267
|
# @param [String] drive_id
|
89
268
|
# The ID of the shared drive for which the starting pageToken for listing future
|
90
|
-
# changes from that shared drive
|
269
|
+
# changes from that shared drive will be returned.
|
91
270
|
# @param [Boolean] supports_all_drives
|
92
271
|
# Whether the requesting application supports both My Drives and shared drives.
|
93
272
|
# @param [Boolean] supports_team_drives
|
94
|
-
# Deprecated
|
273
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
95
274
|
# @param [String] team_drive_id
|
96
|
-
# Deprecated
|
275
|
+
# Deprecated: Use `driveId` instead.
|
97
276
|
# @param [String] fields
|
98
277
|
# Selector specifying which fields to include in a partial response.
|
99
278
|
# @param [String] quota_user
|
100
|
-
#
|
101
|
-
# characters.
|
102
|
-
# @param [String] user_ip
|
103
|
-
# Deprecated. Please use quotaUser instead.
|
279
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
280
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
104
281
|
# @param [Google::Apis::RequestOptions] options
|
105
282
|
# Request-specific options
|
106
283
|
#
|
@@ -113,7 +290,7 @@ module Google
|
|
113
290
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
291
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
292
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
-
def get_changes_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
293
|
+
def get_changes_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
117
294
|
command = make_simple_command(:get, 'changes/startPageToken', options)
|
118
295
|
command.response_representation = Google::Apis::DriveV3::StartPageToken::Representation
|
119
296
|
command.response_class = Google::Apis::DriveV3::StartPageToken
|
@@ -123,19 +300,20 @@ module Google
|
|
123
300
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
124
301
|
command.query['fields'] = fields unless fields.nil?
|
125
302
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
126
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
127
303
|
execute_or_queue_command(command, &block)
|
128
304
|
end
|
129
305
|
|
130
|
-
# Lists the changes for a user or shared drive.
|
306
|
+
# Lists the changes for a user or shared drive. For more information, see [
|
307
|
+
# Retrieve changes](https://developers.google.com/drive/api/guides/manage-
|
308
|
+
# changes).
|
131
309
|
# @param [String] page_token
|
132
310
|
# The token for continuing a previous list request on the next page. This should
|
133
311
|
# be set to the value of 'nextPageToken' from the previous response or to the
|
134
312
|
# response from the getStartPageToken method.
|
135
313
|
# @param [String] drive_id
|
136
|
-
# The shared drive from which changes
|
137
|
-
# will be reflective of the shared drive; use the combined drive ID and
|
138
|
-
# ID as an identifier.
|
314
|
+
# The shared drive from which changes will be returned. If specified the change
|
315
|
+
# IDs will be reflective of the shared drive; use the combined drive ID and
|
316
|
+
# change ID as an identifier.
|
139
317
|
# @param [Boolean] include_corpus_removals
|
140
318
|
# Whether changes should include the file resource if the file is still
|
141
319
|
# accessible by the user at the time of the request, even when a file was
|
@@ -144,7 +322,7 @@ module Google
|
|
144
322
|
# @param [Boolean] include_items_from_all_drives
|
145
323
|
# Whether both My Drive and shared drive items should be included in results.
|
146
324
|
# @param [String] include_labels
|
147
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
325
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
148
326
|
# the response.
|
149
327
|
# @param [String] include_permissions_for_view
|
150
328
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -153,7 +331,7 @@ module Google
|
|
153
331
|
# Whether to include changes indicating that items have been removed from the
|
154
332
|
# list of changes, for example by deletion or loss of access.
|
155
333
|
# @param [Boolean] include_team_drive_items
|
156
|
-
# Deprecated
|
334
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
157
335
|
# @param [Fixnum] page_size
|
158
336
|
# The maximum number of changes to return per page.
|
159
337
|
# @param [Boolean] restrict_to_my_drive
|
@@ -161,21 +339,19 @@ module Google
|
|
161
339
|
# omits changes to files such as those in the Application Data folder or shared
|
162
340
|
# files which have not been added to My Drive.
|
163
341
|
# @param [String] spaces
|
164
|
-
# A comma-separated list of spaces to query within the
|
165
|
-
#
|
342
|
+
# A comma-separated list of spaces to query within the corpora. Supported values
|
343
|
+
# are 'drive' and 'appDataFolder'.
|
166
344
|
# @param [Boolean] supports_all_drives
|
167
345
|
# Whether the requesting application supports both My Drives and shared drives.
|
168
346
|
# @param [Boolean] supports_team_drives
|
169
|
-
# Deprecated
|
347
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
170
348
|
# @param [String] team_drive_id
|
171
|
-
# Deprecated
|
349
|
+
# Deprecated: Use `driveId` instead.
|
172
350
|
# @param [String] fields
|
173
351
|
# Selector specifying which fields to include in a partial response.
|
174
352
|
# @param [String] quota_user
|
175
|
-
#
|
176
|
-
# characters.
|
177
|
-
# @param [String] user_ip
|
178
|
-
# Deprecated. Please use quotaUser instead.
|
353
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
354
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
179
355
|
# @param [Google::Apis::RequestOptions] options
|
180
356
|
# Request-specific options
|
181
357
|
#
|
@@ -188,7 +364,7 @@ module Google
|
|
188
364
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
189
365
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
190
366
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
191
|
-
def list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
367
|
+
def list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
192
368
|
command = make_simple_command(:get, 'changes', options)
|
193
369
|
command.response_representation = Google::Apis::DriveV3::ChangeList::Representation
|
194
370
|
command.response_class = Google::Apis::DriveV3::ChangeList
|
@@ -208,20 +384,20 @@ module Google
|
|
208
384
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
209
385
|
command.query['fields'] = fields unless fields.nil?
|
210
386
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
211
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
212
387
|
execute_or_queue_command(command, &block)
|
213
388
|
end
|
214
389
|
|
215
|
-
# Subscribes to changes for a user.
|
390
|
+
# Subscribes to changes for a user. For more information, see [Notifications for
|
391
|
+
# resource changes](https://developers.google.com/drive/api/guides/push).
|
216
392
|
# @param [String] page_token
|
217
393
|
# The token for continuing a previous list request on the next page. This should
|
218
394
|
# be set to the value of 'nextPageToken' from the previous response or to the
|
219
395
|
# response from the getStartPageToken method.
|
220
396
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
221
397
|
# @param [String] drive_id
|
222
|
-
# The shared drive from which changes
|
223
|
-
# will be reflective of the shared drive; use the combined drive ID and
|
224
|
-
# ID as an identifier.
|
398
|
+
# The shared drive from which changes will be returned. If specified the change
|
399
|
+
# IDs will be reflective of the shared drive; use the combined drive ID and
|
400
|
+
# change ID as an identifier.
|
225
401
|
# @param [Boolean] include_corpus_removals
|
226
402
|
# Whether changes should include the file resource if the file is still
|
227
403
|
# accessible by the user at the time of the request, even when a file was
|
@@ -230,7 +406,7 @@ module Google
|
|
230
406
|
# @param [Boolean] include_items_from_all_drives
|
231
407
|
# Whether both My Drive and shared drive items should be included in results.
|
232
408
|
# @param [String] include_labels
|
233
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
409
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
234
410
|
# the response.
|
235
411
|
# @param [String] include_permissions_for_view
|
236
412
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -239,7 +415,7 @@ module Google
|
|
239
415
|
# Whether to include changes indicating that items have been removed from the
|
240
416
|
# list of changes, for example by deletion or loss of access.
|
241
417
|
# @param [Boolean] include_team_drive_items
|
242
|
-
# Deprecated
|
418
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
243
419
|
# @param [Fixnum] page_size
|
244
420
|
# The maximum number of changes to return per page.
|
245
421
|
# @param [Boolean] restrict_to_my_drive
|
@@ -247,21 +423,19 @@ module Google
|
|
247
423
|
# omits changes to files such as those in the Application Data folder or shared
|
248
424
|
# files which have not been added to My Drive.
|
249
425
|
# @param [String] spaces
|
250
|
-
# A comma-separated list of spaces to query within the
|
251
|
-
#
|
426
|
+
# A comma-separated list of spaces to query within the corpora. Supported values
|
427
|
+
# are 'drive' and 'appDataFolder'.
|
252
428
|
# @param [Boolean] supports_all_drives
|
253
429
|
# Whether the requesting application supports both My Drives and shared drives.
|
254
430
|
# @param [Boolean] supports_team_drives
|
255
|
-
# Deprecated
|
431
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
256
432
|
# @param [String] team_drive_id
|
257
|
-
# Deprecated
|
433
|
+
# Deprecated: Use `driveId` instead.
|
258
434
|
# @param [String] fields
|
259
435
|
# Selector specifying which fields to include in a partial response.
|
260
436
|
# @param [String] quota_user
|
261
|
-
#
|
262
|
-
# characters.
|
263
|
-
# @param [String] user_ip
|
264
|
-
# Deprecated. Please use quotaUser instead.
|
437
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
438
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
265
439
|
# @param [Google::Apis::RequestOptions] options
|
266
440
|
# Request-specific options
|
267
441
|
#
|
@@ -274,7 +448,7 @@ module Google
|
|
274
448
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
275
449
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
276
450
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
277
|
-
def watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
451
|
+
def watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
278
452
|
command = make_simple_command(:post, 'changes/watch', options)
|
279
453
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
280
454
|
command.request_object = channel_object
|
@@ -296,19 +470,18 @@ module Google
|
|
296
470
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
297
471
|
command.query['fields'] = fields unless fields.nil?
|
298
472
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
299
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
300
473
|
execute_or_queue_command(command, &block)
|
301
474
|
end
|
302
475
|
|
303
|
-
#
|
476
|
+
# Stops watching resources through this channel. For more information, see [
|
477
|
+
# Notifications for resource changes](https://developers.google.com/drive/api/
|
478
|
+
# guides/push).
|
304
479
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
305
480
|
# @param [String] fields
|
306
481
|
# Selector specifying which fields to include in a partial response.
|
307
482
|
# @param [String] quota_user
|
308
|
-
#
|
309
|
-
# characters.
|
310
|
-
# @param [String] user_ip
|
311
|
-
# Deprecated. Please use quotaUser instead.
|
483
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
484
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
312
485
|
# @param [Google::Apis::RequestOptions] options
|
313
486
|
# Request-specific options
|
314
487
|
#
|
@@ -321,27 +494,28 @@ module Google
|
|
321
494
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
322
495
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
323
496
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
324
|
-
def stop_channel(channel_object = nil, fields: nil, quota_user: nil,
|
497
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
325
498
|
command = make_simple_command(:post, 'channels/stop', options)
|
326
499
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
327
500
|
command.request_object = channel_object
|
328
501
|
command.query['fields'] = fields unless fields.nil?
|
329
502
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
330
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
331
503
|
execute_or_queue_command(command, &block)
|
332
504
|
end
|
333
505
|
|
334
|
-
# Creates a
|
506
|
+
# Creates a comment on a file. For more information, see [Manage comments and
|
507
|
+
# replies](https://developers.google.com/drive/api/guides/manage-comments).
|
508
|
+
# Required: The `fields` parameter must be set. To return the exact fields you
|
509
|
+
# need, see [Return specific fields](https://developers.google.com/drive/api/
|
510
|
+
# guides/fields-parameter).
|
335
511
|
# @param [String] file_id
|
336
512
|
# The ID of the file.
|
337
513
|
# @param [Google::Apis::DriveV3::Comment] comment_object
|
338
514
|
# @param [String] fields
|
339
515
|
# Selector specifying which fields to include in a partial response.
|
340
516
|
# @param [String] quota_user
|
341
|
-
#
|
342
|
-
# characters.
|
343
|
-
# @param [String] user_ip
|
344
|
-
# Deprecated. Please use quotaUser instead.
|
517
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
518
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
345
519
|
# @param [Google::Apis::RequestOptions] options
|
346
520
|
# Request-specific options
|
347
521
|
#
|
@@ -354,7 +528,7 @@ module Google
|
|
354
528
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
355
529
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
356
530
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
357
|
-
def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil,
|
531
|
+
def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
358
532
|
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
359
533
|
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
360
534
|
command.request_object = comment_object
|
@@ -363,11 +537,14 @@ module Google
|
|
363
537
|
command.params['fileId'] = file_id unless file_id.nil?
|
364
538
|
command.query['fields'] = fields unless fields.nil?
|
365
539
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
366
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
367
540
|
execute_or_queue_command(command, &block)
|
368
541
|
end
|
369
542
|
|
370
|
-
# Deletes a comment.
|
543
|
+
# Deletes a comment. For more information, see [Manage comments and replies](
|
544
|
+
# https://developers.google.com/drive/api/guides/manage-comments). Required: The
|
545
|
+
# `fields` parameter must be set. To return the exact fields you need, see [
|
546
|
+
# Return specific fields](https://developers.google.com/drive/api/guides/fields-
|
547
|
+
# parameter).
|
371
548
|
# @param [String] file_id
|
372
549
|
# The ID of the file.
|
373
550
|
# @param [String] comment_id
|
@@ -375,10 +552,8 @@ module Google
|
|
375
552
|
# @param [String] fields
|
376
553
|
# Selector specifying which fields to include in a partial response.
|
377
554
|
# @param [String] quota_user
|
378
|
-
#
|
379
|
-
# characters.
|
380
|
-
# @param [String] user_ip
|
381
|
-
# Deprecated. Please use quotaUser instead.
|
555
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
556
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
382
557
|
# @param [Google::Apis::RequestOptions] options
|
383
558
|
# Request-specific options
|
384
559
|
#
|
@@ -391,17 +566,20 @@ module Google
|
|
391
566
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
392
567
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
393
568
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
394
|
-
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil,
|
569
|
+
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
|
395
570
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
396
571
|
command.params['fileId'] = file_id unless file_id.nil?
|
397
572
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
398
573
|
command.query['fields'] = fields unless fields.nil?
|
399
574
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
400
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
401
575
|
execute_or_queue_command(command, &block)
|
402
576
|
end
|
403
577
|
|
404
|
-
# Gets a comment by ID.
|
578
|
+
# Gets a comment by ID. For more information, see [Manage comments and replies](
|
579
|
+
# https://developers.google.com/drive/api/guides/manage-comments). Required: The
|
580
|
+
# `fields` parameter must be set. To return the exact fields you need, see [
|
581
|
+
# Return specific fields](https://developers.google.com/drive/api/guides/fields-
|
582
|
+
# parameter).
|
405
583
|
# @param [String] file_id
|
406
584
|
# The ID of the file.
|
407
585
|
# @param [String] comment_id
|
@@ -412,10 +590,8 @@ module Google
|
|
412
590
|
# @param [String] fields
|
413
591
|
# Selector specifying which fields to include in a partial response.
|
414
592
|
# @param [String] quota_user
|
415
|
-
#
|
416
|
-
# characters.
|
417
|
-
# @param [String] user_ip
|
418
|
-
# Deprecated. Please use quotaUser instead.
|
593
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
594
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
419
595
|
# @param [Google::Apis::RequestOptions] options
|
420
596
|
# Request-specific options
|
421
597
|
#
|
@@ -428,7 +604,7 @@ module Google
|
|
428
604
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
429
605
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
430
606
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
431
|
-
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil,
|
607
|
+
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
432
608
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
433
609
|
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
434
610
|
command.response_class = Google::Apis::DriveV3::Comment
|
@@ -437,11 +613,14 @@ module Google
|
|
437
613
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
438
614
|
command.query['fields'] = fields unless fields.nil?
|
439
615
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
440
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
441
616
|
execute_or_queue_command(command, &block)
|
442
617
|
end
|
443
618
|
|
444
|
-
# Lists a file's comments.
|
619
|
+
# Lists a file's comments. For more information, see [Manage comments and
|
620
|
+
# replies](https://developers.google.com/drive/api/guides/manage-comments).
|
621
|
+
# Required: The `fields` parameter must be set. To return the exact fields you
|
622
|
+
# need, see [Return specific fields](https://developers.google.com/drive/api/
|
623
|
+
# guides/fields-parameter).
|
445
624
|
# @param [String] file_id
|
446
625
|
# The ID of the file.
|
447
626
|
# @param [Boolean] include_deleted
|
@@ -458,10 +637,8 @@ module Google
|
|
458
637
|
# @param [String] fields
|
459
638
|
# Selector specifying which fields to include in a partial response.
|
460
639
|
# @param [String] quota_user
|
461
|
-
#
|
462
|
-
# characters.
|
463
|
-
# @param [String] user_ip
|
464
|
-
# Deprecated. Please use quotaUser instead.
|
640
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
641
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
465
642
|
# @param [Google::Apis::RequestOptions] options
|
466
643
|
# Request-specific options
|
467
644
|
#
|
@@ -474,7 +651,7 @@ module Google
|
|
474
651
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
475
652
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
476
653
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
477
|
-
def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil,
|
654
|
+
def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
478
655
|
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
479
656
|
command.response_representation = Google::Apis::DriveV3::CommentList::Representation
|
480
657
|
command.response_class = Google::Apis::DriveV3::CommentList
|
@@ -485,11 +662,14 @@ module Google
|
|
485
662
|
command.query['startModifiedTime'] = start_modified_time unless start_modified_time.nil?
|
486
663
|
command.query['fields'] = fields unless fields.nil?
|
487
664
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
488
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
489
665
|
execute_or_queue_command(command, &block)
|
490
666
|
end
|
491
667
|
|
492
|
-
# Updates a comment with patch semantics.
|
668
|
+
# Updates a comment with patch semantics. For more information, see [Manage
|
669
|
+
# comments and replies](https://developers.google.com/drive/api/guides/manage-
|
670
|
+
# comments). Required: The `fields` parameter must be set. To return the exact
|
671
|
+
# fields you need, see [Return specific fields](https://developers.google.com/
|
672
|
+
# drive/api/guides/fields-parameter).
|
493
673
|
# @param [String] file_id
|
494
674
|
# The ID of the file.
|
495
675
|
# @param [String] comment_id
|
@@ -498,10 +678,8 @@ module Google
|
|
498
678
|
# @param [String] fields
|
499
679
|
# Selector specifying which fields to include in a partial response.
|
500
680
|
# @param [String] quota_user
|
501
|
-
#
|
502
|
-
# characters.
|
503
|
-
# @param [String] user_ip
|
504
|
-
# Deprecated. Please use quotaUser instead.
|
681
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
682
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
505
683
|
# @param [Google::Apis::RequestOptions] options
|
506
684
|
# Request-specific options
|
507
685
|
#
|
@@ -514,7 +692,7 @@ module Google
|
|
514
692
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
515
693
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
516
694
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
517
|
-
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil,
|
695
|
+
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
518
696
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
519
697
|
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
520
698
|
command.request_object = comment_object
|
@@ -524,25 +702,22 @@ module Google
|
|
524
702
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
525
703
|
command.query['fields'] = fields unless fields.nil?
|
526
704
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
527
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
528
705
|
execute_or_queue_command(command, &block)
|
529
706
|
end
|
530
707
|
|
531
|
-
# Creates a
|
708
|
+
# Creates a shared drive.
|
532
709
|
# @param [String] request_id
|
533
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
534
|
-
# for idempotent creation of a shared drive. A repeated request by the
|
535
|
-
# and with the same request ID will avoid creating duplicates by
|
536
|
-
# create the same shared drive. If the shared drive already exists
|
537
|
-
# will be returned.
|
710
|
+
# Required. An ID, such as a random UUID, which uniquely identifies this user's
|
711
|
+
# request for idempotent creation of a shared drive. A repeated request by the
|
712
|
+
# same user and with the same request ID will avoid creating duplicates by
|
713
|
+
# attempting to create the same shared drive. If the shared drive already exists
|
714
|
+
# a 409 error will be returned.
|
538
715
|
# @param [Google::Apis::DriveV3::Drive] drive_object
|
539
716
|
# @param [String] fields
|
540
717
|
# Selector specifying which fields to include in a partial response.
|
541
718
|
# @param [String] quota_user
|
542
|
-
#
|
543
|
-
# characters.
|
544
|
-
# @param [String] user_ip
|
545
|
-
# Deprecated. Please use quotaUser instead.
|
719
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
720
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
546
721
|
# @param [Google::Apis::RequestOptions] options
|
547
722
|
# Request-specific options
|
548
723
|
#
|
@@ -555,7 +730,7 @@ module Google
|
|
555
730
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
556
731
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
557
732
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
558
|
-
def create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil,
|
733
|
+
def create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
559
734
|
command = make_simple_command(:post, 'drives', options)
|
560
735
|
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
561
736
|
command.request_object = drive_object
|
@@ -564,17 +739,16 @@ module Google
|
|
564
739
|
command.query['requestId'] = request_id unless request_id.nil?
|
565
740
|
command.query['fields'] = fields unless fields.nil?
|
566
741
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
567
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
568
742
|
execute_or_queue_command(command, &block)
|
569
743
|
end
|
570
744
|
|
571
|
-
# Permanently deletes a shared drive for which the user is an organizer
|
745
|
+
# Permanently deletes a shared drive for which the user is an `organizer`. The
|
572
746
|
# shared drive cannot contain any untrashed items.
|
573
747
|
# @param [String] drive_id
|
574
748
|
# The ID of the shared drive.
|
575
749
|
# @param [Boolean] allow_item_deletion
|
576
750
|
# Whether any items inside the shared drive should also be deleted. This option
|
577
|
-
# is only supported when useDomainAdminAccess is also set to true
|
751
|
+
# is only supported when `useDomainAdminAccess` is also set to `true`.
|
578
752
|
# @param [Boolean] use_domain_admin_access
|
579
753
|
# Issue the request as a domain administrator; if set to true, then the
|
580
754
|
# requester will be granted access if they are an administrator of the domain to
|
@@ -582,10 +756,8 @@ module Google
|
|
582
756
|
# @param [String] fields
|
583
757
|
# Selector specifying which fields to include in a partial response.
|
584
758
|
# @param [String] quota_user
|
585
|
-
#
|
586
|
-
# characters.
|
587
|
-
# @param [String] user_ip
|
588
|
-
# Deprecated. Please use quotaUser instead.
|
759
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
760
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
589
761
|
# @param [Google::Apis::RequestOptions] options
|
590
762
|
# Request-specific options
|
591
763
|
#
|
@@ -598,14 +770,13 @@ module Google
|
|
598
770
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
599
771
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
600
772
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
601
|
-
def delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
773
|
+
def delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
602
774
|
command = make_simple_command(:delete, 'drives/{driveId}', options)
|
603
775
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
604
776
|
command.query['allowItemDeletion'] = allow_item_deletion unless allow_item_deletion.nil?
|
605
777
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
606
778
|
command.query['fields'] = fields unless fields.nil?
|
607
779
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
608
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
609
780
|
execute_or_queue_command(command, &block)
|
610
781
|
end
|
611
782
|
|
@@ -619,10 +790,8 @@ module Google
|
|
619
790
|
# @param [String] fields
|
620
791
|
# Selector specifying which fields to include in a partial response.
|
621
792
|
# @param [String] quota_user
|
622
|
-
#
|
623
|
-
# characters.
|
624
|
-
# @param [String] user_ip
|
625
|
-
# Deprecated. Please use quotaUser instead.
|
793
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
794
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
626
795
|
# @param [Google::Apis::RequestOptions] options
|
627
796
|
# Request-specific options
|
628
797
|
#
|
@@ -635,7 +804,7 @@ module Google
|
|
635
804
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
636
805
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
637
806
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
638
|
-
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
807
|
+
def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
639
808
|
command = make_simple_command(:get, 'drives/{driveId}', options)
|
640
809
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
641
810
|
command.response_class = Google::Apis::DriveV3::Drive
|
@@ -643,7 +812,6 @@ module Google
|
|
643
812
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
644
813
|
command.query['fields'] = fields unless fields.nil?
|
645
814
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
646
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
647
815
|
execute_or_queue_command(command, &block)
|
648
816
|
end
|
649
817
|
|
@@ -653,10 +821,8 @@ module Google
|
|
653
821
|
# @param [String] fields
|
654
822
|
# Selector specifying which fields to include in a partial response.
|
655
823
|
# @param [String] quota_user
|
656
|
-
#
|
657
|
-
# characters.
|
658
|
-
# @param [String] user_ip
|
659
|
-
# Deprecated. Please use quotaUser instead.
|
824
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
825
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
660
826
|
# @param [Google::Apis::RequestOptions] options
|
661
827
|
# Request-specific options
|
662
828
|
#
|
@@ -669,18 +835,20 @@ module Google
|
|
669
835
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
670
836
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
671
837
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
672
|
-
def hide_drive(drive_id, fields: nil, quota_user: nil,
|
838
|
+
def hide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
673
839
|
command = make_simple_command(:post, 'drives/{driveId}/hide', options)
|
674
840
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
675
841
|
command.response_class = Google::Apis::DriveV3::Drive
|
676
842
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
677
843
|
command.query['fields'] = fields unless fields.nil?
|
678
844
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
679
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
680
845
|
execute_or_queue_command(command, &block)
|
681
846
|
end
|
682
847
|
|
683
|
-
# Lists the user's shared drives.
|
848
|
+
# Lists the user's shared drives. This method accepts the `q` parameter, which
|
849
|
+
# is a search query combining one or more search terms. For more information,
|
850
|
+
# see the [Search for shared drives](/drive/api/guides/search-shareddrives)
|
851
|
+
# guide.
|
684
852
|
# @param [Fixnum] page_size
|
685
853
|
# Maximum number of shared drives to return per page.
|
686
854
|
# @param [String] page_token
|
@@ -693,10 +861,8 @@ module Google
|
|
693
861
|
# @param [String] fields
|
694
862
|
# Selector specifying which fields to include in a partial response.
|
695
863
|
# @param [String] quota_user
|
696
|
-
#
|
697
|
-
# characters.
|
698
|
-
# @param [String] user_ip
|
699
|
-
# Deprecated. Please use quotaUser instead.
|
864
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
865
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
700
866
|
# @param [Google::Apis::RequestOptions] options
|
701
867
|
# Request-specific options
|
702
868
|
#
|
@@ -709,7 +875,7 @@ module Google
|
|
709
875
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
710
876
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
711
877
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
712
|
-
def list_drives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
878
|
+
def list_drives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
713
879
|
command = make_simple_command(:get, 'drives', options)
|
714
880
|
command.response_representation = Google::Apis::DriveV3::DriveList::Representation
|
715
881
|
command.response_class = Google::Apis::DriveV3::DriveList
|
@@ -719,7 +885,6 @@ module Google
|
|
719
885
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
720
886
|
command.query['fields'] = fields unless fields.nil?
|
721
887
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
722
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
723
888
|
execute_or_queue_command(command, &block)
|
724
889
|
end
|
725
890
|
|
@@ -729,10 +894,8 @@ module Google
|
|
729
894
|
# @param [String] fields
|
730
895
|
# Selector specifying which fields to include in a partial response.
|
731
896
|
# @param [String] quota_user
|
732
|
-
#
|
733
|
-
# characters.
|
734
|
-
# @param [String] user_ip
|
735
|
-
# Deprecated. Please use quotaUser instead.
|
897
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
898
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
736
899
|
# @param [Google::Apis::RequestOptions] options
|
737
900
|
# Request-specific options
|
738
901
|
#
|
@@ -745,18 +908,17 @@ module Google
|
|
745
908
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
746
909
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
747
910
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
748
|
-
def unhide_drive(drive_id, fields: nil, quota_user: nil,
|
911
|
+
def unhide_drive(drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
749
912
|
command = make_simple_command(:post, 'drives/{driveId}/unhide', options)
|
750
913
|
command.response_representation = Google::Apis::DriveV3::Drive::Representation
|
751
914
|
command.response_class = Google::Apis::DriveV3::Drive
|
752
915
|
command.params['driveId'] = drive_id unless drive_id.nil?
|
753
916
|
command.query['fields'] = fields unless fields.nil?
|
754
917
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
755
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
756
918
|
execute_or_queue_command(command, &block)
|
757
919
|
end
|
758
920
|
|
759
|
-
# Updates the
|
921
|
+
# Updates the metadata for a shared drive.
|
760
922
|
# @param [String] drive_id
|
761
923
|
# The ID of the shared drive.
|
762
924
|
# @param [Google::Apis::DriveV3::Drive] drive_object
|
@@ -767,10 +929,8 @@ module Google
|
|
767
929
|
# @param [String] fields
|
768
930
|
# Selector specifying which fields to include in a partial response.
|
769
931
|
# @param [String] quota_user
|
770
|
-
#
|
771
|
-
# characters.
|
772
|
-
# @param [String] user_ip
|
773
|
-
# Deprecated. Please use quotaUser instead.
|
932
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
933
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
774
934
|
# @param [Google::Apis::RequestOptions] options
|
775
935
|
# Request-specific options
|
776
936
|
#
|
@@ -783,7 +943,7 @@ module Google
|
|
783
943
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
784
944
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
785
945
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
786
|
-
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
946
|
+
def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
787
947
|
command = make_simple_command(:patch, 'drives/{driveId}', options)
|
788
948
|
command.request_representation = Google::Apis::DriveV3::Drive::Representation
|
789
949
|
command.request_object = drive_object
|
@@ -793,12 +953,11 @@ module Google
|
|
793
953
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
794
954
|
command.query['fields'] = fields unless fields.nil?
|
795
955
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
796
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
797
956
|
execute_or_queue_command(command, &block)
|
798
957
|
end
|
799
958
|
|
800
959
|
# Creates a copy of a file and applies any requested updates with patch
|
801
|
-
# semantics.
|
960
|
+
# semantics.
|
802
961
|
# @param [String] file_id
|
803
962
|
# The ID of the file.
|
804
963
|
# @param [Google::Apis::DriveV3::File] file_object
|
@@ -811,7 +970,7 @@ module Google
|
|
811
970
|
# the domain by default; this parameter bypasses that behavior for the request.
|
812
971
|
# Permissions are still inherited from parent folders.
|
813
972
|
# @param [String] include_labels
|
814
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
973
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
815
974
|
# the response.
|
816
975
|
# @param [String] include_permissions_for_view
|
817
976
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -826,14 +985,12 @@ module Google
|
|
826
985
|
# @param [Boolean] supports_all_drives
|
827
986
|
# Whether the requesting application supports both My Drives and shared drives.
|
828
987
|
# @param [Boolean] supports_team_drives
|
829
|
-
# Deprecated
|
988
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
830
989
|
# @param [String] fields
|
831
990
|
# Selector specifying which fields to include in a partial response.
|
832
991
|
# @param [String] quota_user
|
833
|
-
#
|
834
|
-
# characters.
|
835
|
-
# @param [String] user_ip
|
836
|
-
# Deprecated. Please use quotaUser instead.
|
992
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
993
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
837
994
|
# @param [Google::Apis::RequestOptions] options
|
838
995
|
# Request-specific options
|
839
996
|
#
|
@@ -846,7 +1003,7 @@ module Google
|
|
846
1003
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
847
1004
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
848
1005
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
849
|
-
def copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1006
|
+
def copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
850
1007
|
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
851
1008
|
command.request_representation = Google::Apis::DriveV3::File::Representation
|
852
1009
|
command.request_object = file_object
|
@@ -863,11 +1020,26 @@ module Google
|
|
863
1020
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
864
1021
|
command.query['fields'] = fields unless fields.nil?
|
865
1022
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
866
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
867
1023
|
execute_or_queue_command(command, &block)
|
868
1024
|
end
|
869
1025
|
|
870
|
-
# Creates a new file.
|
1026
|
+
# Creates a new file. This method supports an */upload* URI and accepts
|
1027
|
+
# uploaded media with the following characteristics: - *Maximum file size:* 5,
|
1028
|
+
# 120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type,
|
1029
|
+
# rather than the literal `*/*` value. The literal `*/*` is only used to
|
1030
|
+
# indicate that any valid MIME type can be uploaded. For more information on
|
1031
|
+
# uploading files, see [Upload file data](/drive/api/guides/manage-uploads).
|
1032
|
+
# Apps creating shortcuts with `files.create` must specify the MIME type `
|
1033
|
+
# application/vnd.google-apps.shortcut`. Apps should specify a file extension in
|
1034
|
+
# the `name` property when inserting files with the API. For example, an
|
1035
|
+
# operation to insert a JPEG file should specify something like `"name": "cat.
|
1036
|
+
# jpg"` in the metadata. Subsequent `GET` requests include the read-only `
|
1037
|
+
# fileExtension` property populated with the extension originally specified in
|
1038
|
+
# the `title` property. When a Google Drive user requests to download a file, or
|
1039
|
+
# when the file is downloaded through the sync client, Drive builds a full
|
1040
|
+
# filename (with extension) based on the title. In cases where the extension is
|
1041
|
+
# missing, Drive attempts to determine the extension based on the file's MIME
|
1042
|
+
# type.
|
871
1043
|
# @param [Google::Apis::DriveV3::File] file_object
|
872
1044
|
# @param [Boolean] enforce_single_parent
|
873
1045
|
# Deprecated. Creating files in multiple folders is no longer supported.
|
@@ -877,7 +1049,7 @@ module Google
|
|
877
1049
|
# the domain by default; this parameter bypasses that behavior for the request.
|
878
1050
|
# Permissions are still inherited from parent folders.
|
879
1051
|
# @param [String] include_labels
|
880
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1052
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
881
1053
|
# the response.
|
882
1054
|
# @param [String] include_permissions_for_view
|
883
1055
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -892,16 +1064,14 @@ module Google
|
|
892
1064
|
# @param [Boolean] supports_all_drives
|
893
1065
|
# Whether the requesting application supports both My Drives and shared drives.
|
894
1066
|
# @param [Boolean] supports_team_drives
|
895
|
-
# Deprecated
|
1067
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
896
1068
|
# @param [Boolean] use_content_as_indexable_text
|
897
1069
|
# Whether to use the uploaded content as indexable text.
|
898
1070
|
# @param [String] fields
|
899
1071
|
# Selector specifying which fields to include in a partial response.
|
900
1072
|
# @param [String] quota_user
|
901
|
-
#
|
902
|
-
# characters.
|
903
|
-
# @param [String] user_ip
|
904
|
-
# Deprecated. Please use quotaUser instead.
|
1073
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1074
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
905
1075
|
# @param [IO, String] upload_source
|
906
1076
|
# IO stream or filename containing content to upload
|
907
1077
|
# @param [String] content_type
|
@@ -918,7 +1088,7 @@ module Google
|
|
918
1088
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
919
1089
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
920
1090
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
921
|
-
def create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil,
|
1091
|
+
def create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
922
1092
|
if upload_source.nil?
|
923
1093
|
command = make_simple_command(:post, 'files', options)
|
924
1094
|
else
|
@@ -941,30 +1111,27 @@ module Google
|
|
941
1111
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
942
1112
|
command.query['fields'] = fields unless fields.nil?
|
943
1113
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
944
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
945
1114
|
execute_or_queue_command(command, &block)
|
946
1115
|
end
|
947
1116
|
|
948
1117
|
# Permanently deletes a file owned by the user without moving it to the trash.
|
949
|
-
# If the file belongs to a shared drive the user must be an organizer on the
|
950
|
-
# parent. If the target is a folder, all descendants owned by the user
|
951
|
-
# deleted.
|
1118
|
+
# If the file belongs to a shared drive, the user must be an `organizer` on the
|
1119
|
+
# parent folder. If the target is a folder, all descendants owned by the user
|
1120
|
+
# are also deleted.
|
952
1121
|
# @param [String] file_id
|
953
1122
|
# The ID of the file.
|
954
1123
|
# @param [Boolean] enforce_single_parent
|
955
|
-
# Deprecated
|
1124
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
956
1125
|
# but the item itself is not, the item will be placed under its owner's root.
|
957
1126
|
# @param [Boolean] supports_all_drives
|
958
1127
|
# Whether the requesting application supports both My Drives and shared drives.
|
959
1128
|
# @param [Boolean] supports_team_drives
|
960
|
-
# Deprecated
|
1129
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
961
1130
|
# @param [String] fields
|
962
1131
|
# Selector specifying which fields to include in a partial response.
|
963
1132
|
# @param [String] quota_user
|
964
|
-
#
|
965
|
-
# characters.
|
966
|
-
# @param [String] user_ip
|
967
|
-
# Deprecated. Please use quotaUser instead.
|
1133
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1134
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
968
1135
|
# @param [Google::Apis::RequestOptions] options
|
969
1136
|
# Request-specific options
|
970
1137
|
#
|
@@ -977,7 +1144,7 @@ module Google
|
|
977
1144
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
978
1145
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
979
1146
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
980
|
-
def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1147
|
+
def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
981
1148
|
command = make_simple_command(:delete, 'files/{fileId}', options)
|
982
1149
|
command.params['fileId'] = file_id unless file_id.nil?
|
983
1150
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
@@ -985,21 +1152,64 @@ module Google
|
|
985
1152
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
986
1153
|
command.query['fields'] = fields unless fields.nil?
|
987
1154
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
988
|
-
command
|
1155
|
+
execute_or_queue_command(command, &block)
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
# Downloads content of a file. Operations are valid for 24 hours from the time
|
1159
|
+
# of creation.
|
1160
|
+
# @param [String] file_id
|
1161
|
+
# Required. The ID of the file to download.
|
1162
|
+
# @param [String] mime_type
|
1163
|
+
# Optional. The MIME type the file should be downloaded as. This field can only
|
1164
|
+
# be set when downloading Google Workspace documents. See [Export MIME types for
|
1165
|
+
# Google Workspace documents](/drive/api/guides/ref-export-formats) for the list
|
1166
|
+
# of supported MIME types. If not set, a Google Workspace document is downloaded
|
1167
|
+
# with a default MIME type. The default MIME type might change in the future.
|
1168
|
+
# @param [String] revision_id
|
1169
|
+
# Optional. The revision ID of the file to download. This field can only be set
|
1170
|
+
# when downloading blob files, Google Docs, and Google Sheets. Returns `
|
1171
|
+
# INVALID_ARGUMENT` if downloading a specific revision on the file is
|
1172
|
+
# unsupported.
|
1173
|
+
# @param [String] fields
|
1174
|
+
# Selector specifying which fields to include in a partial response.
|
1175
|
+
# @param [String] quota_user
|
1176
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1177
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1178
|
+
# @param [Google::Apis::RequestOptions] options
|
1179
|
+
# Request-specific options
|
1180
|
+
#
|
1181
|
+
# @yield [result, err] Result & error if block supplied
|
1182
|
+
# @yieldparam result [Google::Apis::DriveV3::Operation] parsed result object
|
1183
|
+
# @yieldparam err [StandardError] error object if request failed
|
1184
|
+
#
|
1185
|
+
# @return [Google::Apis::DriveV3::Operation]
|
1186
|
+
#
|
1187
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1188
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1189
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1190
|
+
def download_file(file_id, mime_type: nil, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1191
|
+
command = make_simple_command(:post, 'files/{fileId}/download', options)
|
1192
|
+
command.response_representation = Google::Apis::DriveV3::Operation::Representation
|
1193
|
+
command.response_class = Google::Apis::DriveV3::Operation
|
1194
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
1195
|
+
command.query['mimeType'] = mime_type unless mime_type.nil?
|
1196
|
+
command.query['revisionId'] = revision_id unless revision_id.nil?
|
1197
|
+
command.query['fields'] = fields unless fields.nil?
|
1198
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
989
1199
|
execute_or_queue_command(command, &block)
|
990
1200
|
end
|
991
1201
|
|
992
1202
|
# Permanently deletes all of the user's trashed files.
|
1203
|
+
# @param [String] drive_id
|
1204
|
+
# If set, empties the trash of the provided shared drive.
|
993
1205
|
# @param [Boolean] enforce_single_parent
|
994
|
-
# Deprecated
|
1206
|
+
# Deprecated: If an item is not in a shared drive and its last parent is deleted
|
995
1207
|
# but the item itself is not, the item will be placed under its owner's root.
|
996
1208
|
# @param [String] fields
|
997
1209
|
# Selector specifying which fields to include in a partial response.
|
998
1210
|
# @param [String] quota_user
|
999
|
-
#
|
1000
|
-
# characters.
|
1001
|
-
# @param [String] user_ip
|
1002
|
-
# Deprecated. Please use quotaUser instead.
|
1211
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1212
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1003
1213
|
# @param [Google::Apis::RequestOptions] options
|
1004
1214
|
# Request-specific options
|
1005
1215
|
#
|
@@ -1012,12 +1222,12 @@ module Google
|
|
1012
1222
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1013
1223
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1014
1224
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1015
|
-
def empty_file_trash(
|
1225
|
+
def empty_file_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1016
1226
|
command = make_simple_command(:delete, 'files/trash', options)
|
1227
|
+
command.query['driveId'] = drive_id unless drive_id.nil?
|
1017
1228
|
command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil?
|
1018
1229
|
command.query['fields'] = fields unless fields.nil?
|
1019
1230
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1020
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1021
1231
|
execute_or_queue_command(command, &block)
|
1022
1232
|
end
|
1023
1233
|
|
@@ -1026,14 +1236,12 @@ module Google
|
|
1026
1236
|
# @param [String] file_id
|
1027
1237
|
# The ID of the file.
|
1028
1238
|
# @param [String] mime_type
|
1029
|
-
# The MIME type of the format requested for this export.
|
1239
|
+
# Required. The MIME type of the format requested for this export.
|
1030
1240
|
# @param [String] fields
|
1031
1241
|
# Selector specifying which fields to include in a partial response.
|
1032
1242
|
# @param [String] quota_user
|
1033
|
-
#
|
1034
|
-
# characters.
|
1035
|
-
# @param [String] user_ip
|
1036
|
-
# Deprecated. Please use quotaUser instead.
|
1243
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1244
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1037
1245
|
# @param [IO, String] download_dest
|
1038
1246
|
# IO stream or filename to receive content download
|
1039
1247
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1048,7 +1256,7 @@ module Google
|
|
1048
1256
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1049
1257
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1050
1258
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1051
|
-
def export_file(file_id, mime_type, fields: nil, quota_user: nil,
|
1259
|
+
def export_file(file_id, mime_type, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
1052
1260
|
if download_dest.nil?
|
1053
1261
|
command = make_simple_command(:get, 'files/{fileId}/export', options)
|
1054
1262
|
else
|
@@ -1059,7 +1267,6 @@ module Google
|
|
1059
1267
|
command.query['mimeType'] = mime_type unless mime_type.nil?
|
1060
1268
|
command.query['fields'] = fields unless fields.nil?
|
1061
1269
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1062
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1063
1270
|
execute_or_queue_command(command, &block)
|
1064
1271
|
end
|
1065
1272
|
|
@@ -1071,15 +1278,13 @@ module Google
|
|
1071
1278
|
# are 'drive' and 'appDataFolder'. (Default: 'drive')
|
1072
1279
|
# @param [String] type
|
1073
1280
|
# The type of items which the IDs can be used for. Supported values are 'files'
|
1074
|
-
# and 'shortcuts'. Note that 'shortcuts' are only supported in the drive '
|
1075
|
-
# (Default: 'files')
|
1281
|
+
# and 'shortcuts'. Note that 'shortcuts' are only supported in the `drive` '
|
1282
|
+
# space'. (Default: 'files')
|
1076
1283
|
# @param [String] fields
|
1077
1284
|
# Selector specifying which fields to include in a partial response.
|
1078
1285
|
# @param [String] quota_user
|
1079
|
-
#
|
1080
|
-
# characters.
|
1081
|
-
# @param [String] user_ip
|
1082
|
-
# Deprecated. Please use quotaUser instead.
|
1286
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1287
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1083
1288
|
# @param [Google::Apis::RequestOptions] options
|
1084
1289
|
# Request-specific options
|
1085
1290
|
#
|
@@ -1092,7 +1297,7 @@ module Google
|
|
1092
1297
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1093
1298
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1094
1299
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1095
|
-
def generate_file_ids(count: nil, space: nil, type: nil, fields: nil, quota_user: nil,
|
1300
|
+
def generate_file_ids(count: nil, space: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1096
1301
|
command = make_simple_command(:get, 'files/generateIds', options)
|
1097
1302
|
command.response_representation = Google::Apis::DriveV3::GeneratedIds::Representation
|
1098
1303
|
command.response_class = Google::Apis::DriveV3::GeneratedIds
|
@@ -1101,18 +1306,24 @@ module Google
|
|
1101
1306
|
command.query['type'] = type unless type.nil?
|
1102
1307
|
command.query['fields'] = fields unless fields.nil?
|
1103
1308
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1104
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1105
1309
|
execute_or_queue_command(command, &block)
|
1106
1310
|
end
|
1107
1311
|
|
1108
|
-
# Gets a file's metadata or content by ID.
|
1312
|
+
# Gets a file's metadata or content by ID. If you provide the URL parameter `
|
1313
|
+
# alt=media`, then the response includes the file contents in the response body.
|
1314
|
+
# Downloading content with `alt=media` only works if the file is stored in Drive.
|
1315
|
+
# To download Google Docs, Sheets, and Slides use [`files.export`](/drive/api/
|
1316
|
+
# reference/rest/v3/files/export) instead. For more information, see [Download &
|
1317
|
+
# export files](/drive/api/guides/manage-downloads).
|
1109
1318
|
# @param [String] file_id
|
1110
1319
|
# The ID of the file.
|
1111
1320
|
# @param [Boolean] acknowledge_abuse
|
1112
1321
|
# Whether the user is acknowledging the risk of downloading known malware or
|
1113
|
-
# other abusive files. This is only applicable when alt
|
1322
|
+
# other abusive files. This is only applicable when the `alt` parameter is set
|
1323
|
+
# to `media` and the user is the owner of the file or an organizer of the shared
|
1324
|
+
# drive in which the file resides.
|
1114
1325
|
# @param [String] include_labels
|
1115
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1326
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1116
1327
|
# the response.
|
1117
1328
|
# @param [String] include_permissions_for_view
|
1118
1329
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1120,14 +1331,12 @@ module Google
|
|
1120
1331
|
# @param [Boolean] supports_all_drives
|
1121
1332
|
# Whether the requesting application supports both My Drives and shared drives.
|
1122
1333
|
# @param [Boolean] supports_team_drives
|
1123
|
-
# Deprecated
|
1334
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1124
1335
|
# @param [String] fields
|
1125
1336
|
# Selector specifying which fields to include in a partial response.
|
1126
1337
|
# @param [String] quota_user
|
1127
|
-
#
|
1128
|
-
# characters.
|
1129
|
-
# @param [String] user_ip
|
1130
|
-
# Deprecated. Please use quotaUser instead.
|
1338
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1339
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1131
1340
|
# @param [IO, String] download_dest
|
1132
1341
|
# IO stream or filename to receive content download
|
1133
1342
|
# @param [Google::Apis::RequestOptions] options
|
@@ -1142,7 +1351,7 @@ module Google
|
|
1142
1351
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1143
1352
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1144
1353
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1145
|
-
def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1354
|
+
def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
1146
1355
|
if download_dest.nil?
|
1147
1356
|
command = make_simple_command(:get, 'files/{fileId}', options)
|
1148
1357
|
else
|
@@ -1159,40 +1368,49 @@ module Google
|
|
1159
1368
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1160
1369
|
command.query['fields'] = fields unless fields.nil?
|
1161
1370
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1162
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1163
1371
|
execute_or_queue_command(command, &block)
|
1164
1372
|
end
|
1165
1373
|
|
1166
|
-
# Lists
|
1374
|
+
# Lists the user's files. This method accepts the `q` parameter, which is a
|
1375
|
+
# search query combining one or more search terms. For more information, see the
|
1376
|
+
# [Search for files & folders](/drive/api/guides/search-files) guide. *Note:*
|
1377
|
+
# This method returns *all* files by default, including trashed files. If you
|
1378
|
+
# don't want trashed files to appear in the list, use the `trashed=false` query
|
1379
|
+
# parameter to remove trashed files from the results.
|
1167
1380
|
# @param [String] corpora
|
1168
|
-
#
|
1169
|
-
#
|
1170
|
-
#
|
1171
|
-
#
|
1172
|
-
# and 'drive' for all drives where the user is a member). When able, use 'user'
|
1173
|
-
# or 'drive', instead of 'allDrives', for efficiency.
|
1381
|
+
# Bodies of items (files/documents) to which the query applies. Supported bodies
|
1382
|
+
# are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to '
|
1383
|
+
# allDrives' for efficiency. By default, corpora is set to 'user'. However, this
|
1384
|
+
# can change depending on the filter set through the 'q' parameter.
|
1174
1385
|
# @param [String] corpus
|
1175
|
-
# The source of files to list.
|
1386
|
+
# Deprecated: The source of files to list. Use 'corpora' instead.
|
1176
1387
|
# @param [String] drive_id
|
1177
1388
|
# ID of the shared drive to search.
|
1178
1389
|
# @param [Boolean] include_items_from_all_drives
|
1179
1390
|
# Whether both My Drive and shared drive items should be included in results.
|
1180
1391
|
# @param [String] include_labels
|
1181
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1392
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1182
1393
|
# the response.
|
1183
1394
|
# @param [String] include_permissions_for_view
|
1184
1395
|
# Specifies which additional view's permissions to include in the response. Only
|
1185
1396
|
# 'published' is supported.
|
1186
1397
|
# @param [Boolean] include_team_drive_items
|
1187
|
-
# Deprecated
|
1398
|
+
# Deprecated: Use `includeItemsFromAllDrives` instead.
|
1188
1399
|
# @param [String] order_by
|
1189
|
-
# A comma-separated list of sort keys. Valid keys are
|
1190
|
-
#
|
1191
|
-
#
|
1192
|
-
#
|
1193
|
-
#
|
1194
|
-
#
|
1195
|
-
#
|
1400
|
+
# A comma-separated list of sort keys. Valid keys are: * `createdTime`: When the
|
1401
|
+
# file was created. * `folder`: The folder ID. This field is sorted using
|
1402
|
+
# alphabetical ordering. * `modifiedByMeTime`: The last time the file was
|
1403
|
+
# modified by the user. * `modifiedTime`: The last time the file was modified by
|
1404
|
+
# anyone. * `name`: The name of the file. This field is sorted using
|
1405
|
+
# alphabetical ordering, so 1, 12, 2, 22. * `name_natural`: The name of the file.
|
1406
|
+
# This field is sorted using natural sort ordering, so 1, 2, 12, 22. * `
|
1407
|
+
# quotaBytesUsed`: The number of storage quota bytes used by the file. * `
|
1408
|
+
# recency`: The most recent timestamp from the file's date-time fields. * `
|
1409
|
+
# sharedWithMeTime`: When the file was shared with the user, if applicable. * `
|
1410
|
+
# starred`: Whether the user has starred the file. * `viewedByMeTime`: The last
|
1411
|
+
# time the file was viewed by the user. Each key sorts ascending by default, but
|
1412
|
+
# can be reversed with the 'desc' modifier. Example usage: `?orderBy=folder,
|
1413
|
+
# modifiedTime desc,name`.
|
1196
1414
|
# @param [Fixnum] page_size
|
1197
1415
|
# The maximum number of files to return per page. Partial or empty result pages
|
1198
1416
|
# are possible even before the end of the files list has been reached.
|
@@ -1200,24 +1418,22 @@ module Google
|
|
1200
1418
|
# The token for continuing a previous list request on the next page. This should
|
1201
1419
|
# be set to the value of 'nextPageToken' from the previous response.
|
1202
1420
|
# @param [String] q
|
1203
|
-
# A query for filtering the file results. See the "Search for
|
1204
|
-
# supported syntax.
|
1421
|
+
# A query for filtering the file results. See the "Search for files & folders"
|
1422
|
+
# guide for supported syntax.
|
1205
1423
|
# @param [String] spaces
|
1206
|
-
# A comma-separated list of spaces to query within the
|
1424
|
+
# A comma-separated list of spaces to query within the corpora. Supported values
|
1207
1425
|
# are 'drive' and 'appDataFolder'.
|
1208
1426
|
# @param [Boolean] supports_all_drives
|
1209
1427
|
# Whether the requesting application supports both My Drives and shared drives.
|
1210
1428
|
# @param [Boolean] supports_team_drives
|
1211
|
-
# Deprecated
|
1429
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1212
1430
|
# @param [String] team_drive_id
|
1213
|
-
# Deprecated
|
1431
|
+
# Deprecated: Use `driveId` instead.
|
1214
1432
|
# @param [String] fields
|
1215
1433
|
# Selector specifying which fields to include in a partial response.
|
1216
1434
|
# @param [String] quota_user
|
1217
|
-
#
|
1218
|
-
# characters.
|
1219
|
-
# @param [String] user_ip
|
1220
|
-
# Deprecated. Please use quotaUser instead.
|
1435
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1436
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1221
1437
|
# @param [Google::Apis::RequestOptions] options
|
1222
1438
|
# Request-specific options
|
1223
1439
|
#
|
@@ -1230,7 +1446,7 @@ module Google
|
|
1230
1446
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1231
1447
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1232
1448
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1233
|
-
def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil,
|
1449
|
+
def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1234
1450
|
command = make_simple_command(:get, 'files', options)
|
1235
1451
|
command.response_representation = Google::Apis::DriveV3::FileList::Representation
|
1236
1452
|
command.response_class = Google::Apis::DriveV3::FileList
|
@@ -1251,26 +1467,22 @@ module Google
|
|
1251
1467
|
command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
1252
1468
|
command.query['fields'] = fields unless fields.nil?
|
1253
1469
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1254
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1255
1470
|
execute_or_queue_command(command, &block)
|
1256
1471
|
end
|
1257
1472
|
|
1258
1473
|
# Lists the labels on a file.
|
1259
1474
|
# @param [String] file_id
|
1260
|
-
# The ID
|
1475
|
+
# The ID for the file.
|
1261
1476
|
# @param [Fixnum] max_results
|
1262
|
-
# The maximum number of labels to return per page. When not set,
|
1263
|
-
# to 100.
|
1477
|
+
# The maximum number of labels to return per page. When not set, defaults to 100.
|
1264
1478
|
# @param [String] page_token
|
1265
1479
|
# The token for continuing a previous list request on the next page. This should
|
1266
1480
|
# be set to the value of 'nextPageToken' from the previous response.
|
1267
1481
|
# @param [String] fields
|
1268
1482
|
# Selector specifying which fields to include in a partial response.
|
1269
1483
|
# @param [String] quota_user
|
1270
|
-
#
|
1271
|
-
# characters.
|
1272
|
-
# @param [String] user_ip
|
1273
|
-
# Deprecated. Please use quotaUser instead.
|
1484
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1485
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1274
1486
|
# @param [Google::Apis::RequestOptions] options
|
1275
1487
|
# Request-specific options
|
1276
1488
|
#
|
@@ -1283,7 +1495,7 @@ module Google
|
|
1283
1495
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1284
1496
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1285
1497
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1286
|
-
def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil,
|
1498
|
+
def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1287
1499
|
command = make_simple_command(:get, 'files/{fileId}/listLabels', options)
|
1288
1500
|
command.response_representation = Google::Apis::DriveV3::LabelList::Representation
|
1289
1501
|
command.response_class = Google::Apis::DriveV3::LabelList
|
@@ -1292,21 +1504,19 @@ module Google
|
|
1292
1504
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1293
1505
|
command.query['fields'] = fields unless fields.nil?
|
1294
1506
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1295
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1296
1507
|
execute_or_queue_command(command, &block)
|
1297
1508
|
end
|
1298
1509
|
|
1299
|
-
# Modifies the set of labels
|
1510
|
+
# Modifies the set of labels applied to a file. Returns a list of the labels
|
1511
|
+
# that were added or modified.
|
1300
1512
|
# @param [String] file_id
|
1301
|
-
# The ID of the file
|
1513
|
+
# The ID of the file to which the labels belong.
|
1302
1514
|
# @param [Google::Apis::DriveV3::ModifyLabelsRequest] modify_labels_request_object
|
1303
1515
|
# @param [String] fields
|
1304
1516
|
# Selector specifying which fields to include in a partial response.
|
1305
1517
|
# @param [String] quota_user
|
1306
|
-
#
|
1307
|
-
# characters.
|
1308
|
-
# @param [String] user_ip
|
1309
|
-
# Deprecated. Please use quotaUser instead.
|
1518
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1519
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1310
1520
|
# @param [Google::Apis::RequestOptions] options
|
1311
1521
|
# Request-specific options
|
1312
1522
|
#
|
@@ -1319,7 +1529,7 @@ module Google
|
|
1319
1529
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1320
1530
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1321
1531
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1322
|
-
def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil,
|
1532
|
+
def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1323
1533
|
command = make_simple_command(:post, 'files/{fileId}/modifyLabels', options)
|
1324
1534
|
command.request_representation = Google::Apis::DriveV3::ModifyLabelsRequest::Representation
|
1325
1535
|
command.request_object = modify_labels_request_object
|
@@ -1328,24 +1538,28 @@ module Google
|
|
1328
1538
|
command.params['fileId'] = file_id unless file_id.nil?
|
1329
1539
|
command.query['fields'] = fields unless fields.nil?
|
1330
1540
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1331
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1332
1541
|
execute_or_queue_command(command, &block)
|
1333
1542
|
end
|
1334
1543
|
|
1335
1544
|
# Updates a file's metadata and/or content. When calling this method, only
|
1336
1545
|
# populate fields in the request that you want to modify. When updating fields,
|
1337
|
-
# some fields might
|
1338
|
-
# supports patch semantics.
|
1546
|
+
# some fields might be changed automatically, such as `modifiedDate`. This
|
1547
|
+
# method supports patch semantics. This method supports an */upload* URI and
|
1548
|
+
# accepts uploaded media with the following characteristics: - *Maximum file
|
1549
|
+
# size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME
|
1550
|
+
# type, rather than the literal `*/*` value. The literal `*/*` is only used to
|
1551
|
+
# indicate that any valid MIME type can be uploaded. For more information on
|
1552
|
+
# uploading files, see [Upload file data](/drive/api/guides/manage-uploads).
|
1339
1553
|
# @param [String] file_id
|
1340
1554
|
# The ID of the file.
|
1341
1555
|
# @param [Google::Apis::DriveV3::File] file_object
|
1342
1556
|
# @param [String] add_parents
|
1343
1557
|
# A comma-separated list of parent IDs to add.
|
1344
1558
|
# @param [Boolean] enforce_single_parent
|
1345
|
-
# Deprecated
|
1559
|
+
# Deprecated: Adding files to multiple folders is no longer supported. Use
|
1346
1560
|
# shortcuts instead.
|
1347
1561
|
# @param [String] include_labels
|
1348
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1562
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1349
1563
|
# the response.
|
1350
1564
|
# @param [String] include_permissions_for_view
|
1351
1565
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1362,16 +1576,14 @@ module Google
|
|
1362
1576
|
# @param [Boolean] supports_all_drives
|
1363
1577
|
# Whether the requesting application supports both My Drives and shared drives.
|
1364
1578
|
# @param [Boolean] supports_team_drives
|
1365
|
-
# Deprecated
|
1579
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1366
1580
|
# @param [Boolean] use_content_as_indexable_text
|
1367
1581
|
# Whether to use the uploaded content as indexable text.
|
1368
1582
|
# @param [String] fields
|
1369
1583
|
# Selector specifying which fields to include in a partial response.
|
1370
1584
|
# @param [String] quota_user
|
1371
|
-
#
|
1372
|
-
# characters.
|
1373
|
-
# @param [String] user_ip
|
1374
|
-
# Deprecated. Please use quotaUser instead.
|
1585
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1586
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1375
1587
|
# @param [IO, String] upload_source
|
1376
1588
|
# IO stream or filename containing content to upload
|
1377
1589
|
# @param [String] content_type
|
@@ -1388,7 +1600,7 @@ module Google
|
|
1388
1600
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1389
1601
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1390
1602
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1391
|
-
def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil,
|
1603
|
+
def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
1392
1604
|
if upload_source.nil?
|
1393
1605
|
command = make_simple_command(:patch, 'files/{fileId}', options)
|
1394
1606
|
else
|
@@ -1413,21 +1625,20 @@ module Google
|
|
1413
1625
|
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
1414
1626
|
command.query['fields'] = fields unless fields.nil?
|
1415
1627
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1416
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1417
1628
|
execute_or_queue_command(command, &block)
|
1418
1629
|
end
|
1419
1630
|
|
1420
|
-
# Subscribes to changes to a file.
|
1421
|
-
# to a file on a shared drive, a change to a shared drive file won't create a
|
1422
|
-
# notification.
|
1631
|
+
# Subscribes to changes to a file.
|
1423
1632
|
# @param [String] file_id
|
1424
1633
|
# The ID of the file.
|
1425
1634
|
# @param [Google::Apis::DriveV3::Channel] channel_object
|
1426
1635
|
# @param [Boolean] acknowledge_abuse
|
1427
1636
|
# Whether the user is acknowledging the risk of downloading known malware or
|
1428
|
-
# other abusive files. This is only applicable when alt
|
1637
|
+
# other abusive files. This is only applicable when the `alt` parameter is set
|
1638
|
+
# to `media` and the user is the owner of the file or an organizer of the shared
|
1639
|
+
# drive in which the file resides.
|
1429
1640
|
# @param [String] include_labels
|
1430
|
-
# A comma-separated list of IDs of labels to include in the labelInfo part of
|
1641
|
+
# A comma-separated list of IDs of labels to include in the `labelInfo` part of
|
1431
1642
|
# the response.
|
1432
1643
|
# @param [String] include_permissions_for_view
|
1433
1644
|
# Specifies which additional view's permissions to include in the response. Only
|
@@ -1435,16 +1646,12 @@ module Google
|
|
1435
1646
|
# @param [Boolean] supports_all_drives
|
1436
1647
|
# Whether the requesting application supports both My Drives and shared drives.
|
1437
1648
|
# @param [Boolean] supports_team_drives
|
1438
|
-
# Deprecated
|
1649
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1439
1650
|
# @param [String] fields
|
1440
1651
|
# Selector specifying which fields to include in a partial response.
|
1441
1652
|
# @param [String] quota_user
|
1442
|
-
#
|
1443
|
-
# characters.
|
1444
|
-
# @param [String] user_ip
|
1445
|
-
# Deprecated. Please use quotaUser instead.
|
1446
|
-
# @param [IO, String] download_dest
|
1447
|
-
# IO stream or filename to receive content download
|
1653
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1654
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1448
1655
|
# @param [Google::Apis::RequestOptions] options
|
1449
1656
|
# Request-specific options
|
1450
1657
|
#
|
@@ -1457,13 +1664,8 @@ module Google
|
|
1457
1664
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1458
1665
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1459
1666
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1460
|
-
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil,
|
1461
|
-
|
1462
|
-
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
1463
|
-
else
|
1464
|
-
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
1465
|
-
command.download_dest = download_dest
|
1466
|
-
end
|
1667
|
+
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1668
|
+
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
1467
1669
|
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
1468
1670
|
command.request_object = channel_object
|
1469
1671
|
command.response_representation = Google::Apis::DriveV3::Channel::Representation
|
@@ -1476,23 +1678,161 @@ module Google
|
|
1476
1678
|
command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil?
|
1477
1679
|
command.query['fields'] = fields unless fields.nil?
|
1478
1680
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1479
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1480
1681
|
execute_or_queue_command(command, &block)
|
1481
1682
|
end
|
1482
1683
|
|
1483
|
-
#
|
1684
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
1685
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
1686
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
1687
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
1688
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
1689
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
1690
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of `1`
|
1691
|
+
# , corresponding to `Code.CANCELLED`.
|
1692
|
+
# @param [String] name
|
1693
|
+
# The name of the operation resource to be cancelled.
|
1694
|
+
# @param [String] fields
|
1695
|
+
# Selector specifying which fields to include in a partial response.
|
1696
|
+
# @param [String] quota_user
|
1697
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1698
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1699
|
+
# @param [Google::Apis::RequestOptions] options
|
1700
|
+
# Request-specific options
|
1701
|
+
#
|
1702
|
+
# @yield [result, err] Result & error if block supplied
|
1703
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1704
|
+
# @yieldparam err [StandardError] error object if request failed
|
1705
|
+
#
|
1706
|
+
# @return [void]
|
1707
|
+
#
|
1708
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1709
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1710
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1711
|
+
def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1712
|
+
command = make_simple_command(:post, 'operation/{name}:cancel', options)
|
1713
|
+
command.params['name'] = name unless name.nil?
|
1714
|
+
command.query['fields'] = fields unless fields.nil?
|
1715
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1716
|
+
execute_or_queue_command(command, &block)
|
1717
|
+
end
|
1718
|
+
|
1719
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
1720
|
+
# longer interested in the operation result. It does not cancel the operation.
|
1721
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
1722
|
+
# UNIMPLEMENTED`.
|
1723
|
+
# @param [String] name
|
1724
|
+
# The name of the operation resource to be deleted.
|
1725
|
+
# @param [String] fields
|
1726
|
+
# Selector specifying which fields to include in a partial response.
|
1727
|
+
# @param [String] quota_user
|
1728
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1729
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1730
|
+
# @param [Google::Apis::RequestOptions] options
|
1731
|
+
# Request-specific options
|
1732
|
+
#
|
1733
|
+
# @yield [result, err] Result & error if block supplied
|
1734
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1735
|
+
# @yieldparam err [StandardError] error object if request failed
|
1736
|
+
#
|
1737
|
+
# @return [void]
|
1738
|
+
#
|
1739
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1740
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1741
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1742
|
+
def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1743
|
+
command = make_simple_command(:delete, 'operation/{name}', options)
|
1744
|
+
command.params['name'] = name unless name.nil?
|
1745
|
+
command.query['fields'] = fields unless fields.nil?
|
1746
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1747
|
+
execute_or_queue_command(command, &block)
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
1751
|
+
# to poll the operation result at intervals as recommended by the API service.
|
1752
|
+
# @param [String] name
|
1753
|
+
# The name of the operation resource.
|
1754
|
+
# @param [String] fields
|
1755
|
+
# Selector specifying which fields to include in a partial response.
|
1756
|
+
# @param [String] quota_user
|
1757
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1758
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1759
|
+
# @param [Google::Apis::RequestOptions] options
|
1760
|
+
# Request-specific options
|
1761
|
+
#
|
1762
|
+
# @yield [result, err] Result & error if block supplied
|
1763
|
+
# @yieldparam result [Google::Apis::DriveV3::Operation] parsed result object
|
1764
|
+
# @yieldparam err [StandardError] error object if request failed
|
1765
|
+
#
|
1766
|
+
# @return [Google::Apis::DriveV3::Operation]
|
1767
|
+
#
|
1768
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1769
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1770
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1771
|
+
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
1772
|
+
command = make_simple_command(:get, 'operations/{name}', options)
|
1773
|
+
command.response_representation = Google::Apis::DriveV3::Operation::Representation
|
1774
|
+
command.response_class = Google::Apis::DriveV3::Operation
|
1775
|
+
command.params['name'] = name unless name.nil?
|
1776
|
+
command.query['fields'] = fields unless fields.nil?
|
1777
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1778
|
+
execute_or_queue_command(command, &block)
|
1779
|
+
end
|
1780
|
+
|
1781
|
+
# Lists operations that match the specified filter in the request. If the server
|
1782
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`.
|
1783
|
+
# @param [String] filter
|
1784
|
+
# The standard list filter.
|
1785
|
+
# @param [String] name
|
1786
|
+
# The name of the operation's parent resource.
|
1787
|
+
# @param [Fixnum] page_size
|
1788
|
+
# The standard list page size.
|
1789
|
+
# @param [String] page_token
|
1790
|
+
# The standard list page token.
|
1791
|
+
# @param [String] fields
|
1792
|
+
# Selector specifying which fields to include in a partial response.
|
1793
|
+
# @param [String] quota_user
|
1794
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1795
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1796
|
+
# @param [Google::Apis::RequestOptions] options
|
1797
|
+
# Request-specific options
|
1798
|
+
#
|
1799
|
+
# @yield [result, err] Result & error if block supplied
|
1800
|
+
# @yieldparam result [Google::Apis::DriveV3::ListOperationsResponse] parsed result object
|
1801
|
+
# @yieldparam err [StandardError] error object if request failed
|
1802
|
+
#
|
1803
|
+
# @return [Google::Apis::DriveV3::ListOperationsResponse]
|
1804
|
+
#
|
1805
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1806
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1807
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1808
|
+
def list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1809
|
+
command = make_simple_command(:get, 'operations', options)
|
1810
|
+
command.response_representation = Google::Apis::DriveV3::ListOperationsResponse::Representation
|
1811
|
+
command.response_class = Google::Apis::DriveV3::ListOperationsResponse
|
1812
|
+
command.query['filter'] = filter unless filter.nil?
|
1813
|
+
command.query['name'] = name unless name.nil?
|
1814
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1815
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1816
|
+
command.query['fields'] = fields unless fields.nil?
|
1817
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1818
|
+
execute_or_queue_command(command, &block)
|
1819
|
+
end
|
1820
|
+
|
1821
|
+
# Creates a permission for a file or shared drive. **Warning:** Concurrent
|
1822
|
+
# permissions operations on the same file are not supported; only the last
|
1823
|
+
# update is applied.
|
1484
1824
|
# @param [String] file_id
|
1485
1825
|
# The ID of the file or shared drive.
|
1486
1826
|
# @param [Google::Apis::DriveV3::Permission] permission_object
|
1487
1827
|
# @param [String] email_message
|
1488
1828
|
# A plain text custom message to include in the notification email.
|
1489
1829
|
# @param [Boolean] enforce_single_parent
|
1490
|
-
# Deprecated
|
1830
|
+
# Deprecated: See `moveToNewOwnersRoot` for details.
|
1491
1831
|
# @param [Boolean] move_to_new_owners_root
|
1492
1832
|
# This parameter will only take effect if the item is not in a shared drive and
|
1493
|
-
# the request is attempting to transfer the ownership of the item. If set to
|
1494
|
-
# true
|
1495
|
-
# prior parents removed. If set to false
|
1833
|
+
# the request is attempting to transfer the ownership of the item. If set to `
|
1834
|
+
# true`, the item will be moved to the new owner's My Drive root folder and all
|
1835
|
+
# prior parents removed. If set to `false`, parents are not changed.
|
1496
1836
|
# @param [Boolean] send_notification_email
|
1497
1837
|
# Whether to send a notification email when sharing to users or groups. This
|
1498
1838
|
# defaults to true for users and groups, and is not allowed for other requests.
|
@@ -1500,15 +1840,11 @@ module Google
|
|
1500
1840
|
# @param [Boolean] supports_all_drives
|
1501
1841
|
# Whether the requesting application supports both My Drives and shared drives.
|
1502
1842
|
# @param [Boolean] supports_team_drives
|
1503
|
-
# Deprecated
|
1843
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1504
1844
|
# @param [Boolean] transfer_ownership
|
1505
1845
|
# Whether to transfer ownership to the specified user and downgrade the current
|
1506
1846
|
# owner to a writer. This parameter is required as an acknowledgement of the
|
1507
|
-
# side effect.
|
1508
|
-
# Drive. Files existing in a shared drive are owned by the organization that
|
1509
|
-
# owns that shared drive. Ownership transfers are not supported for files and
|
1510
|
-
# folders in shared drives. Organizers of a shared drive can move items from
|
1511
|
-
# that shared drive into their My Drive which transfers the ownership to them.
|
1847
|
+
# side effect.
|
1512
1848
|
# @param [Boolean] use_domain_admin_access
|
1513
1849
|
# Issue the request as a domain administrator; if set to true, then the
|
1514
1850
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1517,10 +1853,8 @@ module Google
|
|
1517
1853
|
# @param [String] fields
|
1518
1854
|
# Selector specifying which fields to include in a partial response.
|
1519
1855
|
# @param [String] quota_user
|
1520
|
-
#
|
1521
|
-
# characters.
|
1522
|
-
# @param [String] user_ip
|
1523
|
-
# 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.
|
1524
1858
|
# @param [Google::Apis::RequestOptions] options
|
1525
1859
|
# Request-specific options
|
1526
1860
|
#
|
@@ -1533,7 +1867,7 @@ module Google
|
|
1533
1867
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1534
1868
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1535
1869
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1536
|
-
def create_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_email: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1870
|
+
def create_permission(file_id, permission_object = nil, email_message: nil, enforce_single_parent: nil, move_to_new_owners_root: nil, send_notification_email: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1537
1871
|
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
1538
1872
|
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1539
1873
|
command.request_object = permission_object
|
@@ -1550,11 +1884,11 @@ module Google
|
|
1550
1884
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1551
1885
|
command.query['fields'] = fields unless fields.nil?
|
1552
1886
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1553
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1554
1887
|
execute_or_queue_command(command, &block)
|
1555
1888
|
end
|
1556
1889
|
|
1557
|
-
# Deletes a permission.
|
1890
|
+
# Deletes a permission. **Warning:** Concurrent permissions operations on the
|
1891
|
+
# same file are not supported; only the last update is applied.
|
1558
1892
|
# @param [String] file_id
|
1559
1893
|
# The ID of the file or shared drive.
|
1560
1894
|
# @param [String] permission_id
|
@@ -1562,7 +1896,7 @@ module Google
|
|
1562
1896
|
# @param [Boolean] supports_all_drives
|
1563
1897
|
# Whether the requesting application supports both My Drives and shared drives.
|
1564
1898
|
# @param [Boolean] supports_team_drives
|
1565
|
-
# Deprecated
|
1899
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1566
1900
|
# @param [Boolean] use_domain_admin_access
|
1567
1901
|
# Issue the request as a domain administrator; if set to true, then the
|
1568
1902
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1571,10 +1905,8 @@ module Google
|
|
1571
1905
|
# @param [String] fields
|
1572
1906
|
# Selector specifying which fields to include in a partial response.
|
1573
1907
|
# @param [String] quota_user
|
1574
|
-
#
|
1575
|
-
# characters.
|
1576
|
-
# @param [String] user_ip
|
1577
|
-
# Deprecated. Please use quotaUser instead.
|
1908
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1909
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1578
1910
|
# @param [Google::Apis::RequestOptions] options
|
1579
1911
|
# Request-specific options
|
1580
1912
|
#
|
@@ -1587,7 +1919,7 @@ module Google
|
|
1587
1919
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1588
1920
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1589
1921
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1590
|
-
def delete_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1922
|
+
def delete_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1591
1923
|
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
1592
1924
|
command.params['fileId'] = file_id unless file_id.nil?
|
1593
1925
|
command.params['permissionId'] = permission_id unless permission_id.nil?
|
@@ -1596,7 +1928,6 @@ module Google
|
|
1596
1928
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1597
1929
|
command.query['fields'] = fields unless fields.nil?
|
1598
1930
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1599
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1600
1931
|
execute_or_queue_command(command, &block)
|
1601
1932
|
end
|
1602
1933
|
|
@@ -1608,7 +1939,7 @@ module Google
|
|
1608
1939
|
# @param [Boolean] supports_all_drives
|
1609
1940
|
# Whether the requesting application supports both My Drives and shared drives.
|
1610
1941
|
# @param [Boolean] supports_team_drives
|
1611
|
-
# Deprecated
|
1942
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1612
1943
|
# @param [Boolean] use_domain_admin_access
|
1613
1944
|
# Issue the request as a domain administrator; if set to true, then the
|
1614
1945
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1617,10 +1948,8 @@ module Google
|
|
1617
1948
|
# @param [String] fields
|
1618
1949
|
# Selector specifying which fields to include in a partial response.
|
1619
1950
|
# @param [String] quota_user
|
1620
|
-
#
|
1621
|
-
# characters.
|
1622
|
-
# @param [String] user_ip
|
1623
|
-
# Deprecated. Please use quotaUser instead.
|
1951
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1952
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1624
1953
|
# @param [Google::Apis::RequestOptions] options
|
1625
1954
|
# Request-specific options
|
1626
1955
|
#
|
@@ -1633,7 +1962,7 @@ module Google
|
|
1633
1962
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1634
1963
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1635
1964
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1636
|
-
def get_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
1965
|
+
def get_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1637
1966
|
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
1638
1967
|
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
1639
1968
|
command.response_class = Google::Apis::DriveV3::Permission
|
@@ -1644,7 +1973,6 @@ module Google
|
|
1644
1973
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1645
1974
|
command.query['fields'] = fields unless fields.nil?
|
1646
1975
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1647
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1648
1976
|
execute_or_queue_command(command, &block)
|
1649
1977
|
end
|
1650
1978
|
|
@@ -1664,7 +1992,7 @@ module Google
|
|
1664
1992
|
# @param [Boolean] supports_all_drives
|
1665
1993
|
# Whether the requesting application supports both My Drives and shared drives.
|
1666
1994
|
# @param [Boolean] supports_team_drives
|
1667
|
-
# Deprecated
|
1995
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1668
1996
|
# @param [Boolean] use_domain_admin_access
|
1669
1997
|
# Issue the request as a domain administrator; if set to true, then the
|
1670
1998
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1673,10 +2001,8 @@ module Google
|
|
1673
2001
|
# @param [String] fields
|
1674
2002
|
# Selector specifying which fields to include in a partial response.
|
1675
2003
|
# @param [String] quota_user
|
1676
|
-
#
|
1677
|
-
# characters.
|
1678
|
-
# @param [String] user_ip
|
1679
|
-
# Deprecated. Please use quotaUser instead.
|
2004
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2005
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1680
2006
|
# @param [Google::Apis::RequestOptions] options
|
1681
2007
|
# Request-specific options
|
1682
2008
|
#
|
@@ -1689,7 +2015,7 @@ module Google
|
|
1689
2015
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1690
2016
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1691
2017
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1692
|
-
def list_permissions(file_id, include_permissions_for_view: nil, page_size: nil, page_token: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2018
|
+
def list_permissions(file_id, include_permissions_for_view: nil, page_size: nil, page_token: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1693
2019
|
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
1694
2020
|
command.response_representation = Google::Apis::DriveV3::PermissionList::Representation
|
1695
2021
|
command.response_class = Google::Apis::DriveV3::PermissionList
|
@@ -1702,11 +2028,11 @@ module Google
|
|
1702
2028
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1703
2029
|
command.query['fields'] = fields unless fields.nil?
|
1704
2030
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1705
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1706
2031
|
execute_or_queue_command(command, &block)
|
1707
2032
|
end
|
1708
2033
|
|
1709
|
-
# Updates a permission with patch semantics.
|
2034
|
+
# Updates a permission with patch semantics. **Warning:** Concurrent permissions
|
2035
|
+
# operations on the same file are not supported; only the last update is applied.
|
1710
2036
|
# @param [String] file_id
|
1711
2037
|
# The ID of the file or shared drive.
|
1712
2038
|
# @param [String] permission_id
|
@@ -1717,15 +2043,11 @@ module Google
|
|
1717
2043
|
# @param [Boolean] supports_all_drives
|
1718
2044
|
# Whether the requesting application supports both My Drives and shared drives.
|
1719
2045
|
# @param [Boolean] supports_team_drives
|
1720
|
-
# Deprecated
|
2046
|
+
# Deprecated: Use `supportsAllDrives` instead.
|
1721
2047
|
# @param [Boolean] transfer_ownership
|
1722
2048
|
# Whether to transfer ownership to the specified user and downgrade the current
|
1723
2049
|
# owner to a writer. This parameter is required as an acknowledgement of the
|
1724
|
-
# side effect.
|
1725
|
-
# Drive. Files existing in a shared drive are owned by the organization that
|
1726
|
-
# owns that shared drive. Ownership transfers are not supported for files and
|
1727
|
-
# folders in shared drives. Organizers of a shared drive can move items from
|
1728
|
-
# that shared drive into their My Drive which transfers the ownership to them.
|
2050
|
+
# side effect.
|
1729
2051
|
# @param [Boolean] use_domain_admin_access
|
1730
2052
|
# Issue the request as a domain administrator; if set to true, then the
|
1731
2053
|
# requester will be granted access if the file ID parameter refers to a shared
|
@@ -1734,10 +2056,8 @@ module Google
|
|
1734
2056
|
# @param [String] fields
|
1735
2057
|
# Selector specifying which fields to include in a partial response.
|
1736
2058
|
# @param [String] quota_user
|
1737
|
-
#
|
1738
|
-
# characters.
|
1739
|
-
# @param [String] user_ip
|
1740
|
-
# Deprecated. Please use quotaUser instead.
|
2059
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2060
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1741
2061
|
# @param [Google::Apis::RequestOptions] options
|
1742
2062
|
# Request-specific options
|
1743
2063
|
#
|
@@ -1750,7 +2070,7 @@ module Google
|
|
1750
2070
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1751
2071
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1752
2072
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1753
|
-
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2073
|
+
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_all_drives: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1754
2074
|
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
1755
2075
|
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
1756
2076
|
command.request_object = permission_object
|
@@ -1765,11 +2085,10 @@ module Google
|
|
1765
2085
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
1766
2086
|
command.query['fields'] = fields unless fields.nil?
|
1767
2087
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1768
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1769
2088
|
execute_or_queue_command(command, &block)
|
1770
2089
|
end
|
1771
2090
|
|
1772
|
-
# Creates a
|
2091
|
+
# Creates a reply to a comment.
|
1773
2092
|
# @param [String] file_id
|
1774
2093
|
# The ID of the file.
|
1775
2094
|
# @param [String] comment_id
|
@@ -1778,10 +2097,8 @@ module Google
|
|
1778
2097
|
# @param [String] fields
|
1779
2098
|
# Selector specifying which fields to include in a partial response.
|
1780
2099
|
# @param [String] quota_user
|
1781
|
-
#
|
1782
|
-
# characters.
|
1783
|
-
# @param [String] user_ip
|
1784
|
-
# Deprecated. Please use quotaUser instead.
|
2100
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2101
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1785
2102
|
# @param [Google::Apis::RequestOptions] options
|
1786
2103
|
# Request-specific options
|
1787
2104
|
#
|
@@ -1794,7 +2111,7 @@ module Google
|
|
1794
2111
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1795
2112
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1796
2113
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1797
|
-
def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil,
|
2114
|
+
def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1798
2115
|
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
1799
2116
|
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1800
2117
|
command.request_object = reply_object
|
@@ -1804,7 +2121,6 @@ module Google
|
|
1804
2121
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
1805
2122
|
command.query['fields'] = fields unless fields.nil?
|
1806
2123
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1807
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1808
2124
|
execute_or_queue_command(command, &block)
|
1809
2125
|
end
|
1810
2126
|
|
@@ -1818,10 +2134,8 @@ module Google
|
|
1818
2134
|
# @param [String] fields
|
1819
2135
|
# Selector specifying which fields to include in a partial response.
|
1820
2136
|
# @param [String] quota_user
|
1821
|
-
#
|
1822
|
-
# characters.
|
1823
|
-
# @param [String] user_ip
|
1824
|
-
# Deprecated. Please use quotaUser instead.
|
2137
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2138
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1825
2139
|
# @param [Google::Apis::RequestOptions] options
|
1826
2140
|
# Request-specific options
|
1827
2141
|
#
|
@@ -1834,14 +2148,13 @@ module Google
|
|
1834
2148
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1835
2149
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1836
2150
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1837
|
-
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil,
|
2151
|
+
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, options: nil, &block)
|
1838
2152
|
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1839
2153
|
command.params['fileId'] = file_id unless file_id.nil?
|
1840
2154
|
command.params['commentId'] = comment_id unless comment_id.nil?
|
1841
2155
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
1842
2156
|
command.query['fields'] = fields unless fields.nil?
|
1843
2157
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1844
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1845
2158
|
execute_or_queue_command(command, &block)
|
1846
2159
|
end
|
1847
2160
|
|
@@ -1858,10 +2171,8 @@ module Google
|
|
1858
2171
|
# @param [String] fields
|
1859
2172
|
# Selector specifying which fields to include in a partial response.
|
1860
2173
|
# @param [String] quota_user
|
1861
|
-
#
|
1862
|
-
# characters.
|
1863
|
-
# @param [String] user_ip
|
1864
|
-
# Deprecated. Please use quotaUser instead.
|
2174
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2175
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1865
2176
|
# @param [Google::Apis::RequestOptions] options
|
1866
2177
|
# Request-specific options
|
1867
2178
|
#
|
@@ -1874,7 +2185,7 @@ module Google
|
|
1874
2185
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1875
2186
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1876
2187
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1877
|
-
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil,
|
2188
|
+
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1878
2189
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1879
2190
|
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
1880
2191
|
command.response_class = Google::Apis::DriveV3::Reply
|
@@ -1884,7 +2195,6 @@ module Google
|
|
1884
2195
|
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
1885
2196
|
command.query['fields'] = fields unless fields.nil?
|
1886
2197
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1887
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1888
2198
|
execute_or_queue_command(command, &block)
|
1889
2199
|
end
|
1890
2200
|
|
@@ -1904,10 +2214,8 @@ module Google
|
|
1904
2214
|
# @param [String] fields
|
1905
2215
|
# Selector specifying which fields to include in a partial response.
|
1906
2216
|
# @param [String] quota_user
|
1907
|
-
#
|
1908
|
-
# characters.
|
1909
|
-
# @param [String] user_ip
|
1910
|
-
# Deprecated. Please use quotaUser instead.
|
2217
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2218
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1911
2219
|
# @param [Google::Apis::RequestOptions] options
|
1912
2220
|
# Request-specific options
|
1913
2221
|
#
|
@@ -1920,7 +2228,7 @@ module Google
|
|
1920
2228
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1921
2229
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1922
2230
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1923
|
-
def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil,
|
2231
|
+
def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1924
2232
|
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
1925
2233
|
command.response_representation = Google::Apis::DriveV3::ReplyList::Representation
|
1926
2234
|
command.response_class = Google::Apis::DriveV3::ReplyList
|
@@ -1931,7 +2239,6 @@ module Google
|
|
1931
2239
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1932
2240
|
command.query['fields'] = fields unless fields.nil?
|
1933
2241
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1934
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1935
2242
|
execute_or_queue_command(command, &block)
|
1936
2243
|
end
|
1937
2244
|
|
@@ -1946,10 +2253,8 @@ module Google
|
|
1946
2253
|
# @param [String] fields
|
1947
2254
|
# Selector specifying which fields to include in a partial response.
|
1948
2255
|
# @param [String] quota_user
|
1949
|
-
#
|
1950
|
-
# characters.
|
1951
|
-
# @param [String] user_ip
|
1952
|
-
# Deprecated. Please use quotaUser instead.
|
2256
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2257
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1953
2258
|
# @param [Google::Apis::RequestOptions] options
|
1954
2259
|
# Request-specific options
|
1955
2260
|
#
|
@@ -1962,7 +2267,7 @@ module Google
|
|
1962
2267
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1963
2268
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1964
2269
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1965
|
-
def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil,
|
2270
|
+
def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1966
2271
|
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
1967
2272
|
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
1968
2273
|
command.request_object = reply_object
|
@@ -1973,7 +2278,6 @@ module Google
|
|
1973
2278
|
command.params['replyId'] = reply_id unless reply_id.nil?
|
1974
2279
|
command.query['fields'] = fields unless fields.nil?
|
1975
2280
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1976
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
1977
2281
|
execute_or_queue_command(command, &block)
|
1978
2282
|
end
|
1979
2283
|
|
@@ -1988,10 +2292,8 @@ module Google
|
|
1988
2292
|
# @param [String] fields
|
1989
2293
|
# Selector specifying which fields to include in a partial response.
|
1990
2294
|
# @param [String] quota_user
|
1991
|
-
#
|
1992
|
-
# characters.
|
1993
|
-
# @param [String] user_ip
|
1994
|
-
# Deprecated. Please use quotaUser instead.
|
2295
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2296
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1995
2297
|
# @param [Google::Apis::RequestOptions] options
|
1996
2298
|
# Request-specific options
|
1997
2299
|
#
|
@@ -2004,13 +2306,12 @@ module Google
|
|
2004
2306
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2005
2307
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2006
2308
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2007
|
-
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil,
|
2309
|
+
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, options: nil, &block)
|
2008
2310
|
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
2009
2311
|
command.params['fileId'] = file_id unless file_id.nil?
|
2010
2312
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
2011
2313
|
command.query['fields'] = fields unless fields.nil?
|
2012
2314
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2013
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2014
2315
|
execute_or_queue_command(command, &block)
|
2015
2316
|
end
|
2016
2317
|
|
@@ -2021,14 +2322,14 @@ module Google
|
|
2021
2322
|
# The ID of the revision.
|
2022
2323
|
# @param [Boolean] acknowledge_abuse
|
2023
2324
|
# Whether the user is acknowledging the risk of downloading known malware or
|
2024
|
-
# other abusive files. This is only applicable when alt
|
2325
|
+
# other abusive files. This is only applicable when the `alt` parameter is set
|
2326
|
+
# to `media` and the user is the owner of the file or an organizer of the shared
|
2327
|
+
# drive in which the file resides.
|
2025
2328
|
# @param [String] fields
|
2026
2329
|
# Selector specifying which fields to include in a partial response.
|
2027
2330
|
# @param [String] quota_user
|
2028
|
-
#
|
2029
|
-
# characters.
|
2030
|
-
# @param [String] user_ip
|
2031
|
-
# Deprecated. Please use quotaUser instead.
|
2331
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2332
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2032
2333
|
# @param [IO, String] download_dest
|
2033
2334
|
# IO stream or filename to receive content download
|
2034
2335
|
# @param [Google::Apis::RequestOptions] options
|
@@ -2043,7 +2344,7 @@ module Google
|
|
2043
2344
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2044
2345
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2045
2346
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2046
|
-
def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil,
|
2347
|
+
def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
2047
2348
|
if download_dest.nil?
|
2048
2349
|
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
2049
2350
|
else
|
@@ -2057,7 +2358,6 @@ module Google
|
|
2057
2358
|
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
2058
2359
|
command.query['fields'] = fields unless fields.nil?
|
2059
2360
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2060
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2061
2361
|
execute_or_queue_command(command, &block)
|
2062
2362
|
end
|
2063
2363
|
|
@@ -2072,10 +2372,8 @@ module Google
|
|
2072
2372
|
# @param [String] fields
|
2073
2373
|
# Selector specifying which fields to include in a partial response.
|
2074
2374
|
# @param [String] quota_user
|
2075
|
-
#
|
2076
|
-
# characters.
|
2077
|
-
# @param [String] user_ip
|
2078
|
-
# Deprecated. Please use quotaUser instead.
|
2375
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2376
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2079
2377
|
# @param [Google::Apis::RequestOptions] options
|
2080
2378
|
# Request-specific options
|
2081
2379
|
#
|
@@ -2088,7 +2386,7 @@ module Google
|
|
2088
2386
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2089
2387
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2090
2388
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2091
|
-
def list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil,
|
2389
|
+
def list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2092
2390
|
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
2093
2391
|
command.response_representation = Google::Apis::DriveV3::RevisionList::Representation
|
2094
2392
|
command.response_class = Google::Apis::DriveV3::RevisionList
|
@@ -2097,7 +2395,6 @@ module Google
|
|
2097
2395
|
command.query['pageToken'] = page_token unless page_token.nil?
|
2098
2396
|
command.query['fields'] = fields unless fields.nil?
|
2099
2397
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2100
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2101
2398
|
execute_or_queue_command(command, &block)
|
2102
2399
|
end
|
2103
2400
|
|
@@ -2110,10 +2407,8 @@ module Google
|
|
2110
2407
|
# @param [String] fields
|
2111
2408
|
# Selector specifying which fields to include in a partial response.
|
2112
2409
|
# @param [String] quota_user
|
2113
|
-
#
|
2114
|
-
# characters.
|
2115
|
-
# @param [String] user_ip
|
2116
|
-
# Deprecated. Please use quotaUser instead.
|
2410
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2411
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2117
2412
|
# @param [Google::Apis::RequestOptions] options
|
2118
2413
|
# Request-specific options
|
2119
2414
|
#
|
@@ -2126,7 +2421,7 @@ module Google
|
|
2126
2421
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2127
2422
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2128
2423
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2129
|
-
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil,
|
2424
|
+
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2130
2425
|
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
2131
2426
|
command.request_representation = Google::Apis::DriveV3::Revision::Representation
|
2132
2427
|
command.request_object = revision_object
|
@@ -2136,25 +2431,22 @@ module Google
|
|
2136
2431
|
command.params['revisionId'] = revision_id unless revision_id.nil?
|
2137
2432
|
command.query['fields'] = fields unless fields.nil?
|
2138
2433
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2139
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2140
2434
|
execute_or_queue_command(command, &block)
|
2141
2435
|
end
|
2142
2436
|
|
2143
|
-
# Deprecated
|
2437
|
+
# Deprecated: Use `drives.create` instead.
|
2144
2438
|
# @param [String] request_id
|
2145
|
-
# An ID, such as a random UUID, which uniquely identifies this user's
|
2146
|
-
# for idempotent creation of a Team Drive. A repeated request by the
|
2147
|
-
# and with the same request ID will avoid creating duplicates by
|
2148
|
-
# create the same Team Drive. If the Team Drive already exists a
|
2149
|
-
# be returned.
|
2439
|
+
# Required. An ID, such as a random UUID, which uniquely identifies this user's
|
2440
|
+
# request for idempotent creation of a Team Drive. A repeated request by the
|
2441
|
+
# same user and with the same request ID will avoid creating duplicates by
|
2442
|
+
# attempting to create the same Team Drive. If the Team Drive already exists a
|
2443
|
+
# 409 error will be returned.
|
2150
2444
|
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
2151
2445
|
# @param [String] fields
|
2152
2446
|
# Selector specifying which fields to include in a partial response.
|
2153
2447
|
# @param [String] quota_user
|
2154
|
-
#
|
2155
|
-
# characters.
|
2156
|
-
# @param [String] user_ip
|
2157
|
-
# Deprecated. Please use quotaUser instead.
|
2448
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2449
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2158
2450
|
# @param [Google::Apis::RequestOptions] options
|
2159
2451
|
# Request-specific options
|
2160
2452
|
#
|
@@ -2167,7 +2459,7 @@ module Google
|
|
2167
2459
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2168
2460
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2169
2461
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2170
|
-
def create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil,
|
2462
|
+
def create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2171
2463
|
command = make_simple_command(:post, 'teamdrives', options)
|
2172
2464
|
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2173
2465
|
command.request_object = team_drive_object
|
@@ -2176,20 +2468,17 @@ module Google
|
|
2176
2468
|
command.query['requestId'] = request_id unless request_id.nil?
|
2177
2469
|
command.query['fields'] = fields unless fields.nil?
|
2178
2470
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2179
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2180
2471
|
execute_or_queue_command(command, &block)
|
2181
2472
|
end
|
2182
2473
|
|
2183
|
-
# Deprecated
|
2474
|
+
# Deprecated: Use `drives.delete` instead.
|
2184
2475
|
# @param [String] team_drive_id
|
2185
2476
|
# The ID of the Team Drive
|
2186
2477
|
# @param [String] fields
|
2187
2478
|
# Selector specifying which fields to include in a partial response.
|
2188
2479
|
# @param [String] quota_user
|
2189
|
-
#
|
2190
|
-
# characters.
|
2191
|
-
# @param [String] user_ip
|
2192
|
-
# Deprecated. Please use quotaUser instead.
|
2480
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2481
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2193
2482
|
# @param [Google::Apis::RequestOptions] options
|
2194
2483
|
# Request-specific options
|
2195
2484
|
#
|
@@ -2202,16 +2491,15 @@ module Google
|
|
2202
2491
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2203
2492
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2204
2493
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2205
|
-
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil,
|
2494
|
+
def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, options: nil, &block)
|
2206
2495
|
command = make_simple_command(:delete, 'teamdrives/{teamDriveId}', options)
|
2207
2496
|
command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil?
|
2208
2497
|
command.query['fields'] = fields unless fields.nil?
|
2209
2498
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2210
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2211
2499
|
execute_or_queue_command(command, &block)
|
2212
2500
|
end
|
2213
2501
|
|
2214
|
-
# Deprecated
|
2502
|
+
# Deprecated: Use `drives.get` instead.
|
2215
2503
|
# @param [String] team_drive_id
|
2216
2504
|
# The ID of the Team Drive
|
2217
2505
|
# @param [Boolean] use_domain_admin_access
|
@@ -2221,10 +2509,8 @@ module Google
|
|
2221
2509
|
# @param [String] fields
|
2222
2510
|
# Selector specifying which fields to include in a partial response.
|
2223
2511
|
# @param [String] quota_user
|
2224
|
-
#
|
2225
|
-
# characters.
|
2226
|
-
# @param [String] user_ip
|
2227
|
-
# Deprecated. Please use quotaUser instead.
|
2512
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2513
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2228
2514
|
# @param [Google::Apis::RequestOptions] options
|
2229
2515
|
# Request-specific options
|
2230
2516
|
#
|
@@ -2237,7 +2523,7 @@ module Google
|
|
2237
2523
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2238
2524
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2239
2525
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2240
|
-
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2526
|
+
def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2241
2527
|
command = make_simple_command(:get, 'teamdrives/{teamDriveId}', options)
|
2242
2528
|
command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2243
2529
|
command.response_class = Google::Apis::DriveV3::TeamDrive
|
@@ -2245,11 +2531,10 @@ module Google
|
|
2245
2531
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2246
2532
|
command.query['fields'] = fields unless fields.nil?
|
2247
2533
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2248
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2249
2534
|
execute_or_queue_command(command, &block)
|
2250
2535
|
end
|
2251
2536
|
|
2252
|
-
# Deprecated
|
2537
|
+
# Deprecated: Use `drives.list` instead.
|
2253
2538
|
# @param [Fixnum] page_size
|
2254
2539
|
# Maximum number of Team Drives to return.
|
2255
2540
|
# @param [String] page_token
|
@@ -2262,10 +2547,8 @@ module Google
|
|
2262
2547
|
# @param [String] fields
|
2263
2548
|
# Selector specifying which fields to include in a partial response.
|
2264
2549
|
# @param [String] quota_user
|
2265
|
-
#
|
2266
|
-
# characters.
|
2267
|
-
# @param [String] user_ip
|
2268
|
-
# Deprecated. Please use quotaUser instead.
|
2550
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2551
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2269
2552
|
# @param [Google::Apis::RequestOptions] options
|
2270
2553
|
# Request-specific options
|
2271
2554
|
#
|
@@ -2278,7 +2561,7 @@ module Google
|
|
2278
2561
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2279
2562
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2280
2563
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2281
|
-
def list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2564
|
+
def list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2282
2565
|
command = make_simple_command(:get, 'teamdrives', options)
|
2283
2566
|
command.response_representation = Google::Apis::DriveV3::TeamDriveList::Representation
|
2284
2567
|
command.response_class = Google::Apis::DriveV3::TeamDriveList
|
@@ -2288,11 +2571,10 @@ module Google
|
|
2288
2571
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2289
2572
|
command.query['fields'] = fields unless fields.nil?
|
2290
2573
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2291
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2292
2574
|
execute_or_queue_command(command, &block)
|
2293
2575
|
end
|
2294
2576
|
|
2295
|
-
# Deprecated
|
2577
|
+
# Deprecated: Use `drives.update` instead.
|
2296
2578
|
# @param [String] team_drive_id
|
2297
2579
|
# The ID of the Team Drive
|
2298
2580
|
# @param [Google::Apis::DriveV3::TeamDrive] team_drive_object
|
@@ -2303,10 +2585,8 @@ module Google
|
|
2303
2585
|
# @param [String] fields
|
2304
2586
|
# Selector specifying which fields to include in a partial response.
|
2305
2587
|
# @param [String] quota_user
|
2306
|
-
#
|
2307
|
-
# characters.
|
2308
|
-
# @param [String] user_ip
|
2309
|
-
# Deprecated. Please use quotaUser instead.
|
2588
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2589
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2310
2590
|
# @param [Google::Apis::RequestOptions] options
|
2311
2591
|
# Request-specific options
|
2312
2592
|
#
|
@@ -2319,7 +2599,7 @@ module Google
|
|
2319
2599
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2320
2600
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2321
2601
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2322
|
-
def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil,
|
2602
|
+
def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2323
2603
|
command = make_simple_command(:patch, 'teamdrives/{teamDriveId}', options)
|
2324
2604
|
command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation
|
2325
2605
|
command.request_object = team_drive_object
|
@@ -2329,7 +2609,6 @@ module Google
|
|
2329
2609
|
command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil?
|
2330
2610
|
command.query['fields'] = fields unless fields.nil?
|
2331
2611
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2332
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2333
2612
|
execute_or_queue_command(command, &block)
|
2334
2613
|
end
|
2335
2614
|
|
@@ -2338,7 +2617,6 @@ module Google
|
|
2338
2617
|
def apply_command_defaults(command)
|
2339
2618
|
command.query['key'] = key unless key.nil?
|
2340
2619
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2341
|
-
command.query['userIp'] = user_ip unless user_ip.nil?
|
2342
2620
|
end
|
2343
2621
|
end
|
2344
2622
|
end
|