The "permissions" collection of methods. Typical usage is:
$driveService = new Google_Service_Drive(...);
$permissions = $driveService->permissions;
Methods summary
public
|
#
delete( string $fileId, string $permissionId, array $optParams = array() )
Deletes a permission from a file or shared drive. (permissions.delete)
Deletes a permission from a file or shared drive. (permissions.delete)
Parameters
- $fileId
- The ID for the file or shared drive.
- $permissionId
- The ID for the permission.
- $optParams
- Optional parameters.
Opt_param
bool supportsAllDrives 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.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
bool useDomainAdminAccess Issue the request as a domain administrator; if set to
true, then the requester will be granted access if the file ID parameter refers
to a shared drive and the requester is an administrator of the domain to which
the shared drive belongs.
|
public
Google_Service_Drive_Permission
|
#
get( string $fileId, string $permissionId, array $optParams = array() )
Gets a permission by ID. (permissions.get)
Gets a permission by ID. (permissions.get)
Parameters
- $fileId
- The ID for the file or shared drive.
- $permissionId
- The ID for the permission.
- $optParams
- Optional parameters.
Returns
Opt_param
bool supportsAllDrives 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.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
bool useDomainAdminAccess Issue the request as a domain administrator; if set to
true, then the requester will be granted access if the file ID parameter refers
to a shared drive and the requester is an administrator of the domain to which
the shared drive belongs.
|
public
Google_Service_Drive_PermissionId
|
#
getIdForEmail( string $email, array $optParams = array() )
Returns the permission ID for an email address.
(permissions.getIdForEmail)
Returns the permission ID for an email address.
(permissions.getIdForEmail)
Parameters
- $email
- The email address for which to return a permission ID
- $optParams
- Optional parameters.
Returns
|
public
Google_Service_Drive_Permission
|
#
insert( string $fileId, Google_Service_Drive_Permission $postBody, array $optParams = array() )
Inserts a permission for a file or shared drive. (permissions.insert)
Inserts a permission for a file or shared drive. (permissions.insert)
Parameters
- $fileId
- The ID for the file or shared drive.
- $postBody
- $optParams
- Optional parameters.
Returns
Opt_param
string emailMessage A plain text custom message to include in notification
emails.
bool enforceSingleParent Set to true to opt in to API behavior that aims for all
items to have exactly one parent. This parameter will only take effect if the
item is not in a shared drive. See moveToNewOwnersRoot for details.
bool moveToNewOwnersRoot This parameter will only take effect if the item is not
in a shared drive and the request is attempting to transfer the ownership of the
item. When set to true, the item will be moved to the new owner's My Drive root
folder and all prior parents removed. If set to false, when
enforceSingleParent=true, parents are not changed. If set to false, when
enforceSingleParent=false, existing parents are not changed; however, the file
will be added to the new owner's My Drive root folder, unless it is already in
the new owner's My Drive.
bool sendNotificationEmails Whether to send notification emails when sharing to
users or groups. This parameter is ignored and an email is sent if the role is
owner.
bool supportsAllDrives 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.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
bool useDomainAdminAccess Issue the request as a domain administrator; if set to
true, then the requester will be granted access if the file ID parameter refers
to a shared drive and the requester is an administrator of the domain to which
the shared drive belongs.
|
public
Google_Service_Drive_PermissionList
|
#
listPermissions( string $fileId, array $optParams = array() )
Lists a file's or shared drive's permissions.
(permissions.listPermissions)
Lists a file's or shared drive's permissions.
(permissions.listPermissions)
Parameters
- $fileId
- The ID for the file or shared drive.
- $optParams
- Optional parameters.
Returns
Opt_param
int maxResults The maximum number of permissions to return per page. When not
set for files in a shared drive, at most 100 results will be returned. When not
set for files that are not in a shared drive, the entire list will be returned.
string pageToken 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.
bool supportsAllDrives 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.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
bool useDomainAdminAccess Issue the request as a domain administrator; if set to
true, then the requester will be granted access if the file ID parameter refers
to a shared drive and the requester is an administrator of the domain to which
the shared drive belongs.
|
public
Google_Service_Drive_Permission
|
#
patch( string $fileId, string $permissionId, Google_Service_Drive_Permission $postBody, array $optParams = array() )
Updates a permission using patch semantics. (permissions.patch)
Updates a permission using patch semantics. (permissions.patch)
Parameters
- $fileId
- The ID for the file or shared drive.
- $permissionId
- The ID for the permission.
- $postBody
- $optParams
- Optional parameters.
Returns
Opt_param
bool removeExpiration Whether to remove the expiration date.
bool supportsAllDrives 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.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
bool transferOwnership Whether changing a role to 'owner' downgrades the current
owners to writers. Does nothing if the specified role is not 'owner'.
bool useDomainAdminAccess Issue the request as a domain administrator; if set to
true, then the requester will be granted access if the file ID parameter refers
to a shared drive and the requester is an administrator of the domain to which
the shared drive belongs.
|
public
Google_Service_Drive_Permission
|
#
update( string $fileId, string $permissionId, Google_Service_Drive_Permission $postBody, array $optParams = array() )
Updates a permission. (permissions.update)
Updates a permission. (permissions.update)
Parameters
- $fileId
- The ID for the file or shared drive.
- $permissionId
- The ID for the permission.
- $postBody
- $optParams
- Optional parameters.
Returns
Opt_param
bool removeExpiration Whether to remove the expiration date.
bool supportsAllDrives 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.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
bool transferOwnership Whether changing a role to 'owner' downgrades the current
owners to writers. Does nothing if the specified role is not 'owner'.
bool useDomainAdminAccess Issue the request as a domain administrator; if set to
true, then the requester will be granted access if the file ID parameter refers
to a shared drive and the requester is an administrator of the domain to which
the shared drive belongs.
|