PHP Bitbucket API

Simple Bitbucket API wrapper for PHP

Users ssh keys

Use the ssh-keys resource to manipulate the ssh-keys on an individual or team account.

Prepare:

$users = new Bitbucket\API\Users();
$users->setCredentials( new Bitbucket\API\Authentication\Basic($bb_user, $bb_pass) );

Get a list of the keys associated with an account:

$users->sshKeys()->all($account_name);

Creates a key on the specified account:

$users->sshKeys()->create($account_name, 'key content', 'dummy key');

Updates a key on the specified account:

$users->sshKeys()->update($account_name, 12, 'key content');

Get the content of the specified key_id:

$users->sshKeys()->get($account_name, 12);

Delete a ssh key:

$users->sshKeys()->delete($account_name, 12);