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)
);
Get list of links:
$links->all($account_name, $repo_slug);
Get a single link:
$links->get($account_name, $repo_slug, 3);
Create a new link:
$links->create($account_name, $repo_slug, 'custom', 'https://example.com', 'link-key');
Update a link:
$links->update($account_name, $repo_slug, 3, 'https://example.com', 'link-key');
Delete a link:
$links->delete($account_name, $repo_slug, 3);