Access repository information via the Beanstalk REST API.
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');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();