PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Changesets

Manage changesets resources on a repository. Unauthenticated calls for these resources only return values for public repositories.

Prepare:

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

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

Get a list of changesets associated with a repository:

$changesets->all($account_name, $repo_slug, 'aea95f1', 20);

Get an individual changeset:

$changesets->get($account_name, $repo_slug, 'aea95f1');

Get statistics associated with an individual changeset:

$changesets->diffstat($account_name, $repo_slug, '4ba1a4a');

Get the diff associated with a changeset:

$changesets->diff($account_name, $repo_slug, '4ba1a4a');

Get the likes on an individual changeset

NOTE: Because of a ( bug ) in the API, implementation for this method is missing for the moment.