Wiki
Provides functionality for getting information from pages in a Bitbucket wiki, creating new pages, and updating them.
Prepare:
// @see: https://bitbucket.org/account/user/<username or team>/api
$oauth_params = array(
'client_id' => 'aaa',
'client_secret' => 'bbb'
);
$wiki = new \Bitbucket\API\Repositories\Wiki();
$wiki->getClient()->addListener(
new \Bitbucket\API\Http\Listener\OAuth2Listener($oauth_params)
);
Get the raw content of a Wiki page:
$wiki->get($account_name, $repo_slug, 'Home');
Create a new page:
$wiki->create($account_name, $repo_slug, 'Glossary', 'Page content !', '/Glossary');
Update a page:
$wiki->update($account_name, $repo_slug, 'Glossary', 'Dummy page content !');