google_api_drive v0.5.0 GoogleApi.Drive.V3.Api.Files View Source
API calls for all endpoints tagged Files
.
Link to this section Summary
Functions
Creates a copy of a file and applies any requested updates with patch semantics.
Creates a new file.
Creates a new file.
Creates a new 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. 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 Doc to the requested MIME type and returns the exported content. Please 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.
Lists or searches files.
Updates a file's metadata and/or content with patch semantics.
Updates a file's metadata and/or content with patch semantics.
Updates a file's metadata and/or content with patch semantics.
Subscribes to changes to a file
Link to this section Functions
drive_files_copy(connection, file_id, optional_params \\ [], opts \\ [])
View Sourcedrive_files_copy(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:error, Tesla.Env.t()}
Creates a copy of a file and applies any requested updates with patch semantics.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_id
(type:String.t
) - The ID of the file.optional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser 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.: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.:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code).:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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
drive_files_create(connection, optional_params \\ [], opts \\ [])
View Sourcedrive_files_create(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:error, Tesla.Env.t()}
Creates a new file.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serveroptional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser 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.: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.:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code).:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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_resumable(connection, upload_type, optional_params \\ [], opts \\ [])
View Sourcedrive_files_create_resumable( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
Creates a new file.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverupload_type
(type:String.t
) - Upload type. Must be "resumable".optional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser 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.: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.:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code).:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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 Sourcedrive_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()} | {:error, Tesla.Env.t()}
Creates a new file.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverupload_type
(type:String.t
) - Upload type. Must be "multipart".metadata
(type:GoogleApi.Drive.V3.Model.File.t
) - object metadatadata
(type:String.t
) - Path to fileoptional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser 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.: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.:ocrLanguage
(type:String.t
) - A language hint for OCR processing during image import (ISO 639-1 code).:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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 Sourcedrive_files_delete(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_id
(type:String.t
) - The ID of the file.optional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives instead.
opts
(type:keyword()
) - Call options
Returns
{:ok, %{}}
on success{:error, info}
on failure
drive_files_empty_trash(connection, optional_params \\ [], opts \\ [])
View Sourcedrive_files_empty_trash(Tesla.Env.client(), keyword(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Permanently deletes all of the user's trashed files.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serveroptional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.
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 Sourcedrive_files_export( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_id
(type:String.t
) - The ID of the file.mime_type
(type:String.t
) - The MIME type of the format requested for this export.optional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.
opts
(type:keyword()
) - Call options
Returns
{:ok, %{}}
on success{:error, info}
on failure
drive_files_generate_ids(connection, optional_params \\ [], opts \\ [])
View Sourcedrive_files_generate_ids(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.GeneratedIds.t()} | {:error, Tesla.Env.t()}
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 serveroptional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.: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'.
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 Sourcedrive_files_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:error, Tesla.Env.t()}
Gets a file's metadata or content by ID.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_id
(type:String.t
) - The ID of the file.optional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.:acknowledgeAbuse
(type:boolean()
) - Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives instead.
opts
(type:keyword()
) - Call options
Returns
{:ok, %GoogleApi.Drive.V3.Model.File{}}
on success{:error, info}
on failure
drive_files_list(connection, optional_params \\ [], opts \\ [])
View Sourcedrive_files_list(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.FileList.t()} | {:error, Tesla.Env.t()}
Lists or searches files.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serveroptional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.: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.:corpus
(type:String.t
) - The source of files to list. Deprecated: use 'corpora' instead.:driveId
(type:String.t
) - ID of the shared drive to search.:includeItemsFromAllDrives
(type:boolean()
) - Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results.:includeTeamDriveItems
(type:boolean()
) - Deprecated use includeItemsFromAllDrives instead.:orderBy
(type:String.t
) - A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.: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" guide for supported syntax.:spaces
(type:String.t
) - A comma-separated list of spaces to query within the corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives instead.:teamDriveId
(type:String.t
) - Deprecated use driveId instead.
opts
(type:keyword()
) - Call options
Returns
{:ok, %GoogleApi.Drive.V3.Model.FileList{}}
on success{:error, info}
on failure
drive_files_update(connection, file_id, optional_params \\ [], opts \\ [])
View Sourcedrive_files_update(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.File.t()} | {:error, Tesla.Env.t()}
Updates a file's metadata and/or content with patch semantics.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_id
(type:String.t
) - The ID of the file.optional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.:addParents
(type:String.t
) - A comma-separated list of parent IDs to add.: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.: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()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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_resumable(connection, file_id, upload_type, optional_params \\ [], opts \\ [])
View Sourcedrive_files_update_resumable( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
Updates a file's metadata and/or content with patch semantics.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_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:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.:addParents
(type:String.t
) - A comma-separated list of parent IDs to add.: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.: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()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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 Sourcedrive_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()} | {:error, Tesla.Env.t()}
Updates a file's metadata and/or content with patch semantics.
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_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 metadatadata
(type:String.t
) - Path to fileoptional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.:addParents
(type:String.t
) - A comma-separated list of parent IDs to add.: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.: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()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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 Sourcedrive_files_watch(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.Channel.t()} | {:error, Tesla.Env.t()}
Subscribes to changes to a file
Parameters
connection
(type:GoogleApi.Drive.V3.Connection.t
) - Connection to serverfile_id
(type:String.t
) - The ID of the file.optional_params
(type:keyword()
) - Optional parameters:alt
(type:String.t
) - Data format for the response.: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
) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.:userIp
(type:String.t
) - Deprecated. Please use quotaUser instead.:acknowledgeAbuse
(type:boolean()
) - Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.:supportsAllDrives
(type:boolean()
) - Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.:supportsTeamDrives
(type:boolean()
) - Deprecated use supportsAllDrives 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