Expose pagination headers through SDK
Hello, as per this SO question, it would be great if the pagination headers could be exposed through the SDK
http://stackoverflow.com/questions/40020003/get-pagination-results-in-active-collab-api
Thanks
This enhancement is planned for one of the releases in 3 branch.
Hi @ilijastuden. Is there any release date for v3?
There are no short term plans. You can always use alternative approach (iterate until you get an empty response), as explained here: http://stackoverflow.com/a/40020858/338473
Thanks @ilijastuden, I have a work around (below) - was just wondering if v3 was landing imminently!
// Get all the projects in active collab
$page = 1;
$project_records = array();
$project_records_results = $this->activeCollabClient->get('projects?page=' . $page)->getJson();
$project_records = array_merge($project_records, $project_records_results);
// Loop through pages of projects
while ($project_records_results = $this->activeCollabClient->get('projects?page=' . ++$page)->getJson()) {
$project_records = array_merge($project_records, $project_records_results);
}
where is the autoload.php in this repository when i m using this code getting error
Hi @rajadileepkumar - this is unrelated to this issue, but the autoload.php is created when you install the library with composer - which is detailed on their website
@mikestreety thanks it's working fine