PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

User repositories

Get the details of the repositories associated with an individual or team account.

Prepare:

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

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

Get a list of repositories visible to an account:

$user->repositories()->get();

Get a list of repositories the account is following:

$user->repositories()->overview();

Get the list of repositories on the dashboard:

$user->repositories()->dashboard();