Class: Google::Apis::DriveV2::DriveService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DriveV2::DriveService
- Defined in:
- generated/google/apis/drive_v2/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.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Creates a copy of the specified file.
-
#delete_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Removes a child from a folder.
-
#delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a comment.
-
#delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a file by ID.
-
#delete_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Removes a parent from a file.
-
#delete_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a permission from a file or Team Drive.
-
#delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a property.
-
#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| ... }
Removes a revision.
-
#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a Team Drive for which the user is an organizer.
-
#empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes all of the user's trashed files.
-
#export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }
Exports a Google Doc to the requested MIME type and returns the exported content.
-
#generate_file_ids(max_results: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::GeneratedIds
Generates a set of file IDs which can be provided in insert requests.
-
#get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::About
Gets the information about the current user along with Drive API settings.
-
#get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::App
Gets a specific app.
-
#get_change(change_id, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Change
Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes.
-
#get_change_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::StartPageToken
Gets the starting pageToken for listing future changes.
-
#get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildReference
Gets a specific child reference.
-
#get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment
Gets a comment by ID.
-
#get_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Gets a file's metadata by ID.
-
#get_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentReference
Gets a specific parent reference.
-
#get_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Gets a permission by ID.
-
#get_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PermissionId
Returns the permission ID for an email address.
-
#get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Gets a property by its key.
-
#get_realtime(file_id, revision: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }
Exports the contents of the Realtime API data model associated with this file as JSON.
-
#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::DriveV2::CommentReply
Gets a reply.
-
#get_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision
Gets a specific revision.
-
#get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDrive
Gets a Team Drive's metadata by ID.
-
#initialize ⇒ DriveService
constructor
A new instance of DriveService.
-
#insert_child(folder_id, child_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildReference
Inserts a file into a folder.
-
#insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment
Creates a new comment on the given file.
-
#insert_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Insert a new file.
-
#insert_parent(file_id, parent_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentReference
Adds a parent folder for a file.
-
#insert_permission(file_id, permission_object = nil, email_message: nil, send_notification_emails: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Inserts a permission for a file or Team Drive.
-
#insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Adds a property to a file, or updates it if it already exists.
-
#insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply
Creates a new reply to the given comment.
-
#insert_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDrive
Creates a new Team Drive.
-
#list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::AppList
Lists a user's installed apps.
-
#list_changes(include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChangeList
Lists the changes for a user or Team Drive.
-
#list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildList
Lists a folder's children.
-
#list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentList
Lists a file's comments.
-
#list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::FileList
Lists the user's files.
-
#list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentList
Lists a file's parents.
-
#list_permissions(file_id, max_results: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PermissionList
Lists a file's or Team Drive's permissions.
-
#list_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PropertyList
Lists a file's properties.
-
#list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReplyList
Lists all of the replies to a comment.
-
#list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::RevisionList
Lists a file's revisions.
-
#list_teamdrives(max_results: 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::DriveV2::TeamDriveList
Lists the user's Team Drives.
-
#patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment
Updates an existing comment.
-
#patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Updates file metadata and/or content.
-
#patch_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Updates a permission using patch semantics.
-
#patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Updates a property.
-
#patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply
Updates an existing reply.
-
#patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision
Updates a revision.
-
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Stop watching resources through this channel.
-
#touch_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Set the file's updated time to the current server time.
-
#trash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Moves a file to the trash.
-
#untrash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Restores a file from the trash.
-
#update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment
Updates an existing comment.
-
#update_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Updates file metadata and/or content.
-
#update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Updates a permission.
-
#update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Updates a property.
-
#update_realtime(file_id, base_revision: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... }
Overwrites the Realtime API data model associated with this file with the provided JSON data model.
-
#update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply
Updates an existing reply.
-
#update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision
Updates a revision.
-
#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::DriveV2::TeamDrive
Updates a Team Drive's metadata.
-
#watch_change(channel_object = nil, include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Channel
Subscribe to changes for a user.
-
#watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Channel
Subscribe to changes on a file.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ DriveService
Returns a new instance of DriveService
50 51 52 53 |
# File 'generated/google/apis/drive_v2/service.rb', line 50 def initialize super('https://www.googleapis.com/', 'drive/v2/') @batch_path = 'batch/drive/v2' 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_v2/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_v2/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_v2/service.rb', line 48 def user_ip @user_ip end |
Instance Method Details
#copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Creates a copy of the specified file.
870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 |
# File 'generated/google/apis/drive_v2/service.rb', line 870 def copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: 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::DriveV2::File::Representation command.request_object = file_object command.response_representation = Google::Apis::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.params['fileId'] = file_id unless file_id.nil? command.query['convert'] = convert unless convert.nil? command.query['ocr'] = ocr unless ocr.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['pinned'] = pinned unless pinned.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? command.query['visibility'] = visibility unless visibility.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_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Removes a child from a folder.
456 457 458 459 460 461 462 463 464 |
# File 'generated/google/apis/drive_v2/service.rb', line 456 def delete_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{folderId}/children/{childId}', ) command.params['folderId'] = folder_id unless folder_id.nil? command.params['childId'] = child_id unless child_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.
616 617 618 619 620 621 622 623 624 |
# File 'generated/google/apis/drive_v2/service.rb', line 616 def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files.
916 917 918 919 920 921 922 923 924 |
# File 'generated/google/apis/drive_v2/service.rb', line 916 def delete_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}', ) command.params['fileId'] = file_id unless file_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Removes a parent from a file.
1619 1620 1621 1622 1623 1624 1625 1626 1627 |
# File 'generated/google/apis/drive_v2/service.rb', line 1619 def delete_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/parents/{parentId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['parentId'] = parent_id unless parent_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_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a permission from a file or Team Drive.
1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 |
# File 'generated/google/apis/drive_v2/service.rb', line 1767 def (file_id, , supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a property.
2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 |
# File 'generated/google/apis/drive_v2/service.rb', line 2091 def delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/properties/{propertyKey}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['propertyKey'] = property_key unless property_key.nil? command.query['visibility'] = visibility unless visibility.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.
2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 |
# File 'generated/google/apis/drive_v2/service.rb', line 2414 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.
Removes a revision.
2662 2663 2664 2665 2666 2667 2668 2669 2670 |
# File 'generated/google/apis/drive_v2/service.rb', line 2662 def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', ) command.params['fileId'] = file_id unless file_id.nil? command.params['revisionId'] = revision_id unless revision_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_teamdrive(team_drive_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items.
2849 2850 2851 2852 2853 2854 2855 2856 |
# File 'generated/google/apis/drive_v2/service.rb', line 2849 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_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes all of the user's trashed files.
946 947 948 949 950 951 952 |
# File 'generated/google/apis/drive_v2/service.rb', line 946 def empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'files/trash', ) command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
981 982 983 984 985 986 987 988 989 990 991 992 993 994 |
# File 'generated/google/apis/drive_v2/service.rb', line 981 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(max_results: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::GeneratedIds
Generates a set of file IDs which can be provided in insert requests.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
# File 'generated/google/apis/drive_v2/service.rb', line 1021 def generate_file_ids(max_results: 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::DriveV2::GeneratedIds::Representation command.response_class = Google::Apis::DriveV2::GeneratedIds command.query['maxResults'] = max_results unless max_results.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(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::About
Gets the information about the current user along with Drive API settings
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'generated/google/apis/drive_v2/service.rb', line 85 def get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'about', ) command.response_representation = Google::Apis::DriveV2::About::Representation command.response_class = Google::Apis::DriveV2::About command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil? command.query['maxChangeIdCount'] = max_change_id_count unless max_change_id_count.nil? command.query['startChangeId'] = start_change_id unless start_change_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_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::App
Gets a specific app.
120 121 122 123 124 125 126 127 128 129 |
# File 'generated/google/apis/drive_v2/service.rb', line 120 def get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'apps/{appId}', ) command.response_representation = Google::Apis::DriveV2::App::Representation command.response_class = Google::Apis::DriveV2::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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_change(change_id, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Change
Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes.
204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'generated/google/apis/drive_v2/service.rb', line 204 def get_change(change_id, 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/{changeId}', ) command.response_representation = Google::Apis::DriveV2::Change::Representation command.response_class = Google::Apis::DriveV2::Change command.params['changeId'] = change_id unless change_id.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_change_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::StartPageToken
Gets the starting pageToken for listing future changes.
242 243 244 245 246 247 248 249 250 251 252 |
# File 'generated/google/apis/drive_v2/service.rb', line 242 def get_change_start_page_token(supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'changes/startPageToken', ) command.response_representation = Google::Apis::DriveV2::StartPageToken::Representation command.response_class = Google::Apis::DriveV2::StartPageToken command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildReference
Gets a specific child reference.
490 491 492 493 494 495 496 497 498 499 500 |
# File 'generated/google/apis/drive_v2/service.rb', line 490 def get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{folderId}/children/{childId}', ) command.response_representation = Google::Apis::DriveV2::ChildReference::Representation command.response_class = Google::Apis::DriveV2::ChildReference command.params['folderId'] = folder_id unless folder_id.nil? command.params['childId'] = child_id unless child_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::DriveV2::Comment
Gets a comment by ID.
653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'generated/google/apis/drive_v2/service.rb', line 653 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::DriveV2::Comment::Representation command.response_class = Google::Apis::DriveV2::Comment command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Gets a file's metadata by ID.
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 |
# File 'generated/google/apis/drive_v2/service.rb', line 1070 def get_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: 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::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.params['fileId'] = file_id unless file_id.nil? command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? command.query['projection'] = projection unless projection.nil? command.query['revisionId'] = revision_id unless revision_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.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_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentReference
Gets a specific parent reference.
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 |
# File 'generated/google/apis/drive_v2/service.rb', line 1653 def get_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/parents/{parentId}', ) command.response_representation = Google::Apis::DriveV2::ParentReference::Representation command.response_class = Google::Apis::DriveV2::ParentReference command.params['fileId'] = file_id unless file_id.nil? command.params['parentId'] = parent_id unless parent_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_permission(file_id, permission_id, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Gets a permission by ID.
1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 |
# File 'generated/google/apis/drive_v2/service.rb', line 1809 def (file_id, , supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', ) command.response_representation = Google::Apis::DriveV2::Permission::Representation command.response_class = Google::Apis::DriveV2::Permission command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PermissionId
Returns the permission ID for an email address.
1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 |
# File 'generated/google/apis/drive_v2/service.rb', line 1845 def (email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'permissionIds/{email}', ) command.response_representation = Google::Apis::DriveV2::PermissionId::Representation command.response_class = Google::Apis::DriveV2::PermissionId command.params['email'] = email unless email.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_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Gets a property by its key.
2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 |
# File 'generated/google/apis/drive_v2/service.rb', line 2128 def get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/properties/{propertyKey}', ) command.response_representation = Google::Apis::DriveV2::Property::Representation command.response_class = Google::Apis::DriveV2::Property command.params['fileId'] = file_id unless file_id.nil? command.params['propertyKey'] = property_key unless property_key.nil? command.query['visibility'] = visibility unless visibility.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_realtime(file_id, revision: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Exports the contents of the Realtime API data model associated with this file as JSON.
2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 |
# File 'generated/google/apis/drive_v2/service.rb', line 2325 def get_realtime(file_id, revision: 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}/realtime', ) else command = make_download_command(:get, 'files/{fileId}/realtime', ) command.download_dest = download_dest end command.params['fileId'] = file_id unless file_id.nil? command.query['revision'] = revision unless revision.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::DriveV2::CommentReply
Gets a reply.
2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 |
# File 'generated/google/apis/drive_v2/service.rb', line 2453 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::DriveV2::CommentReply::Representation command.response_class = Google::Apis::DriveV2::CommentReply 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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision
Gets a specific revision.
2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 |
# File 'generated/google/apis/drive_v2/service.rb', line 2696 def get_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', ) command.response_representation = Google::Apis::DriveV2::Revision::Representation command.response_class = Google::Apis::DriveV2::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 |
#get_teamdrive(team_drive_id, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDrive
Gets a Team Drive's metadata by ID.
2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 |
# File 'generated/google/apis/drive_v2/service.rb', line 2884 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::DriveV2::TeamDrive::Representation command.response_class = Google::Apis::DriveV2::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 |
#insert_child(folder_id, child_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildReference
Inserts a file into a folder.
527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'generated/google/apis/drive_v2/service.rb', line 527 def insert_child(folder_id, child_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{folderId}/children', ) command.request_representation = Google::Apis::DriveV2::ChildReference::Representation command.request_object = child_reference_object command.response_representation = Google::Apis::DriveV2::ChildReference::Representation command.response_class = Google::Apis::DriveV2::ChildReference command.params['folderId'] = folder_id unless folder_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment
Creates a new comment on the given file.
689 690 691 692 693 694 695 696 697 698 699 700 |
# File 'generated/google/apis/drive_v2/service.rb', line 689 def insert_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::DriveV2::Comment::Representation command.request_object = comment_object command.response_representation = Google::Apis::DriveV2::Comment::Representation command.response_class = Google::Apis::DriveV2::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 |
#insert_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Insert a new file.
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 |
# File 'generated/google/apis/drive_v2/service.rb', line 1136 def insert_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, 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::DriveV2::File::Representation command.request_object = file_object command.response_representation = Google::Apis::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.query['convert'] = convert unless convert.nil? command.query['ocr'] = ocr unless ocr.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['pinned'] = pinned unless pinned.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil? command.query['visibility'] = visibility unless visibility.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 |
#insert_parent(file_id, parent_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentReference
Adds a parent folder for a file.
1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 |
# File 'generated/google/apis/drive_v2/service.rb', line 1690 def insert_parent(file_id, parent_reference_object = nil, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/parents', ) command.request_representation = Google::Apis::DriveV2::ParentReference::Representation command.request_object = parent_reference_object command.response_representation = Google::Apis::DriveV2::ParentReference::Representation command.response_class = Google::Apis::DriveV2::ParentReference command.params['fileId'] = file_id unless file_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_permission(file_id, permission_object = nil, email_message: nil, send_notification_emails: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Inserts a permission for a file or Team Drive.
1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 |
# File 'generated/google/apis/drive_v2/service.rb', line 1890 def (file_id, = nil, email_message: nil, send_notification_emails: 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(:post, 'files/{fileId}/permissions', ) command.request_representation = Google::Apis::DriveV2::Permission::Representation command.request_object = command.response_representation = Google::Apis::DriveV2::Permission::Representation command.response_class = Google::Apis::DriveV2::Permission command.params['fileId'] = file_id unless file_id.nil? command.query['emailMessage'] = unless .nil? command.query['sendNotificationEmails'] = send_notification_emails unless send_notification_emails.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 |
#insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Adds a property to a file, or updates it if it already exists.
2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 |
# File 'generated/google/apis/drive_v2/service.rb', line 2164 def insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/properties', ) command.request_representation = Google::Apis::DriveV2::Property::Representation command.request_object = property_object command.response_representation = Google::Apis::DriveV2::Property::Representation command.response_class = Google::Apis::DriveV2::Property 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 |
#insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply
Creates a new reply to the given comment.
2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 |
# File 'generated/google/apis/drive_v2/service.rb', line 2492 def insert_reply(file_id, comment_id, comment_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::DriveV2::CommentReply::Representation command.request_object = comment_reply_object command.response_representation = Google::Apis::DriveV2::CommentReply::Representation command.response_class = Google::Apis::DriveV2::CommentReply 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 |
#insert_teamdrive(request_id, team_drive_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::TeamDrive
Creates a new Team Drive.
2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 |
# File 'generated/google/apis/drive_v2/service.rb', line 2923 def insert_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::DriveV2::TeamDrive::Representation command.request_object = team_drive_object command.response_representation = Google::Apis::DriveV2::TeamDrive::Representation command.response_class = Google::Apis::DriveV2::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 |
#list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::AppList
Lists a user's installed apps.
164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'generated/google/apis/drive_v2/service.rb', line 164 def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'apps', ) command.response_representation = Google::Apis::DriveV2::AppList::Representation command.response_class = Google::Apis::DriveV2::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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_changes(include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChangeList
Lists the changes for a user or Team Drive.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'generated/google/apis/drive_v2/service.rb', line 306 def list_changes(include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: 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::DriveV2::ChangeList::Representation command.response_class = Google::Apis::DriveV2::ChangeList command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil? command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['spaces'] = spaces unless spaces.nil? command.query['startChangeId'] = start_change_id unless start_change_id.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_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ChildList
Lists a folder's children.
577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'generated/google/apis/drive_v2/service.rb', line 577 def list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{folderId}/children', ) command.response_representation = Google::Apis::DriveV2::ChildList::Representation command.response_class = Google::Apis::DriveV2::ChildList command.params['folderId'] = folder_id unless folder_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['q'] = q unless q.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, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentList
Lists a file's comments.
736 737 738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'generated/google/apis/drive_v2/service.rb', line 736 def list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: 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::DriveV2::CommentList::Representation command.response_class = Google::Apis::DriveV2::CommentList command.params['fileId'] = file_id unless file_id.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['updatedMin'] = updated_min unless updated_min.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::FileList
Lists the user's files.
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 |
# File 'generated/google/apis/drive_v2/service.rb', line 1218 def list_files(corpora: nil, corpus: nil, include_team_drive_items: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files', ) command.response_representation = Google::Apis::DriveV2::FileList::Representation command.response_class = Google::Apis::DriveV2::FileList command.query['corpora'] = corpora unless corpora.nil? command.query['corpus'] = corpus unless corpus.nil? command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['projection'] = projection unless projection.nil? command.query['q'] = q unless q.nil? command.query['spaces'] = spaces unless spaces.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['teamDriveId'] = team_drive_id unless team_drive_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::ParentList
Lists a file's parents.
1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 |
# File 'generated/google/apis/drive_v2/service.rb', line 1726 def list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/parents', ) command.response_representation = Google::Apis::DriveV2::ParentList::Representation command.response_class = Google::Apis::DriveV2::ParentList 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 |
#list_permissions(file_id, max_results: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PermissionList
Lists a file's or Team Drive's permissions.
1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 |
# File 'generated/google/apis/drive_v2/service.rb', line 1942 def (file_id, max_results: nil, page_token: nil, supports_team_drives: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/permissions', ) command.response_representation = Google::Apis::DriveV2::PermissionList::Representation command.response_class = Google::Apis::DriveV2::PermissionList 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['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_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::PropertyList
Lists a file's properties.
2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 |
# File 'generated/google/apis/drive_v2/service.rb', line 2199 def list_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'files/{fileId}/properties', ) command.response_representation = Google::Apis::DriveV2::PropertyList::Representation command.response_class = Google::Apis::DriveV2::PropertyList 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 |
#list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReplyList
Lists all of the replies to a comment.
2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 |
# File 'generated/google/apis/drive_v2/service.rb', line 2539 def list_replies(file_id, comment_id, include_deleted: nil, max_results: 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::DriveV2::CommentReplyList::Representation command.response_class = Google::Apis::DriveV2::CommentReplyList 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['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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::RevisionList
Lists a file's revisions.
2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 |
# File 'generated/google/apis/drive_v2/service.rb', line 2735 def list_revisions(file_id, max_results: 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::DriveV2::RevisionList::Representation command.response_class = Google::Apis::DriveV2::RevisionList 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_teamdrives(max_results: 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::DriveV2::TeamDriveList
Lists the user's Team Drives.
2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 |
# File 'generated/google/apis/drive_v2/service.rb', line 2965 def list_teamdrives(max_results: 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::DriveV2::TeamDriveList::Representation command.response_class = Google::Apis::DriveV2::TeamDriveList command.query['maxResults'] = max_results unless max_results.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 |
#patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment
Updates an existing comment. This method supports patch semantics.
776 777 778 779 780 781 782 783 784 785 786 787 788 |
# File 'generated/google/apis/drive_v2/service.rb', line 776 def patch_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::DriveV2::Comment::Representation command.request_object = comment_object command.response_representation = Google::Apis::DriveV2::Comment::Representation command.response_class = Google::Apis::DriveV2::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 |
#patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Updates file metadata and/or content. This method supports patch semantics.
1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 |
# File 'generated/google/apis/drive_v2/service.rb', line 1300 def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'files/{fileId}', ) command.request_representation = Google::Apis::DriveV2::File::Representation command.request_object = file_object command.response_representation = Google::Apis::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.params['fileId'] = file_id unless file_id.nil? command.query['addParents'] = add_parents unless add_parents.nil? command.query['convert'] = convert unless convert.nil? command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil? command.query['newRevision'] = new_revision unless new_revision.nil? command.query['ocr'] = ocr unless ocr.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['pinned'] = pinned unless pinned.nil? command.query['removeParents'] = remove_parents unless remove_parents.nil? command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.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 |
#patch_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Updates a permission using patch semantics.
1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 |
# File 'generated/google/apis/drive_v2/service.rb', line 1993 def (file_id, , = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', ) command.request_representation = Google::Apis::DriveV2::Permission::Representation command.request_object = command.response_representation = Google::Apis::DriveV2::Permission::Representation command.response_class = Google::Apis::DriveV2::Permission command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Updates a property.
2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 |
# File 'generated/google/apis/drive_v2/service.rb', line 2238 def patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'files/{fileId}/properties/{propertyKey}', ) command.request_representation = Google::Apis::DriveV2::Property::Representation command.request_object = property_object command.response_representation = Google::Apis::DriveV2::Property::Representation command.response_class = Google::Apis::DriveV2::Property command.params['fileId'] = file_id unless file_id.nil? command.params['propertyKey'] = property_key unless property_key.nil? command.query['visibility'] = visibility unless visibility.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 |
#patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply
Updates an existing reply. This method supports patch semantics.
2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 |
# File 'generated/google/apis/drive_v2/service.rb', line 2581 def patch_reply(file_id, comment_id, reply_id, comment_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::DriveV2::CommentReply::Representation command.request_object = comment_reply_object command.response_representation = Google::Apis::DriveV2::CommentReply::Representation command.response_class = Google::Apis::DriveV2::CommentReply 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 |
#patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Revision
Updates a revision. This method supports patch semantics.
2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 |
# File 'generated/google/apis/drive_v2/service.rb', line 2773 def patch_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::DriveV2::Revision::Representation command.request_object = revision_object command.response_representation = Google::Apis::DriveV2::Revision::Representation command.response_class = Google::Apis::DriveV2::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 |
#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
422 423 424 425 426 427 428 429 430 |
# File 'generated/google/apis/drive_v2/service.rb', line 422 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::DriveV2::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 |
#touch_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Set the file's updated time to the current server time.
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 |
# File 'generated/google/apis/drive_v2/service.rb', line 1351 def touch_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/touch', ) command.response_representation = Google::Apis::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.params['fileId'] = file_id unless file_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#trash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for Team Drive files.
1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 |
# File 'generated/google/apis/drive_v2/service.rb', line 1388 def trash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/trash', ) command.response_representation = Google::Apis::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.params['fileId'] = file_id unless file_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#untrash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Restores a file from the trash.
1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 |
# File 'generated/google/apis/drive_v2/service.rb', line 1424 def untrash_file(file_id, supports_team_drives: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'files/{fileId}/untrash', ) command.response_representation = Google::Apis::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.params['fileId'] = file_id unless file_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Comment
Updates an existing comment.
815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'generated/google/apis/drive_v2/service.rb', line 815 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(:put, 'files/{fileId}/comments/{commentId}', ) command.request_representation = Google::Apis::DriveV2::Comment::Representation command.request_object = comment_object command.response_representation = Google::Apis::DriveV2::Comment::Representation command.response_class = Google::Apis::DriveV2::Comment command.params['fileId'] = file_id unless file_id.nil? command.params['commentId'] = comment_id unless comment_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::File
Updates file metadata and/or content.
1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 |
# File 'generated/google/apis/drive_v2/service.rb', line 1501 def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, supports_team_drives: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:put, 'files/{fileId}', ) else command = make_upload_command(:put, 'files/{fileId}', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::DriveV2::File::Representation command.request_object = file_object command.response_representation = Google::Apis::DriveV2::File::Representation command.response_class = Google::Apis::DriveV2::File command.params['fileId'] = file_id unless file_id.nil? command.query['addParents'] = add_parents unless add_parents.nil? command.query['convert'] = convert unless convert.nil? command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil? command.query['newRevision'] = new_revision unless new_revision.nil? command.query['ocr'] = ocr unless ocr.nil? command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? command.query['pinned'] = pinned unless pinned.nil? command.query['removeParents'] = remove_parents unless remove_parents.nil? command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil? command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Permission
Updates a permission.
2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 |
# File 'generated/google/apis/drive_v2/service.rb', line 2047 def (file_id, , = nil, remove_expiration: nil, supports_team_drives: nil, transfer_ownership: nil, use_domain_admin_access: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'files/{fileId}/permissions/{permissionId}', ) command.request_representation = Google::Apis::DriveV2::Permission::Representation command.request_object = command.response_representation = Google::Apis::DriveV2::Permission::Representation command.response_class = Google::Apis::DriveV2::Permission command.params['fileId'] = file_id unless file_id.nil? command.params['permissionId'] = unless .nil? command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil? command.query['useDomainAdminAccess'] = use_domain_admin_access unless use_domain_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Property
Updates a property.
2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 |
# File 'generated/google/apis/drive_v2/service.rb', line 2281 def update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'files/{fileId}/properties/{propertyKey}', ) command.request_representation = Google::Apis::DriveV2::Property::Representation command.request_object = property_object command.response_representation = Google::Apis::DriveV2::Property::Representation command.response_class = Google::Apis::DriveV2::Property command.params['fileId'] = file_id unless file_id.nil? command.params['propertyKey'] = property_key unless property_key.nil? command.query['visibility'] = visibility unless visibility.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_realtime(file_id, base_revision: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Overwrites the Realtime API data model associated with this file with the provided JSON data model.
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 |
# File 'generated/google/apis/drive_v2/service.rb', line 2372 def update_realtime(file_id, base_revision: 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(:put, 'files/{fileId}/realtime', ) else command = make_upload_command(:put, 'files/{fileId}/realtime', ) command.upload_source = upload_source command.upload_content_type = content_type end command.params['fileId'] = file_id unless file_id.nil? command.query['baseRevision'] = base_revision unless base_revision.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, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::CommentReply
Updates an existing reply.
2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 |
# File 'generated/google/apis/drive_v2/service.rb', line 2623 def update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}/replies/{replyId}', ) command.request_representation = Google::Apis::DriveV2::CommentReply::Representation command.request_object = comment_reply_object command.response_representation = Google::Apis::DriveV2::CommentReply::Representation command.response_class = Google::Apis::DriveV2::CommentReply 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::DriveV2::Revision
Updates a revision.
2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 |
# File 'generated/google/apis/drive_v2/service.rb', line 2812 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(:put, 'files/{fileId}/revisions/{revisionId}', ) command.request_representation = Google::Apis::DriveV2::Revision::Representation command.request_object = revision_object command.response_representation = Google::Apis::DriveV2::Revision::Representation command.response_class = Google::Apis::DriveV2::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::DriveV2::TeamDrive
Updates a Team Drive's metadata
3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 |
# File 'generated/google/apis/drive_v2/service.rb', line 3006 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(:put, 'teamdrives/{teamDriveId}', ) command.request_representation = Google::Apis::DriveV2::TeamDrive::Representation command.request_object = team_drive_object command.response_representation = Google::Apis::DriveV2::TeamDrive::Representation command.response_class = Google::Apis::DriveV2::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(channel_object = nil, include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, supports_team_drives: nil, team_drive_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Channel
Subscribe to changes for a user.
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'generated/google/apis/drive_v2/service.rb', line 379 def watch_change(channel_object = nil, include_corpus_removals: nil, include_deleted: nil, include_subscribed: nil, include_team_drive_items: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: 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::DriveV2::Channel::Representation command.request_object = channel_object command.response_representation = Google::Apis::DriveV2::Channel::Representation command.response_class = Google::Apis::DriveV2::Channel command.query['includeCorpusRemovals'] = include_corpus_removals unless include_corpus_removals.nil? command.query['includeDeleted'] = include_deleted unless include_deleted.nil? command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil? command.query['includeTeamDriveItems'] = include_team_drive_items unless include_team_drive_items.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['spaces'] = spaces unless spaces.nil? command.query['startChangeId'] = start_change_id unless start_change_id.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, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DriveV2::Channel
Subscribe to changes on a file
1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 |
# File 'generated/google/apis/drive_v2/service.rb', line 1572 def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, projection: nil, revision_id: nil, supports_team_drives: nil, update_viewed_date: 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::DriveV2::Channel::Representation command.request_object = channel_object command.response_representation = Google::Apis::DriveV2::Channel::Representation command.response_class = Google::Apis::DriveV2::Channel command.params['fileId'] = file_id unless file_id.nil? command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? command.query['projection'] = projection unless projection.nil? command.query['revisionId'] = revision_id unless revision_id.nil? command.query['supportsTeamDrives'] = supports_team_drives unless supports_team_drives.nil? command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.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 |