Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Sledgehammer module for accessing the Beanstalk REST API

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 classes
Octocat-spinner-32 Readme.md
Octocat-spinner-32 composer.json
Readme.md

Sledghammer Beanstalk Client

Access repository information via the Beanstalk REST API.

Usage

Using the BeanstalkClient directly gives control about which requests are fetched.

// Init
$beanstalk = new BeanstalkClient('subdomain', 'username', 'p4ssw0rd');
// Fetch commits
$commits = $beanstalk->getChangesetFor('my-repository');

Recommended usage

Using the Repository OOP interface allows autocompletion, chaining relations and filtering and sorting. And because the repository will use the same instance per unique id, it automaticly prevents duplicate requests.

// Init
$beanstalk = new BeanstalkClient('subdomain', 'username', 'p4ssw0rd');
$backend = new BeanstalkRepositoryBackend($beanstalk);
$repo = getRepository();
$repo->registerBackend($backend);
// Fetch commits
$commits = $repo->getRepository('my-repository')->commits->where(array('author' => 'Bob Fanger'))->toArray();
Something went wrong with that request. Please try again.