PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Issue versions

Manage versions on a issue tracker.

Prepare:

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

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

Fetch all versions:

$issue->versions()->all($accountname, $repo_slug);

Fetch single version:

$issue->versions()->get($accountname, $repo_slug, 53917);

Add a new version:

$issue->versions()->create($accountname, $repo_slug, '3.0');

Update an existing version:

$issue->versions()->update($accountname, $repo_slug, 53920, '3.0.1');

Delete an existing version:

$issue->versions()->delete($accountname, $repo_slug, 53920);