google_api_drive v0.1.0 GoogleApi.Drive.V3.Api.Permissions View Source
API calls for all endpoints tagged Permissions
.
Link to this section Summary
Functions
Creates a permission for a file or Team Drive
Deletes a permission
Gets a permission by ID
Lists a file's or Team Drive's permissions
Updates a permission with patch semantics
Link to this section Functions
drive_permissions_create(Tesla.Env.client(), String.t(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.Permission.t()} | {:error, Tesla.Env.t()}
Creates a permission for a file or Team Drive.
Parameters
- connection (GoogleApi.Drive.V3.Connection): Connection to server
- file_id (String.t): The ID of the file or Team Drive.
opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (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 (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :emailMessage (String.t): A plain text custom message to include in the notification email.
- :sendNotificationEmail (boolean()): Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.
- :supportsTeamDrives (boolean()): Whether the requesting application supports Team Drives.
- :transferOwnership (boolean()): Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
- :useDomainAdminAccess (boolean()): Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs.
- :body (Permission):
Returns
{:ok, %GoogleApi.Drive.V3.Model.Permission{}} on success {:error, info} on failure
drive_permissions_delete(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Deletes a permission.
Parameters
- connection (GoogleApi.Drive.V3.Connection): Connection to server
- file_id (String.t): The ID of the file or Team Drive.
- permission_id (String.t): The ID of the permission.
opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (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 (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :supportsTeamDrives (boolean()): Whether the requesting application supports Team Drives.
- :useDomainAdminAccess (boolean()): Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs.
Returns
{:ok, %{}} on success {:error, info} on failure
drive_permissions_get(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.Permission.t()} | {:error, Tesla.Env.t()}
Gets a permission by ID.
Parameters
- connection (GoogleApi.Drive.V3.Connection): Connection to server
- file_id (String.t): The ID of the file.
- permission_id (String.t): The ID of the permission.
opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (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 (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :supportsTeamDrives (boolean()): Whether the requesting application supports Team Drives.
- :useDomainAdminAccess (boolean()): Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs.
Returns
{:ok, %GoogleApi.Drive.V3.Model.Permission{}} on success {:error, info} on failure
drive_permissions_list(Tesla.Env.client(), String.t(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.PermissionList.t()} | {:error, Tesla.Env.t()}
Lists a file's or Team Drive's permissions.
Parameters
- connection (GoogleApi.Drive.V3.Connection): Connection to server
- file_id (String.t): The ID of the file or Team Drive.
opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (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 (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :pageSize (integer()): The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned.
- :pageToken (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.
- :supportsTeamDrives (boolean()): Whether the requesting application supports Team Drives.
- :useDomainAdminAccess (boolean()): Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs.
Returns
{:ok, %GoogleApi.Drive.V3.Model.PermissionList{}} on success {:error, info} on failure
drive_permissions_update(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, GoogleApi.Drive.V3.Model.Permission.t()} | {:error, Tesla.Env.t()}
Updates a permission with patch semantics.
Parameters
- connection (GoogleApi.Drive.V3.Connection): Connection to server
- file_id (String.t): The ID of the file or Team Drive.
- permission_id (String.t): The ID of the permission.
opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (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 (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :removeExpiration (boolean()): Whether to remove the expiration date.
- :supportsTeamDrives (boolean()): Whether the requesting application supports Team Drives.
- :transferOwnership (boolean()): Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
- :useDomainAdminAccess (boolean()): Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs.
- :body (Permission):
Returns
{:ok, %GoogleApi.Drive.V3.Model.Permission{}} on success {:error, info} on failure