PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Issue components

Manage components 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 components:

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

Fetch single component:

$issue->components()->get($accountname, $repo_slug, 100332);

Add a new component:

$issue->components()->create($accountname, $repo_slug, 'DummyComponent');

Update an existing component:

$issue->components()->update($accountname, $repo_slug, 100336, 'DummyComponent');

Delete an existing component:

$issue->components()->delete($accountname, $repo_slug, 100336);