activecollab-feather-sdk icon indicating copy to clipboard operation
activecollab-feather-sdk copied to clipboard

Expose pagination headers through SDK

Open mikestreety opened this issue 9 years ago • 7 comments

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

mikestreety avatar Oct 14 '16 08:10 mikestreety

This enhancement is planned for one of the releases in 3 branch.

ilijastuden avatar Oct 25 '16 13:10 ilijastuden

Hi @ilijastuden. Is there any release date for v3?

mikestreety avatar Jan 16 '17 11:01 mikestreety

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

ilijastuden avatar Jan 16 '17 11:01 ilijastuden

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);
}

mikestreety avatar Jan 16 '17 14:01 mikestreety

where is the autoload.php in this repository when i m using this code getting error

rajadileepkumar avatar Apr 03 '18 13:04 rajadileepkumar

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 avatar Apr 03 '18 13:04 mikestreety

@mikestreety thanks it's working fine

rajadileepkumar avatar Apr 16 '18 12:04 rajadileepkumar