peterjmit/bamboo-api-client

A REST API client for Atlassian Bamboo

0.1.1 2014-05-31 03:16 UTC

This package is not auto-updated.

Last update: 2024-04-13 14:02:32 UTC


README

An API client consuming the REST resources made available for Atlassian's CI software - Bamboo

Installation

Add this line to your composer.json file, and run composer update

"peterjmit/bamboo-api-client": "~0.1.0"

Usage

Create an API client using http basic authentication

<?php
use  Peterjmit\Bamboo\Bamboo;

$bamboo = Bamboo::create('bamboo.com', 'username', 'password');

Specify an API version

<?php
$bamboo = Bamboo::create('bamboo.com', 'username', 'password', 1);

Methods

Get all build results

<?php
$bamboo->getAllBuildResults();

Get build results for a plan

<?php
$bamboo->getPlanResults('AN', 'EXAMPLE');

Get build results for a plan branch

<?php
$bamboo->getPlanBranchResults('AN', 'EXAMPLE', 'my-cool-feature-branch');

Get plan information for a specific branch

<?php
$bamboo->getPlanBranch('AN', 'EXAMPLE', 'my-cool-feature-branch');

Todo

  • Implement all endpoints/resources
  • Create objects to represent resources
  • Utilize "expand" functionality in bamboo
  • Use HATEOS links to load relations to returned objects

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request