PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Group Privileges

Manages a group's repository permissions.

Prepare

$privileges = new Bitbucket\API\User();
$privileges->setCredentials( new Bitbucket\API\Authentication\Basic($bb_user, $bb_pass) );

Get a list of privileged groups

$groups = $privileges->groups($account_name);

Get a list of privileged groups for a repository

$groups = $privileges->repository($account_name, $repo_slug);

Gets the privileges of a group on a repository.

$group = $privileges->group($account_name, $repo_slug, $group_owner, $group_slug);

Get a list of the repositories on which a particular privilege group appears.

$repos = $privileges->repositories($account_name, $group_owner, $group_slug);

Grant group privileges on a repository.

$privileges->grant($account_name, $repo_slug, $group_owner, $group_slug, 'read');

Delete group privileges from a repository

$privileges->delete($account_name, $repo_slug, $group_owner, $group_slug);