PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Events

Track events that occur on public repositories. NOTE: Tracking events from private repositories are not supported for the moment by the API.

Prepare:

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

$events = new \Bitbucket\API\Repositories\Events();
$events->getClient()->addListener(
    new \Bitbucket\API\Http\Listener\OAuth2Listener($oauth_params)
);

Get all events with report_issue type:

$events->all($account_name, $repo_slug, array(
    'type'  => 'report_issue'
));