Class: Google::Apis::DriveV3::DriveService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DriveV3::DriveService
- Defined in:
- generated/google/apis/drive_v3/service.rb
Overview
Drive API
Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#copy_file(file_id, file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Creates a copy of a file and applies any requested updates with patch semantics.
-
#create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Creates a new comment on a file.
-
#create_file(file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Creates a new file.
-
#create_permission(file_id, permission_object = nil, email_message: nil, send_notification_email: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Creates a permission for a file or Team Drive.
-
#create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Creates a new reply to a comment.
-
#create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Creates a new Team Drive.
-
#delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a comment.
-
#delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a file owned by the user without moving it to the trash.
-
#delete_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a permission.
-
#delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a reply.
-
#delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a revision.
-
#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a Team Drive for which the user is an organizer.
-
#empty_file_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes all of the user's trashed files.
-
#export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }
Exports a Google Doc to the requested MIME type and returns the exported content.
-
#generate_file_ids(count: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::GeneratedIds
Generates a set of file IDs which can be provided in create requests.
-
#get_about(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::About
Gets information about the user, the user's Drive, and system capabilities.
-
#get_changes_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::StartPageToken
Gets the starting pageToken for listing future changes.
-
#get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Gets a comment by ID.
-
#get_file(file_id, acknowledge_abuse: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Gets a file's metadata or content by ID.
-
#get_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Gets a permission by ID.
-
#get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Gets a reply by ID.
-
#get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Revision
Gets a revision's metadata or content by ID.
-
#get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Gets a Team Drive's metadata by ID.
-
#initialize ⇒ DriveService
constructor
A new instance of DriveService.
-
#list_changes(page_token, include_corpus_removals: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ChangeList
Lists the changes for a user or Team Drive.
-
#list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::CommentList
Lists a file's comments.
-
#list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::FileList
Lists or searches files.
-
#list_permissions(file_id, page_size: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::PermissionList
Lists a file's or Team Drive's permissions.
-
#list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ReplyList
Lists a comment's replies.
-
#list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::RevisionList
Lists a file's revisions.
-
#list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDriveList
Lists the user's Team Drives.
-
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Stop watching resources through this channel.
-
#update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Updates a comment with patch semantics.
-
#update_file(file_id, file_object = nil, add_parents: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Updates a file's metadata and/or content with patch semantics.
-
#update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Updates a permission with patch semantics.
-
#update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Updates a reply with patch semantics.
-
#update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Revision
Updates a revision with patch semantics.
-
#update_teamdrive(team_drive_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Updates a Team Drive's metadata.
-
#watch_change(page_token, channel_object = nil, include_corpus_removals: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes for a user.
-
#watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes to a file.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ DriveService
Returns a new instance of DriveService
52 53 54 55 |
# File 'generated/google/apis/drive_v3/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'drive/v3/') @batch_path = 'batch/drive/v3' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'generated/google/apis/drive_v3/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
45 46 47 |
# File 'generated/google/apis/drive_v3/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
50 51 52 |
# File 'generated/google/apis/drive_v3/service.rb', line 50 def user_ip @user_ip end |
Instance Method Details
#copy_file(file_id, file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Creates a copy of a file and applies any requested updates with patch semantics.
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'generated/google/apis/drive_v3/service.rb', line 549 def copy_file(file_id, file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/copy', ) command.request_representation = Google::Apis::DriveV3::File::Representation command.request_object = file_object command.response_representation = Google::Apis::DriveV3::File::Representation command.response_class = Google::Apis::DriveV3::File command.params['fileId'] = file_id unless file_id.nil? command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil? command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Creates a new comment on a file.
329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'generated/google/apis/drive_v3/service.rb', line 329 def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/comments', ) command.request_representation = Google::Apis::DriveV3::Comment::Representation command.request_object = comment_object command.response_representation = Google::Apis::DriveV3::Comment::Representation command.response_class = Google::Apis::DriveV3::Comment command.params['fileId'] = file_id unless file_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_file(file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Creates a new file.
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 |
# File 'generated/google/apis/drive_v3/service.rb', line 607 def create_file(file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'files', ) else command = make_upload_command(:post, 'files', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::DriveV3::File::Representation command.request_object = file_object command.response_representation = Google::Apis::DriveV3::File::Representation command.response_class = Google::Apis::DriveV3::File command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil? command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_permission(file_id, permission_object = nil, email_message: nil, send_notification_email: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Creates a permission for a file or Team Drive.
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 |
# File 'generated/google/apis/drive_v3/service.rb', line 1066 def (file_id, = nil, email_message: nil, send_notification_email: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/permissions', ) command.request_representation = Google::Apis::DriveV3::Permission::Representation command.request_object = command.response_representation = Google::Apis::DriveV3::Permission::Representation command.response_class = Google::Apis::DriveV3::Permission command.params['fileId'] = file_id unless file_id.nil? command.query['emailMessage'] = unless .nil? command.query['sendNotificationEmail'] = send_notification_email unless send_notification_email.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Creates a new reply to a comment.
1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 |
# File 'generated/google/apis/drive_v3/service.rb', line 1310 def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', ) command.request_representation = Google::Apis::DriveV3::Reply::Representation command.request_object = reply_object command.response_representation = Google::Apis::DriveV3::Reply::Representation command.response_class = Google::Apis::DriveV3::Reply command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Creates a new Team Drive.
1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 |
# File 'generated/google/apis/drive_v3/service.rb', line 1699 def create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'teamdrives', ) command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation command.request_object = team_drive_object command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation command.response_class = Google::Apis::DriveV3::TeamDrive command.query['requestId'] = request_id unless request_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a comment.
368 369 370 371 372 373 374 375 376 |
# File 'generated/google/apis/drive_v3/service.rb', line 368 def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.
659 660 661 662 663 664 665 666 667 |
# File 'generated/google/apis/drive_v3/service.rb', line 659 def delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}', ) command.params['fileId'] = file_id unless file_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a permission.
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 |
# File 'generated/google/apis/drive_v3/service.rb', line 1116 def (file_id, , supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a reply.
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 |
# File 'generated/google/apis/drive_v3/service.rb', line 1352 def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.params['replyId'] = reply_id unless reply_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a revision. This method is only applicable to files with binary content in Drive.
1528 1529 1530 1531 1532 1533 1534 1535 1536 |
# File 'generated/google/apis/drive_v3/service.rb', line 1528 def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['revisionId'] = revision_id unless revision_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items.
1737 1738 1739 1740 1741 1742 1743 1744 |
# File 'generated/google/apis/drive_v3/service.rb', line 1737 def delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'teamdrives/{teamDriveId}', ) command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#empty_file_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes all of the user's trashed files.
691 692 693 694 695 696 697 |
# File 'generated/google/apis/drive_v3/service.rb', line 691 def empty_file_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/trash', ) command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
# File 'generated/google/apis/drive_v3/service.rb', line 728 def export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'files/{fileId}/export', ) else command = make_download_command(:get, 'files/{fileId}/export', ) command.download_dest = download_dest end command.params['fileId'] = file_id unless file_id.nil? command.query['mimeType'] = mime_type unless mime_type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#generate_file_ids(count: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::GeneratedIds
Generates a set of file IDs which can be provided in create requests.
770 771 772 773 774 775 776 777 778 779 780 |
# File 'generated/google/apis/drive_v3/service.rb', line 770 def generate_file_ids(count: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/generateIds', ) command.response_representation = Google::Apis::DriveV3::GeneratedIds::Representation command.response_class = Google::Apis::DriveV3::GeneratedIds command.query['count'] = count unless count.nil? command.query['space'] = space unless space.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_about(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::About
Gets information about the user, the user's Drive, and system capabilities.
79 80 81 82 83 84 85 86 87 |
# File 'generated/google/apis/drive_v3/service.rb', line 79 def get_about(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'about', ) command.response_representation = Google::Apis::DriveV3::About::Representation command.response_class = Google::Apis::DriveV3::About command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_changes_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::StartPageToken
Gets the starting pageToken for listing future changes.
116 117 118 119 120 121 122 123 124 125 126 |
# File 'generated/google/apis/drive_v3/service.rb', line 116 def get_changes_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'changes/startPageToken', ) command.response_representation = Google::Apis::DriveV3::StartPageToken::Representation command.response_class = Google::Apis::DriveV3::StartPageToken command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Gets a comment by ID.
407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'generated/google/apis/drive_v3/service.rb', line 407 def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', ) command.response_representation = Google::Apis::DriveV3::Comment::Representation command.response_class = Google::Apis::DriveV3::Comment command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_file(file_id, acknowledge_abuse: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Gets a file's metadata or content by ID.
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 |
# File 'generated/google/apis/drive_v3/service.rb', line 813 def get_file(file_id, acknowledge_abuse: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'files/{fileId}', ) else command = make_download_command(:get, 'files/{fileId}', ) command.download_dest = download_dest end command.response_representation = Google::Apis::DriveV3::File::Representation command.response_class = Google::Apis::DriveV3::File command.params['fileId'] = file_id unless file_id.nil? command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Gets a permission by ID.
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 |
# File 'generated/google/apis/drive_v3/service.rb', line 1160 def (file_id, , supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', ) command.response_representation = Google::Apis::DriveV3::Permission::Representation command.response_class = Google::Apis::DriveV3::Permission command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Gets a reply by ID.
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 |
# File 'generated/google/apis/drive_v3/service.rb', line 1394 def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', ) command.response_representation = Google::Apis::DriveV3::Reply::Representation command.response_class = Google::Apis::DriveV3::Reply command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.params['replyId'] = reply_id unless reply_id.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Revision
Gets a revision's metadata or content by ID.
1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 |
# File 'generated/google/apis/drive_v3/service.rb', line 1569 def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', ) else command = make_download_command(:get, 'files/{fileId}/revisions/{revisionId}', ) command.download_dest = download_dest end command.response_representation = Google::Apis::DriveV3::Revision::Representation command.response_class = Google::Apis::DriveV3::Revision command.params['fileId'] = file_id unless file_id.nil? command.params['revisionId'] = revision_id unless revision_id.nil? command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Gets a Team Drive's metadata by ID.
1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 |
# File 'generated/google/apis/drive_v3/service.rb', line 1774 def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teamdrives/{teamDriveId}', ) command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation command.response_class = Google::Apis::DriveV3::TeamDrive command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_changes(page_token, include_corpus_removals: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ChangeList
Lists the changes for a user or Team Drive.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'generated/google/apis/drive_v3/service.rb', line 179 def list_changes(page_token, include_corpus_removals: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'changes', ) command.response_representation = Google::Apis::DriveV3::ChangeList::Representation command.response_class = Google::Apis::DriveV3::ChangeList command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil? command.query['includeRemoved'] = include_removed unless include_removed.nil? command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil? command.query['spaces'] = spaces unless spaces.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::CommentList
Lists a file's comments.
455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'generated/google/apis/drive_v3/service.rb', line 455 def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/comments', ) command.response_representation = Google::Apis::DriveV3::CommentList::Representation command.response_class = Google::Apis::DriveV3::CommentList command.params['fileId'] = file_id unless file_id.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['startModifiedTime'] = start_modified_time unless start_modified_time.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::FileList
Lists or searches files.
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 |
# File 'generated/google/apis/drive_v3/service.rb', line 886 def list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files', ) command.response_representation = Google::Apis::DriveV3::FileList::Representation command.response_class = Google::Apis::DriveV3::FileList command.query['corpora'] = corpora unless corpora.nil? command.query['corpus'] = corpus unless corpus.nil? command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['q'] = q unless q.nil? command.query['spaces'] = spaces unless spaces.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_permissions(file_id, page_size: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::PermissionList
Lists a file's or Team Drive's permissions.
1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 |
# File 'generated/google/apis/drive_v3/service.rb', line 1211 def (file_id, page_size: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/permissions', ) command.response_representation = Google::Apis::DriveV3::PermissionList::Representation command.response_class = Google::Apis::DriveV3::PermissionList command.params['fileId'] = file_id unless file_id.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ReplyList
Lists a comment's replies.
1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 |
# File 'generated/google/apis/drive_v3/service.rb', line 1442 def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', ) command.response_representation = Google::Apis::DriveV3::ReplyList::Representation command.response_class = Google::Apis::DriveV3::ReplyList command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::RevisionList
Lists a file's revisions.
1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 |
# File 'generated/google/apis/drive_v3/service.rb', line 1616 def list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/revisions', ) command.response_representation = Google::Apis::DriveV3::RevisionList::Representation command.response_class = Google::Apis::DriveV3::RevisionList command.params['fileId'] = file_id unless file_id.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDriveList
Lists the user's Team Drives.
1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 |
# File 'generated/google/apis/drive_v3/service.rb', line 1818 def list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teamdrives', ) command.response_representation = Google::Apis::DriveV3::TeamDriveList::Representation command.response_class = Google::Apis::DriveV3::TeamDriveList command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['q'] = q unless q.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Stop watching resources through this channel
294 295 296 297 298 299 300 301 302 |
# File 'generated/google/apis/drive_v3/service.rb', line 294 def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'channels/stop', ) command.request_representation = Google::Apis::DriveV3::Channel::Representation command.request_object = channel_object command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Updates a comment with patch semantics.
497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'generated/google/apis/drive_v3/service.rb', line 497 def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', ) command.request_representation = Google::Apis::DriveV3::Comment::Representation command.request_object = comment_object command.response_representation = Google::Apis::DriveV3::Comment::Representation command.response_class = Google::Apis::DriveV3::Comment command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_file(file_id, file_object = nil, add_parents: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Updates a file's metadata and/or content with patch semantics.
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'generated/google/apis/drive_v3/service.rb', line 948 def update_file(file_id, file_object = nil, add_parents: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:patch, 'files/{fileId}', ) else command = make_upload_command(:patch, 'files/{fileId}', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::DriveV3::File::Representation command.request_object = file_object command.response_representation = Google::Apis::DriveV3::File::Representation command.response_class = Google::Apis::DriveV3::File command.params['fileId'] = file_id unless file_id.nil? command.query['addParents'] = add_parents unless add_parents.nil? command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['removeParents'] = remove_parents unless remove_parents.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Updates a permission with patch semantics.
1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 |
# File 'generated/google/apis/drive_v3/service.rb', line 1265 def (file_id, , = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', ) command.request_representation = Google::Apis::DriveV3::Permission::Representation command.request_object = command.response_representation = Google::Apis::DriveV3::Permission::Representation command.response_class = Google::Apis::DriveV3::Permission command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Updates a reply with patch semantics.
1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 |
# File 'generated/google/apis/drive_v3/service.rb', line 1486 def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', ) command.request_representation = Google::Apis::DriveV3::Reply::Representation command.request_object = reply_object command.response_representation = Google::Apis::DriveV3::Reply::Representation command.response_class = Google::Apis::DriveV3::Reply command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.params['replyId'] = reply_id unless reply_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Revision
Updates a revision with patch semantics.
1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 |
# File 'generated/google/apis/drive_v3/service.rb', line 1656 def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', ) command.request_representation = Google::Apis::DriveV3::Revision::Representation command.request_object = revision_object command.response_representation = Google::Apis::DriveV3::Revision::Representation command.response_class = Google::Apis::DriveV3::Revision command.params['fileId'] = file_id unless file_id.nil? command.params['revisionId'] = revision_id unless revision_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_teamdrive(team_drive_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Updates a Team Drive's metadata
1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 |
# File 'generated/google/apis/drive_v3/service.rb', line 1857 def update_teamdrive(team_drive_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'teamdrives/{teamDriveId}', ) command.request_representation = Google::Apis::DriveV3::TeamDrive::Representation command.request_object = team_drive_object command.response_representation = Google::Apis::DriveV3::TeamDrive::Representation command.response_class = Google::Apis::DriveV3::TeamDrive command.params['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#watch_change(page_token, channel_object = nil, include_corpus_removals: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes for a user.
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'generated/google/apis/drive_v3/service.rb', line 250 def watch_change(page_token, channel_object = nil, include_corpus_removals: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'changes/watch', ) command.request_representation = Google::Apis::DriveV3::Channel::Representation command.request_object = channel_object command.response_representation = Google::Apis::DriveV3::Channel::Representation command.response_class = Google::Apis::DriveV3::Channel command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil? command.query['includeRemoved'] = include_removed unless include_removed.nil? command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil? command.query['spaces'] = spaces unless spaces.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes to a file
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 |
# File 'generated/google/apis/drive_v3/service.rb', line 1005 def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:post, 'files/{fileId}/watch', ) else command = make_download_command(:post, 'files/{fileId}/watch', ) command.download_dest = download_dest end command.request_representation = Google::Apis::DriveV3::Channel::Representation command.request_object = channel_object command.response_representation = Google::Apis::DriveV3::Channel::Representation command.response_class = Google::Apis::DriveV3::Channel command.params['fileId'] = file_id unless file_id.nil? command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |