PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Users invitations

An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group.

Prepare:

// @see: https://bitbucket.org/account/user/<username or team>/api
$oauth_params = array(
    'client_id'         => 'aaa',
    'client_secret'     => 'bbb'
);

$users = new \Bitbucket\API\Users();
$users->getClient()->addListener(
    new \Bitbucket\API\Http\Listener\OAuth2Listener($oauth_params)
);

Get a list of pending invitations:

$users->invitations()->all($account_name);

Gets any pending invitations on a team or individual account for a particular email address:

$users->invitations()->email($account_name, 'dummy@example.com');

Tests whether there is a pending invitation for a particular email on account's group:

$users->invitations()->group($account_name, 'john', 'testers', 'dummy@example.com');

Issues an invitation to the specified account group.

An invitation is a request sent to an external email address to participate one or more of an account's groups.

$users->invitations()->create($account_name, 'john', 'testers', 'dummy@example.com');

Deletes any pending invitations on a team or individual account for a particular email address.

$users->invitations()->deleteByEmail($account_name, 'dummy@example.com');

Deletes a pending invitation for a particular email on account's group.

$users->invitations()->deleteByGroup($account_name, 'john', 'testers', 'dummy@example.com');