User
Manages the currently authenticated account profile.
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 user profile
$profile = $user->get();
Update currently authenticated user profile:
$user->update(array(
'first_name' => 'John',
'last_name' => 'Doe'
));
Get user privileges:
$user->privileges();
Get a list of repositories an account follows:
$user->follows();
Retrieves the email for an authenticated user.
$user->emails();