Google Drive Permissions

Figure 1. Instantiate Google Drive Permissions
$permissions = eden('google')->drive($_SESSION['token'])->permissions();
Figure 2. Permissions Methods
Method Arguments Returns Description
$permissions->delete($fileId, $permissionId);
  1. string
  2. string
array Deletes a permission from a file
$permissions->getList($fileId);
  1. string
array Lists a file's permissions
$permissions->getSpecific($fileId, $permissionId);
  1. string
  2. string
array Gets a permission by ID
$permissions->insert($fileId, $role, $type, $value = 'me');
  1. string
  2. string
  3. - The primary role for this user
  4. string
  5. - The account type
  6. string
  7. - The email address or domain name for the entity
array Inserts a permission for a file
$permissions->patch($fileId, $permissionId);
  1. string
  2. string
array Updates a permission. This method supports patch semantics.
$permissions->setName($name);
  1. string
Eden_Google_Drive_Permissions The name for this permission.
$permissions->setRole($role);
  1. string
Eden_Google_Drive_Permissions The primary role for this user Allowed values are: - owner - reader - writer
$permissions->setType($type);
  1. string
Eden_Google_Drive_Permissions Allowed values are: - user - group - domain - anyone
$permissions->setValue($value);
  1. string
Eden_Google_Drive_Permissions The email address or domain name for the entity. This is not populated in responses.
$permissions->setWithLink(); none Eden_Google_Drive_Permissions WWhether the link is required for this permission.
$permissions->update($fileId, $permissionId);
  1. string
  2. string
array Updates a permission.

© 2012 Openovate Labs. All rights reserved.