View Source GoogleApi.Drive.V3.Api.Files (google_api_drive v0.32.0)
API calls for all endpoints tagged Files
.
Summary
Functions
Creates a copy of a file and applies any requested updates with patch semantics.
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
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.
Downloads content of a file. Operations are valid for 24 hours from the time of creation.
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 create 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.
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.
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 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.
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.
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.
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.
Subscribes to changes to a file.
Functions
drive_files_copy(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_copy(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Creates a copy of a file and applies any requested updates with patch semantics.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:enforceSingleParent
(type:boolean()
) - Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead. -
:ignoreDefaultVisibility
(type:boolean()
) - Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:body
(type:GoogleApi.Drive.V3.Model.File.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
@spec drive_files_create(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:enforceSingleParent
(type:boolean()
) - Deprecated. Creating files in multiple folders is no longer supported. -
:ignoreDefaultVisibility
(type:boolean()
) - Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text. -
:body
(type:GoogleApi.Drive.V3.Model.File.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
drive_files_create_iodata(connection, upload_type, metadata, data, optional_params \\ [], opts \\ [])
View Source@spec drive_files_create_iodata( Tesla.Env.client(), String.t(), GoogleApi.Drive.V3.Model.File.t(), iodata(), keyword(), keyword() ) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
upload_type
(type:String.t
) - Upload type. Must be "multipart". -
metadata
(type:GoogleApi.Drive.V3.Model.File.t
) - object metadata -
data
(type:iodata
) - Content to upload, as a string or iolist -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:enforceSingleParent
(type:boolean()
) - Deprecated. Creating files in multiple folders is no longer supported. -
:ignoreDefaultVisibility
(type:boolean()
) - Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
drive_files_create_resumable(connection, upload_type, optional_params \\ [], opts \\ [])
View Source@spec drive_files_create_resumable( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
upload_type
(type:String.t
) - Upload type. Must be "resumable". -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:enforceSingleParent
(type:boolean()
) - Deprecated. Creating files in multiple folders is no longer supported. -
:ignoreDefaultVisibility
(type:boolean()
) - Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text. -
:body
(type:GoogleApi.Drive.V3.Model.File.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %{}}
on success -
{:error, info}
on failure
drive_files_create_simple(connection, upload_type, metadata, data, optional_params \\ [], opts \\ [])
View Source@spec drive_files_create_simple( Tesla.Env.client(), String.t(), GoogleApi.Drive.V3.Model.File.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Creates a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/*
Note: Specify a valid MIME type, rather than the literal */*
value. The literal */*
is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see Upload file data. Apps creating shortcuts with files.create
must specify the MIME type application/vnd.google-apps.shortcut
. Apps should specify a file extension in the name
property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg"
in the metadata. Subsequent GET
requests include the read-only fileExtension
property populated with the extension originally specified in the title
property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
upload_type
(type:String.t
) - Upload type. Must be "multipart". -
metadata
(type:GoogleApi.Drive.V3.Model.File.t
) - object metadata -
data
(type:String.t
) - Path to file containing content to upload -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:enforceSingleParent
(type:boolean()
) - Deprecated. Creating files in multiple folders is no longer supported. -
:ignoreDefaultVisibility
(type:boolean()
) - Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
drive_files_delete(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_delete(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:enforceSingleParent
(type:boolean()
) - Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %{}}
on success -
{:error, info}
on failure
drive_files_download(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_download(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Downloads content of a file. Operations are valid for 24 hours from the time of creation.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - Required. The ID of the file to download. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:mimeType
(type:String.t
) - Optional. The MIME type the file should be downloaded as. This field can only be set when downloading Google Workspace documents. See Export MIME types for Google Workspace documents for the list of supported MIME types. If not set, a Google Workspace document is downloaded with a default MIME type. The default MIME type might change in the future. -
:revisionId
(type:String.t
) - Optional. The revision ID of the file to download. This field can only be set when downloading blob files, Google Docs, and Google Sheets. ReturnsINVALID_ARGUMENT
if downloading a specific revision on the file is unsupported.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.Operation{}}
on success -
{:error, info}
on failure
drive_files_empty_trash(connection, optional_params \\ [], opts \\ [])
View Source@spec drive_files_empty_trash(Tesla.Env.client(), keyword(), keyword()) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Permanently deletes all of the user's trashed files.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:driveId
(type:String.t
) - If set, empties the trash of the provided shared drive. -
:enforceSingleParent
(type:boolean()
) - Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %{}}
on success -
{:error, info}
on failure
drive_files_export(connection, file_id, mime_type, optional_params \\ [], opts \\ [])
View Source@spec drive_files_export( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
mime_type
(type:String.t
) - Required. The MIME type of the format requested for this export. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart").
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %{}}
on success -
{:error, info}
on failure
drive_files_generate_ids(connection, optional_params \\ [], opts \\ [])
View Source@spec drive_files_generate_ids(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.GeneratedIds.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Generates a set of file IDs which can be provided in create or copy requests.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:count
(type:integer()
) - The number of IDs to return. -
:space
(type:String.t
) - The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'. (Default: 'drive') -
:type
(type:String.t
) - The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in thedrive
'space'. (Default: 'files')
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.GeneratedIds{}}
on success -
{:error, info}
on failure
drive_files_get(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:acknowledgeAbuse
(type:boolean()
) - Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when thealt
parameter is set tomedia
and the user is the owner of the file or an organizer of the shared drive in which the file resides. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
@spec drive_files_list(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.FileList.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:corpora
(type:String.t
) - Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'q' parameter. -
:corpus
(type:String.t
) - Deprecated: The source of files to list. Use 'corpora' instead. -
:driveId
(type:String.t
) - ID of the shared drive to search. -
:includeItemsFromAllDrives
(type:boolean()
) - Whether both My Drive and shared drive items should be included in results. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:includeTeamDriveItems
(type:boolean()
) - Deprecated: UseincludeItemsFromAllDrives
instead. -
:orderBy
(type:String.t
) - A comma-separated list of sort keys. Valid keys are:createdTime
: When the file was created.folder
: The folder ID. This field is sorted using alphabetical ordering.modifiedByMeTime
: The last time the file was modified by the user.modifiedTime
: The last time the file was modified by anyone.name
: The name of the file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22.name_natural
: The name of the file. This field is sorted using natural sort ordering, so 1, 2, 12, 22.quotaBytesUsed
: The number of storage quota bytes used by the file.recency
: The most recent timestamp from the file's date-time fields.sharedWithMeTime
: When the file was shared with the user, if applicable.starred
: Whether the user has starred the file. *viewedByMeTime
: The last time the file was viewed by the user. Each key sorts ascending by default, but can be reversed with the 'desc' modifier. Example usage:?orderBy=folder,modifiedTime desc,name
. -
:pageSize
(type:integer()
) - The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. -
:pageToken
(type:String.t
) - The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. -
:q
(type:String.t
) - A query for filtering the file results. See the "Search for files & folders" guide for supported syntax. -
:spaces
(type:String.t
) - A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:teamDriveId
(type:String.t
) - Deprecated: UsedriveId
instead.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.FileList{}}
on success -
{:error, info}
on failure
drive_files_list_labels(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_list_labels(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.LabelList.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Lists the labels on a file.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID for the file. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:maxResults
(type:integer()
) - The maximum number of labels to return per page. When not set, defaults to 100. -
:pageToken
(type:String.t
) - The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.LabelList{}}
on success -
{:error, info}
on failure
drive_files_modify_labels(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_modify_labels(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.ModifyLabelsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file to which the labels belong. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Drive.V3.Model.ModifyLabelsRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.ModifyLabelsResponse{}}
on success -
{:error, info}
on failure
drive_files_update(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_update(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:addParents
(type:String.t
) - A comma-separated list of parent IDs to add. -
:enforceSingleParent
(type:boolean()
) - Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:removeParents
(type:String.t
) - A comma-separated list of parent IDs to remove. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text. -
:body
(type:GoogleApi.Drive.V3.Model.File.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
drive_files_update_iodata(connection, file_id, upload_type, metadata, data, optional_params \\ [], opts \\ [])
View Source@spec drive_files_update_iodata( Tesla.Env.client(), String.t(), String.t(), GoogleApi.Drive.V3.Model.File.t(), iodata(), keyword(), keyword() ) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
upload_type
(type:String.t
) - Upload type. Must be "multipart". -
metadata
(type:GoogleApi.Drive.V3.Model.File.t
) - object metadata -
data
(type:iodata
) - Content to upload, as a string or iolist -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:addParents
(type:String.t
) - A comma-separated list of parent IDs to add. -
:enforceSingleParent
(type:boolean()
) - Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:removeParents
(type:String.t
) - A comma-separated list of parent IDs to remove. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
drive_files_update_resumable(connection, file_id, upload_type, optional_params \\ [], opts \\ [])
View Source@spec drive_files_update_resumable( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
upload_type
(type:String.t
) - Upload type. Must be "resumable". -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:addParents
(type:String.t
) - A comma-separated list of parent IDs to add. -
:enforceSingleParent
(type:boolean()
) - Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:removeParents
(type:String.t
) - A comma-separated list of parent IDs to remove. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text. -
:body
(type:GoogleApi.Drive.V3.Model.File.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %{}}
on success -
{:error, info}
on failure
drive_files_update_simple(connection, file_id, upload_type, metadata, data, optional_params \\ [], opts \\ [])
View Source@spec drive_files_update_simple( Tesla.Env.client(), String.t(), String.t(), GoogleApi.Drive.V3.Model.File.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
upload_type
(type:String.t
) - Upload type. Must be "multipart". -
metadata
(type:GoogleApi.Drive.V3.Model.File.t
) - object metadata -
data
(type:String.t
) - Path to file containing content to upload -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:addParents
(type:String.t
) - A comma-separated list of parent IDs to add. -
:enforceSingleParent
(type:boolean()
) - Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:keepRevisionForever
(type:boolean()
) - Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -
:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code). -
:removeParents
(type:String.t
) - A comma-separated list of parent IDs to remove. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:useContentAsIndexableText
(type:boolean()
) - Whether to use the uploaded content as indexable text.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success -
{:error, info}
on failure
drive_files_watch(connection, file_id, optional_params \\ [], opts \\ [])
View Source@spec drive_files_watch(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.Channel.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Subscribes to changes to a file.
Parameters
-
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to server -
file_id
(type:String.t
) - The ID of the file. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:acknowledgeAbuse
(type:boolean()
) - Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when thealt
parameter is set tomedia
and the user is the owner of the file or an organizer of the shared drive in which the file resides. -
:includeLabels
(type:String.t
) - A comma-separated list of IDs of labels to include in thelabelInfo
part of the response. -
:includePermissionsForView
(type:String.t
) - Specifies which additional view's permissions to include in the response. Only 'published' is supported. -
:supportsAllDrives
(type:boolean()
) - Whether the requesting application supports both My Drives and shared drives. -
:supportsTeamDrives
(type:boolean()
) - Deprecated: UsesupportsAllDrives
instead. -
:resource
(type:GoogleApi.Drive.V3.Model.Channel.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Drive.V3.Model.Channel{}}
on success -
{:error, info}
on failure