Class: Google::Apis::DriveV3::DriveService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DriveV3::DriveService
- Defined in:
- lib/google/apis/drive_v3/service.rb
Overview
Google Drive API
The Google Drive API allows clients to access resources from Google Drive.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://www.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#cancel_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Starts asynchronous cancellation on a long-running operation.
-
#copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil) {|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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Creates a comment on a file.
-
#create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Creates a shared drive.
-
#create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|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, 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Creates a reply to a comment.
-
#create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: 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, options: nil) {|result, err| ... }
Deletes a comment.
-
#delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: 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, options: nil) {|result, err| ... }
Permanently deletes a file owned by the user without moving it to the trash.
-
#delete_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a long-running operation.
-
#delete_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a permission.
-
#delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a reply.
-
#delete_revision(file_id, revision_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Permanently deletes a file version.
-
#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deprecated: Use
drives.delete
instead. -
#download_file(file_id, mime_type: nil, revision_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Operation
Downloads content of a file.
-
#empty_file_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: 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, download_dest: nil, options: nil) {|result, err| ... }
Exports a Google Workspace document to the requested MIME type and returns exported byte content.
-
#generate_file_ids(count: nil, space: nil, type: nil, fields: nil, quota_user: 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::About
Gets information about the user, the user's Drive, and system capabilities.
-
#get_app(app_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::App
Gets a specific app.
-
#get_changes_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil) {|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, 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Gets a shared drive's metadata by ID.
-
#get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Gets a file's metadata or content by ID.
-
#get_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Operation
Gets the latest state of a long-running operation.
-
#get_permission(file_id, permission_id, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|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, 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, 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated: Use
drives.get
instead. -
#hide_drive(drive_id, fields: nil, quota_user: 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_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::AppList
Lists a user's installed apps.
-
#list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil) {|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, 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::DriveList
Lists the user's shared drives.
-
#list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::LabelList
Lists the labels on a file.
-
#list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::FileList
Lists the user's files.
-
#list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_permissions(file_id, include_permissions_for_view: nil, page_size: nil, page_token: nil, supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|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, 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, 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDriveList
Deprecated: Use
drives.list
instead. -
#modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ModifyLabelsResponse
Modifies the set of labels applied to a file.
-
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Stops watching resources through this channel.
-
#unhide_drive(drive_id, fields: nil, quota_user: 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, 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Updates the metadata for a shared drive.
-
#update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|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, 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, 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, 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, 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_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes for a user.
-
#watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes to a file.
Constructor Details
#initialize ⇒ DriveService
Returns a new instance of DriveService.
47 48 49 50 51 52 |
# File 'lib/google/apis/drive_v3/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, 'drive/v3/', client_name: 'google-apis-drive_v3', client_version: Google::Apis::DriveV3::GEM_VERSION) @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.
40 41 42 |
# File 'lib/google/apis/drive_v3/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/drive_v3/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#cancel_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1,
corresponding to Code.CANCELLED
.
1574 1575 1576 1577 1578 1579 1580 |
# File 'lib/google/apis/drive_v3/service.rb', line 1574 def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'operation/{name}:cancel', ) command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Creates a copy of a file and applies any requested updates with patch semantics.
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 |
# File 'lib/google/apis/drive_v3/service.rb', line 869 def copy_file(file_id, file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block) 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['includeLabels'] = include_labels unless include_labels.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? execute_or_queue_command(command, &block) end |
#create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Creates a comment on a file.
410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/google/apis/drive_v3/service.rb', line 410 def create_comment(file_id, comment_object = nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#create_drive(request_id, drive_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Creates a shared drive.
596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/google/apis/drive_v3/service.rb', line 596 def create_drive(request_id, drive_object = nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Creates a new file. This method supports an /upload URI and accepts
uploaded media with the following characteristics: - Maximum file size: 5,
120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type,
rather than the literal */*
value. The literal */*
is only used to
indicate that any valid MIME type can be uploaded. For more information on
uploading files, see Upload file data.
Apps creating shortcuts with files.create
must specify the MIME type
application/vnd.google-apps.shortcut
. Apps should specify a file extension in
the name
property when inserting files with the API. For example, an
operation to insert a JPEG file should specify something like "name": "cat.
jpg"
in the metadata. Subsequent GET
requests include the read-only
fileExtension
property populated with the extension originally specified in
the title
property. When a Google Drive user requests to download a file, or
when the file is downloaded through the sync client, Drive builds a full
filename (with extension) based on the title. In cases where the extension is
missing, Drive attempts to determine the extension based on the file's MIME
type.
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 |
# File 'lib/google/apis/drive_v3/service.rb', line 954 def create_file(file_object = nil, enforce_single_parent: nil, ignore_default_visibility: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) 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['includeLabels'] = include_labels unless include_labels.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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Creates a permission for a file or shared drive. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 |
# File 'lib/google/apis/drive_v3/service.rb', line 1733 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, 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? execute_or_queue_command(command, &block) end |
#create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Creates a reply to a comment.
1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 |
# File 'lib/google/apis/drive_v3/service.rb', line 1977 def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated: Use drives.create
instead.
2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 |
# File 'lib/google/apis/drive_v3/service.rb', line 2325 def create_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#delete_comment(file_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a comment.
444 445 446 447 448 449 450 451 |
# File 'lib/google/apis/drive_v3/service.rb', line 444 def delete_comment(file_id, comment_id, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: 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.
636 637 638 639 640 641 642 643 644 |
# File 'lib/google/apis/drive_v3/service.rb', line 636 def delete_drive(drive_id, allow_item_deletion: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'drives/{driveId}', ) command.params['driveId'] = drive_id unless drive_id.nil? command.query['allowItemDeletion'] = allow_item_deletion unless allow_item_deletion.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? 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, 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 folder. If the target is a folder, all descendants owned by the user
are also deleted.
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 |
# File 'lib/google/apis/drive_v3/service.rb', line 1010 def delete_file(file_id, enforce_single_parent: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block) 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? execute_or_queue_command(command, &block) end |
#delete_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED
.
1605 1606 1607 1608 1609 1610 1611 |
# File 'lib/google/apis/drive_v3/service.rb', line 1605 def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'operation/{name}', ) command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.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, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a permission. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 |
# File 'lib/google/apis/drive_v3/service.rb', line 1785 def (file_id, , supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a reply.
2014 2015 2016 2017 2018 2019 2020 2021 2022 |
# File 'lib/google/apis/drive_v3/service.rb', line 2014 def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#delete_revision(file_id, revision_id, fields: nil, quota_user: 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.
2172 2173 2174 2175 2176 2177 2178 2179 |
# File 'lib/google/apis/drive_v3/service.rb', line 2172 def delete_revision(file_id, revision_id, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deprecated: Use drives.delete
instead.
2357 2358 2359 2360 2361 2362 2363 |
# File 'lib/google/apis/drive_v3/service.rb', line 2357 def delete_teamdrive(team_drive_id, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#download_file(file_id, mime_type: nil, revision_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Operation
Downloads content of a file. Operations are valid for 24 hours from the time of creation.
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/google/apis/drive_v3/service.rb', line 1053 def download_file(file_id, mime_type: nil, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/download', ) command.response_representation = Google::Apis::DriveV3::Operation::Representation command.response_class = Google::Apis::DriveV3::Operation command.params['fileId'] = file_id unless file_id.nil? command.query['mimeType'] = mime_type unless mime_type.nil? command.query['revisionId'] = revision_id unless revision_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#empty_file_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes all of the user's trashed files.
1088 1089 1090 1091 1092 1093 1094 1095 |
# File 'lib/google/apis/drive_v3/service.rb', line 1088 def empty_file_trash(drive_id: nil, enforce_single_parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'files/trash', ) command.query['driveId'] = drive_id unless drive_id.nil? 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? execute_or_queue_command(command, &block) end |
#export_file(file_id, mime_type, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 |
# File 'lib/google/apis/drive_v3/service.rb', line 1122 def export_file(file_id, mime_type, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#generate_file_ids(count: nil, space: nil, type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::GeneratedIds
Generates a set of file IDs which can be provided in create or copy requests.
1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'lib/google/apis/drive_v3/service.rb', line 1163 def generate_file_ids(count: nil, space: nil, type: nil, fields: nil, quota_user: 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['type'] = type unless type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_about(fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::About
Gets information about the user, the user's Drive, and system capabilities.
72 73 74 75 76 77 78 79 |
# File 'lib/google/apis/drive_v3/service.rb', line 72 def get_about(fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#get_app(app_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::App
Gets a specific app.
101 102 103 104 105 106 107 108 109 |
# File 'lib/google/apis/drive_v3/service.rb', line 101 def get_app(app_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'apps/{appId}', ) command.response_representation = Google::Apis::DriveV3::App::Representation command.response_class = Google::Apis::DriveV3::App command.params['appId'] = app_id unless app_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::StartPageToken
Gets the starting pageToken for listing future changes.
181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/google/apis/drive_v3/service.rb', line 181 def get_changes_start_page_token(drive_id: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block) 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? execute_or_queue_command(command, &block) end |
#get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Gets a comment by ID.
478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/google/apis/drive_v3/service.rb', line 478 def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Gets a shared drive's metadata by ID.
670 671 672 673 674 675 676 677 678 679 |
# File 'lib/google/apis/drive_v3/service.rb', line 670 def get_drive(drive_id, use_domain_admin_access: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Gets a file's metadata or content by ID. If you provide the URL parameter
alt=media
, then the response includes the file contents in the response body.
Downloading content with alt=media
only works if the file is stored in Drive.
To download Google Docs, Sheets, and Slides use files.export
instead. For more information, see Download &
export files.
1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/google/apis/drive_v3/service.rb', line 1217 def get_file(file_id, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) 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['includeLabels'] = include_labels unless include_labels.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? execute_or_queue_command(command, &block) end |
#get_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
1634 1635 1636 1637 1638 1639 1640 1641 1642 |
# File 'lib/google/apis/drive_v3/service.rb', line 1634 def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'operations/{name}', ) command.response_representation = Google::Apis::DriveV3::Operation::Representation command.response_class = Google::Apis::DriveV3::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Gets a permission by ID.
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 |
# File 'lib/google/apis/drive_v3/service.rb', line 1828 def (file_id, , supports_all_drives: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Gets a reply by ID.
2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 |
# File 'lib/google/apis/drive_v3/service.rb', line 2051 def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Revision
Gets a revision's metadata or content by ID.
2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 |
# File 'lib/google/apis/drive_v3/service.rb', line 2210 def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated: Use drives.get
instead.
2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 |
# File 'lib/google/apis/drive_v3/service.rb', line 2389 def get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#hide_drive(drive_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Hides a shared drive from the default view.
701 702 703 704 705 706 707 708 709 |
# File 'lib/google/apis/drive_v3/service.rb', line 701 def hide_drive(drive_id, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::AppList
Lists a user's installed apps.
142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/google/apis/drive_v3/service.rb', line 142 def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'apps', ) command.response_representation = Google::Apis::DriveV3::AppList::Representation command.response_class = Google::Apis::DriveV3::AppList command.query['appFilterExtensions'] = app_filter_extensions unless app_filter_extensions.nil? command.query['appFilterMimeTypes'] = app_filter_mime_types unless app_filter_mime_types.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.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_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ChangeList
Lists the changes for a user or shared drive.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/google/apis/drive_v3/service.rb', line 253 def list_changes(page_token, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block) 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['includeLabels'] = include_labels unless include_labels.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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::CommentList
Lists a file's comments.
521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/google/apis/drive_v3/service.rb', line 521 def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, options: nil, &block) 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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::DriveList
Lists the user's shared drives. This method accepts the q
parameter, which
is a search query combining one or more search terms. For more information,
see the Search for shared drives
guide.
741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/google/apis/drive_v3/service.rb', line 741 def list_drives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::LabelList
Lists the labels on a file.
1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 |
# File 'lib/google/apis/drive_v3/service.rb', line 1361 def list_file_labels(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/listLabels', ) command.response_representation = Google::Apis::DriveV3::LabelList::Representation command.response_class = Google::Apis::DriveV3::LabelList command.params['fileId'] = file_id unless file_id.nil? command.query['maxResults'] = max_results unless max_results.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? execute_or_queue_command(command, &block) end |
#list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::FileList
Lists the user's files. This method accepts the q
parameter, which is a
search query combining one or more search terms. For more information, see the
Search for files & folders guide. Note:
This method returns all files by default, including trashed files. If you
don't want trashed files to appear in the list, use the trashed=false
query
parameter to remove trashed files from the results.
1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 |
# File 'lib/google/apis/drive_v3/service.rb', line 1312 def list_files(corpora: nil, corpus: nil, drive_id: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_team_drive_items: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block) 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['includeLabels'] = include_labels unless include_labels.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? execute_or_queue_command(command, &block) end |
#list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED
.
1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 |
# File 'lib/google/apis/drive_v3/service.rb', line 1671 def list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'operations', ) command.response_representation = Google::Apis::DriveV3::ListOperationsResponse::Representation command.response_class = Google::Apis::DriveV3::ListOperationsResponse command.query['filter'] = filter unless filter.nil? command.query['name'] = name unless name.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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::PermissionList
Lists a file's or shared drive's permissions.
1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 |
# File 'lib/google/apis/drive_v3/service.rb', line 1881 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, 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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ReplyList
Lists a comment's replies.
2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 |
# File 'lib/google/apis/drive_v3/service.rb', line 2094 def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::RevisionList
Lists a file's revisions.
2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 |
# File 'lib/google/apis/drive_v3/service.rb', line 2252 def list_revisions(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: 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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDriveList
Deprecated: Use drives.list
instead.
2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 |
# File 'lib/google/apis/drive_v3/service.rb', line 2427 def list_teamdrives(page_size: nil, page_token: nil, q: nil, use_domain_admin_access: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::ModifyLabelsResponse
Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified.
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 |
# File 'lib/google/apis/drive_v3/service.rb', line 1395 def modify_file_labels(file_id, modify_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/modifyLabels', ) command.request_representation = Google::Apis::DriveV3::ModifyLabelsRequest::Representation command.request_object = modify_labels_request_object command.response_representation = Google::Apis::DriveV3::ModifyLabelsResponse::Representation command.response_class = Google::Apis::DriveV3::ModifyLabelsResponse 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? execute_or_queue_command(command, &block) end |
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Stops watching resources through this channel.
380 381 382 383 384 385 386 387 |
# File 'lib/google/apis/drive_v3/service.rb', line 380 def stop_channel(channel_object = nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#unhide_drive(drive_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Restores a shared drive to the default view.
774 775 776 777 778 779 780 781 782 |
# File 'lib/google/apis/drive_v3/service.rb', line 774 def unhide_drive(drive_id, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Comment
Updates a comment with patch semantics.
558 559 560 561 562 563 564 565 566 567 568 569 |
# File 'lib/google/apis/drive_v3/service.rb', line 558 def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Drive
Updates the metadata for a shared drive.
809 810 811 812 813 814 815 816 817 818 819 820 |
# File 'lib/google/apis/drive_v3/service.rb', line 809 def update_drive(drive_id, drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::File
Updates a file's metadata and/or content. When calling this method, only
populate fields in the request that you want to modify. When updating fields,
some fields might be changed automatically, such as modifiedDate
. This
method supports patch semantics. This method supports an /upload URI and
accepts uploaded media with the following characteristics: - Maximum file
size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME
type, rather than the literal */*
value. The literal */*
is only used to
indicate that any valid MIME type can be uploaded. For more information on
uploading files, see Upload file data.
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 |
# File 'lib/google/apis/drive_v3/service.rb', line 1466 def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) 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['includeLabels'] = include_labels unless include_labels.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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Permission
Updates a permission with patch semantics. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 |
# File 'lib/google/apis/drive_v3/service.rb', line 1936 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, 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? execute_or_queue_command(command, &block) end |
#update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Reply
Updates a reply with patch semantics.
2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 |
# File 'lib/google/apis/drive_v3/service.rb', line 2133 def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: 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? execute_or_queue_command(command, &block) end |
#update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Revision
Updates a revision with patch semantics.
2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 |
# File 'lib/google/apis/drive_v3/service.rb', line 2287 def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: 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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated: Use drives.update
instead.
2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 |
# File 'lib/google/apis/drive_v3/service.rb', line 2465 def update_teamdrive(team_drive_id, team_drive_object = nil, use_domain_admin_access: nil, fields: nil, quota_user: 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? 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_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes for a user.
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/google/apis/drive_v3/service.rb', line 336 def watch_change(page_token, channel_object = nil, drive_id: nil, include_corpus_removals: nil, include_items_from_all_drives: nil, include_labels: nil, include_permissions_for_view: nil, include_removed: nil, include_team_drive_items: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, supports_all_drives: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, options: nil, &block) 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['includeLabels'] = include_labels unless include_labels.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? execute_or_queue_command(command, &block) end |
#watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV3::Channel
Subscribes to changes to a file.
1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 |
# File 'lib/google/apis/drive_v3/service.rb', line 1530 def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_labels: nil, include_permissions_for_view: nil, supports_all_drives: nil, supports_team_drives: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/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.params['fileId'] = file_id unless file_id.nil? command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? command.query['includeLabels'] = include_labels unless include_labels.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? execute_or_queue_command(command, &block) end |