PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Users OAuth

Use the oauth resource to create and maintain your own OAuth consumers.

Prepare:

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

Get all OAuth consumers:

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

Create new consumer

$users->oauth()->create($account_name, 'test', 'just for testing', 'http://test.example.com/oauth/bitbucket');

Update existing consumer

$users->oauth()->create($account_name, 'test', 22, 'just for testing', 'http://test.example.com/oauth/bitbucket');

Delete existing consumer

$users->oauth()->delete($account_name, 22);