PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Links

Links connect your commit messages and code comments directly to your JIRA issue tracker or Bamboo build server.

Prepare:

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

$links = new \Bitbucket\API\Repositories\Links();
$links->getClient()->addListener(
    new \Bitbucket\API\Http\Listener\OAuth2Listener($oauth_params)
);
$links->all($account_name, $repo_slug);
$links->get($account_name, $repo_slug, 3);
$links->create($account_name, $repo_slug, 'custom', 'https://example.com', 'link-key');
$links->update($account_name, $repo_slug, 3, 'https://example.com', 'link-key');
$links->delete($account_name, $repo_slug, 3);