Module google_drive2::api

source ·

Structs§

  • An item with user information and settings.
  • Information about supported additional roles per file type. The most specific type takes precedence.
  • The supported additional roles per primary role.
  • A list of themes that are supported for shared drives.
  • The allowable export formats.
  • List of additional features enabled on this account.
  • Gets the information about the current user along with Drive API settings
  • The allowable import formats.
  • List of max upload sizes for each file type. The most specific type takes precedence.
  • A builder providing access to all methods supported on about resources. It is not used directly, but through the DriveHub hub.
  • The amount of storage quota used by different Google services.
  • Deprecated: Use driveThemes instead.
  • The apps resource provides a list of the apps that a user has installed, with information about each app’s supported MIME types, file extensions, and other details. Some resource methods (such as apps.get) require an appId. Use the apps.list method to retrieve the ID for an installed application.
  • Gets a specific app.
  • The various icons for the app.
  • A list of third-party applications which the user has installed or given access to Google Drive.
  • Lists a user’s installed apps.
  • A builder providing access to all methods supported on app resources. It is not used directly, but through the DriveHub hub.
  • Representation of a change to a file or shared drive.
  • Deprecated: Use changes.getStartPageToken and changes.list to retrieve recent changes.
  • Gets the starting pageToken for listing future changes.
  • A list of changes for a user.
  • Lists the changes for a user or shared drive.
  • A builder providing access to all methods supported on change resources. It is not used directly, but through the DriveHub hub.
  • Subscribe to changes for a user.
  • A notification channel used to watch for resource changes.
  • A builder providing access to all methods supported on channel resources. It is not used directly, but through the DriveHub hub.
  • Stops watching resources through this channel.
  • Removes a child from a folder.
  • Gets a specific child reference.
  • Inserts a file into a folder.
  • A list of children of a file.
  • Lists a folder’s children.
  • A builder providing access to all methods supported on child resources. It is not used directly, but through the DriveHub hub.
  • A reference to a folder’s child. Some resource methods (such as children.get) require a childId. Use the children.list method to retrieve the ID of the child.
  • A comment on a file in Google Drive. Some resource methods (such as comments.update) require a commentId. Use the comments.list method to retrieve the ID for a comment in a file.
  • The context of the file which is being commented on.
  • Deletes a comment.
  • Gets a comment by ID.
  • Creates a new comment on the given file.
  • A list of comments on a file in Google Drive.
  • Lists a file’s comments.
  • A builder providing access to all methods supported on comment resources. It is not used directly, but through the DriveHub hub.
  • Updates an existing comment.
  • A comment on a file in Google Drive. Some resource methods (such as replies.update) require a replyId. Use the replies.list method to retrieve the ID for a reply.
  • A list of replies to a comment on a file in Google Drive.
  • Updates an existing comment.
  • A restriction for accessing the content of the file.
  • Representation of a shared drive. Some resource methods (such as drives.update) require a driveId. Use the drives.list method to retrieve the ID for a shared drive.
  • An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive.drives.update requests that don’t set themeId. When specified, all fields of the backgroundImageFile must be set.
  • Output only. Capabilities the current user has on this shared drive.
  • Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.
  • Gets a shared drive’s metadata by ID.
  • Hides a shared drive from the default view.
  • Central instance to access all DriveHub related resource activities
  • Creates a new shared drive.
  • A list of shared drives.
  • Lists the user’s shared drives. This method accepts the q parameter, which is a search query combining one or more search terms. For more information, see the Search for shared drives guide.
  • A builder providing access to all methods supported on drive resources. It is not used directly, but through the DriveHub hub.
  • A set of restrictions that apply to this shared drive or items inside this shared drive.
  • Restores a shared drive to the default view.
  • Updates the metadata for a shared drive.
  • The metadata for a file. Some resource methods (such as files.update) require a fileId. Use the files.list method to retrieve the ID for a file.
  • Output only. Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
  • Creates a copy of the specified file.
  • Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive, the user must be an organizer on the parent folder. If the target is a folder, all descendants owned by the user are also deleted.
  • Permanently deletes all of the user’s trashed files.
  • Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.
  • Generates a set of file IDs which can be provided in insert or copy requests.
  • Gets a file’s metadata or content by ID. If you provide the URL parameter alt=media, then the response includes the file contents in the response body. Downloading content with alt=media only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use files.export instead. For more information, see Download & export files.
  • Output only. Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
  • Output only. Geographic location information stored in the image.
  • Indexable text attributes for the file (can only be written)
  • Inserts a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/* Note: Specify a valid MIME type, rather than the literal */* value. The literal */* is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.insert must specify the MIME type application/vnd.google-apps.shortcut. Apps should specify a file extension in the title property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "title": "cat.jpg" in the metadata. Subsequent GET requests include the read-only fileExtension property populated with the extension originally specified in the title property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file’s MIME type.
  • Output only. An overview of the labels on the file.
  • A group of labels for the file.
  • Contains details about the link URLs that clients are using to refer to this item.
  • A list of files.
  • Lists the user’s files. This method accepts the q parameter, which is a search query combining one or more search terms. For more information, see the Search for files & folders guide. Note: This method returns all files by default, including trashed files. If you don’t want trashed files to appear in the list, use the trashed=false query parameter to remove trashed files from the results.
  • Lists the labels on a file.
  • A builder providing access to all methods supported on file resources. It is not used directly, but through the DriveHub hub.
  • Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified.
  • Updates a file’s metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.
  • Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
  • A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
  • Set the file’s updated time to the current server time.
  • Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files.
  • Restores a file from the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files.
  • Updates a file’s metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as modifiedDate. This method supports patch semantics. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/* Note: Specify a valid MIME type, rather than the literal */* value. The literal */* is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data.
  • Output only. Metadata about video media. This will only be present for video types.
  • Subscribes to changes to a file.
  • A list of generated IDs which can be provided in insert requests
  • Representation of a label and label fields.
  • Representation of field, which is a typed key-value pair.
  • A modification to a label’s field.
  • A list of labels applied to a file.
  • A modification to a label on a file. A LabelModification can be used to apply a label to a file, update an existing label on a file, or remove a label from a file.
  • A request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail atomically.
  • Response to a ModifyLabels request. This contains only those labels which were added or updated by the request.
  • Removes a parent from a file.
  • Gets a specific parent reference.
  • Adds a parent folder for a file.
  • A list of a file’s parents.
  • Lists a file’s parents.
  • A builder providing access to all methods supported on parent resources. It is not used directly, but through the DriveHub hub.
  • A reference to a file’s parent. Some resource methods (such as parents.get) require a parentId. Use the parents.list method to retrieve the ID for a parent.
  • A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as permissions.update) require a permissionId. Use the permissions.list method to retrieve the ID for a file, folder, or shared drive.
  • Deletes a permission from a file or shared drive. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
  • Gets a permission by ID.
  • Returns the permission ID for an email address.
  • An ID for a user or group as seen in Permission items.
  • Inserts a permission for a file or shared drive. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
  • A list of permissions associated with a file.
  • Lists a file’s or shared drive’s permissions.
  • A builder providing access to all methods supported on permission resources. It is not used directly, but through the DriveHub hub.
  • Updates a permission using patch semantics. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
  • Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
  • Output only. Deprecated: Use permissionDetails instead.
  • Updates a permission. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
  • A key-value pair attached to a file that is either public or private to an application. The following limits apply to file properties: * Maximum of 100 properties total per file * Maximum of 30 private properties per app * Maximum of 30 public properties * Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property Some resource methods (such as properties.update) require a propertyKey. Use the properties.list method to retrieve the key for a property.
  • Deletes a property.
  • Gets a property by its key.
  • Adds a property to a file, or updates it if it already exists.
  • A collection of properties, key-value pairs that are either public or private to an application.
  • Lists a file’s properties.
  • A builder providing access to all methods supported on property resources. It is not used directly, but through the DriveHub hub.
  • Updates a property.
  • Updates a property.
  • Deletes a reply.
  • Gets a reply.
  • Creates a new reply to the given comment.
  • Lists all of the replies to a comment.
  • A builder providing access to all methods supported on reply resources. It is not used directly, but through the DriveHub hub.
  • Updates an existing reply.
  • Updates an existing reply.
  • A revision of a file. Some resource methods (such as revisions.update) require a revisionId. Use the revisions.list method to retrieve the ID for a revision.
  • Permanently deletes a file version. You can only delete revisions for files with binary content, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can’t be deleted.
  • Gets a specific revision.
  • A list of revisions of a file.
  • Lists a file’s revisions.
  • A builder providing access to all methods supported on revision resources. It is not used directly, but through the DriveHub hub.
  • Updates a revision.
  • Updates a revision.
  • There is no detailed description.
  • Deprecated: Use the drive collection instead.
  • An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don’t set themeId. When specified, all fields of the backgroundImageFile must be set.
  • Capabilities the current user has on this Team Drive.
  • A list of Team Drives.
  • A set of restrictions that apply to this Team Drive or items inside this Team Drive.
  • Deprecated: Use drives.delete instead.
  • Deprecated: Use drives.get instead.
  • Deprecated: Use drives.insert instead.
  • Deprecated: Use drives.list instead.
  • A builder providing access to all methods supported on teamdrive resources. It is not used directly, but through the DriveHub hub.
  • Deprecated: Use drives.update instead.
  • Information about a Drive user.
  • Output only. The user’s profile picture.

Enums§