php-travis-client
php-travis-client copied to clipboard
Add paging option when fetching builds
Problem:
For example, when looking for builds by branch you can get no results when there are indeed builds beyond the "first page" of API results...
$client->fetchRepository($repo);
$client->getBuilds()->findBy(array('branch' => $branch));
$build = $builds->first();
Recommendations:
This would allow setting an optional page limit when populating repository data...
public function fetchRepository($slug, $pageLimit = 1)
This would make it a property of the client...
private $pageLimit = 1;
public function setPageLimit($limit)
{
$this->pageLimit = $limit;
}