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
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Instance Method Summary collapse
-
#copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: 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, 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_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Creates a new shared drive.
-
#create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: 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, 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, 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Creates a permission for a file or shared 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
Deprecated use drives.create instead.
-
#delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a comment.
-
#delete_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a shared drive for which the user is an organizer.
-
#delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, 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_all_drives: nil, 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 file version.
-
#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deprecated use drives.delete instead.
-
#empty_file_trash(enforce_single_parent: nil, 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 or copy 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(drive_id: nil, supports_all_drives: nil, 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_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Gets a shared drive's metadata by ID.
-
#get_file(file_id, acknowledge_abuse: nil, include_permissions_for_view: nil, supports_all_drives: 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_all_drives: 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::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
Deprecated use drives.get instead.
-
#hide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Hides a shared drive from the default view.
-
#initialize ⇒ DriveService
constructor
A new instance of DriveService.
-
#list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ChangeList
Lists the changes for a user or shared 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_drives(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::DriveList
Lists the user's shared drives.
-
#list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::FileList
Lists or searches files.
-
#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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::PermissionList
Lists a file's or shared 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
Deprecated use drives.list instead.
-
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Stop watching resources through this channel.
-
#unhide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Restores a shared drive to the default view.
-
#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_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Updates the metadate for a shared drive.
-
#update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: 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, 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.
-
#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, 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, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated use drives.update instead.
-
#watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: 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, 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, include_permissions_for_view: nil, supports_all_drives: 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.
Constructor Details
#initialize ⇒ DriveService
Returns a new instance of DriveService.
50 51 52 53 |
# File 'generated/google/apis/drive_v3/service.rb', line 50 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 An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
44 45 46 |
# File 'generated/google/apis/drive_v3/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
48 49 50 |
# File 'generated/google/apis/drive_v3/service.rb', line 48 def user_ip @user_ip end |
Instance Method Details
#copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: 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, 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. Folders cannot be copied.
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 |
# File 'generated/google/apis/drive_v3/service.rb', line 827 def copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: 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, 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['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil? command.query['includePermissionsForView'] = unless .nil? command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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.
347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'generated/google/apis/drive_v3/service.rb', line 347 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_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Creates a new shared drive.
548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'generated/google/apis/drive_v3/service.rb', line 548 def create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'drives', ) command.request_representation = Google::Apis::DriveV3::Drive::Representation command.request_object = drive_object command.response_representation = Google::Apis::DriveV3::Drive::Representation command.response_class = Google::Apis::DriveV3::Drive 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 |
#create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: 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, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Creates a new file.
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 |
# File 'generated/google/apis/drive_v3/service.rb', line 895 def create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: 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, 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['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil? command.query['includePermissionsForView'] = unless .nil? command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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, 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Creates a permission for a file or shared drive.
1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 |
# File 'generated/google/apis/drive_v3/service.rb', line 1402 def (file_id, = 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, 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['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['moveToNewOwnersRoot'] = move_to_new_owners_root unless move_to_new_owners_root.nil? command.query['sendNotificationEmail'] = send_notification_email unless send_notification_email.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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.
1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'generated/google/apis/drive_v3/service.rb', line 1659 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
Deprecated use drives.create instead.
2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 |
# File 'generated/google/apis/drive_v3/service.rb', line 2032 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.
384 385 386 387 388 389 390 391 392 |
# File 'generated/google/apis/drive_v3/service.rb', line 384 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_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.
584 585 586 587 588 589 590 591 |
# File 'generated/google/apis/drive_v3/service.rb', line 584 def delete_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'drives/{driveId}', ) command.params['driveId'] = drive_id unless 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 |
#delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, 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 shared 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.
953 954 955 956 957 958 959 960 961 962 963 |
# File 'generated/google/apis/drive_v3/service.rb', line 953 def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, 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['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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_all_drives: nil, 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.
1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 |
# File 'generated/google/apis/drive_v3/service.rb', line 1456 def (file_id, , supports_all_drives: 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(:delete, 'files/{fileId}/permissions/{permissionId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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.
1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 |
# File 'generated/google/apis/drive_v3/service.rb', line 1699 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 file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted.
1869 1870 1871 1872 1873 1874 1875 1876 1877 |
# File 'generated/google/apis/drive_v3/service.rb', line 1869 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.
Deprecated use drives.delete instead.
2067 2068 2069 2070 2071 2072 2073 2074 |
# File 'generated/google/apis/drive_v3/service.rb', line 2067 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(enforce_single_parent: nil, 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.
988 989 990 991 992 993 994 995 |
# File 'generated/google/apis/drive_v3/service.rb', line 988 def empty_file_trash(enforce_single_parent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/trash', ) command.query['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.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 |
#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.
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'generated/google/apis/drive_v3/service.rb', line 1024 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 or copy requests.
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 |
# File 'generated/google/apis/drive_v3/service.rb', line 1064 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.
75 76 77 78 79 80 81 82 83 |
# File 'generated/google/apis/drive_v3/service.rb', line 75 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(drive_id: nil, supports_all_drives: nil, 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.
114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'generated/google/apis/drive_v3/service.rb', line 114 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, 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['driveId'] = drive_id unless drive_id.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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 |
#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.
421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'generated/google/apis/drive_v3/service.rb', line 421 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_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Gets a shared drive's metadata by ID.
619 620 621 622 623 624 625 626 627 628 629 |
# File 'generated/google/apis/drive_v3/service.rb', line 619 def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'drives/{driveId}', ) command.response_representation = Google::Apis::DriveV3::Drive::Representation command.response_class = Google::Apis::DriveV3::Drive command.params['driveId'] = drive_id unless 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 |
#get_file(file_id, acknowledge_abuse: nil, include_permissions_for_view: nil, supports_all_drives: 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.
1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 |
# File 'generated/google/apis/drive_v3/service.rb', line 1110 def get_file(file_id, acknowledge_abuse: nil, include_permissions_for_view: nil, supports_all_drives: 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['includePermissionsForView'] = unless .nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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_all_drives: 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::Permission
Gets a permission by ID.
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'generated/google/apis/drive_v3/service.rb', line 1502 def (file_id, , supports_all_drives: 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/{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['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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.
1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 |
# File 'generated/google/apis/drive_v3/service.rb', line 1739 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.
1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 |
# File 'generated/google/apis/drive_v3/service.rb', line 1908 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
Deprecated use drives.get instead.
2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 |
# File 'generated/google/apis/drive_v3/service.rb', line 2102 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 |
#hide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Hides a shared drive from the default view.
653 654 655 656 657 658 659 660 661 662 |
# File 'generated/google/apis/drive_v3/service.rb', line 653 def hide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'drives/{driveId}/hide', ) command.response_representation = Google::Apis::DriveV3::Drive::Representation command.response_class = Google::Apis::DriveV3::Drive command.params['driveId'] = drive_id unless 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_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ChangeList
Lists the changes for a user or shared drive.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'generated/google/apis/drive_v3/service.rb', line 186 def list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: 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, 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['driveId'] = drive_id unless drive_id.nil? command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil? command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil? command.query['includePermissionsForView'] = unless .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['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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.
467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'generated/google/apis/drive_v3/service.rb', line 467 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_drives(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::DriveList
Lists the user's shared drives.
693 694 695 696 697 698 699 700 701 702 703 704 705 |
# File 'generated/google/apis/drive_v3/service.rb', line 693 def list_drives(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, 'drives', ) command.response_representation = Google::Apis::DriveV3::DriveList::Representation command.response_class = Google::Apis::DriveV3::DriveList 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 |
#list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::FileList
Lists or searches files.
1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 |
# File 'generated/google/apis/drive_v3/service.rb', line 1194 def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: 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, 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['driveId'] = drive_id unless drive_id.nil? command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil? command.query['includePermissionsForView'] = unless .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['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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, 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::PermissionList
Lists a file's or shared drive's permissions.
1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 |
# File 'generated/google/apis/drive_v3/service.rb', line 1558 def (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, 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['includePermissionsForView'] = unless .nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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.
1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 |
# File 'generated/google/apis/drive_v3/service.rb', line 1785 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.
1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 |
# File 'generated/google/apis/drive_v3/service.rb', line 1953 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
Deprecated use drives.list instead.
2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 |
# File 'generated/google/apis/drive_v3/service.rb', line 2143 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
314 315 316 317 318 319 320 321 322 |
# File 'generated/google/apis/drive_v3/service.rb', line 314 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 |
#unhide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Restores a shared drive to the default view.
729 730 731 732 733 734 735 736 737 738 |
# File 'generated/google/apis/drive_v3/service.rb', line 729 def unhide_drive(drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'drives/{driveId}/unhide', ) command.response_representation = Google::Apis::DriveV3::Drive::Representation command.response_class = Google::Apis::DriveV3::Drive command.params['driveId'] = drive_id unless 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 |
#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.
507 508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'generated/google/apis/drive_v3/service.rb', line 507 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_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Updates the metadate for a shared drive.
767 768 769 770 771 772 773 774 775 776 777 778 779 |
# File 'generated/google/apis/drive_v3/service.rb', line 767 def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'drives/{driveId}', ) command.request_representation = Google::Apis::DriveV3::Drive::Representation command.request_object = drive_object command.response_representation = Google::Apis::DriveV3::Drive::Representation command.response_class = Google::Apis::DriveV3::Drive command.params['driveId'] = drive_id unless 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 |
#update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: 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, 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. This method supports patch semantics.
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 |
# File 'generated/google/apis/drive_v3/service.rb', line 1268 def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: 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, 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['enforceSingleParent'] = enforce_single_parent unless enforce_single_parent.nil? command.query['includePermissionsForView'] = unless .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['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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_all_drives: 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.
1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 |
# File 'generated/google/apis/drive_v3/service.rb', line 1615 def (file_id, , = 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, 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['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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.
1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 |
# File 'generated/google/apis/drive_v3/service.rb', line 1827 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.
1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 |
# File 'generated/google/apis/drive_v3/service.rb', line 1991 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, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated use drives.update instead
2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 |
# File 'generated/google/apis/drive_v3/service.rb', line 2184 def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: 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['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 |
#watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes for a user.
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'generated/google/apis/drive_v3/service.rb', line 268 def watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: 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, 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['driveId'] = drive_id unless drive_id.nil? command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil? command.query['includeItemsFromAllDrives'] = include_items_from_all_drives unless include_items_from_all_drives.nil? command.query['includePermissionsForView'] = unless .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['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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, include_permissions_for_view: nil, supports_all_drives: 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
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 |
# File 'generated/google/apis/drive_v3/service.rb', line 1331 def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_permissions_for_view: nil, supports_all_drives: 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['includePermissionsForView'] = unless .nil? command.query['supportsAllDrives'] = supports_all_drives unless supports_all_drives.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 |