Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose pagination headers through SDK #7

Open
mikestreety opened this issue Oct 14, 2016 · 7 comments
Open

Expose pagination headers through SDK #7

mikestreety opened this issue Oct 14, 2016 · 7 comments

Comments

@mikestreety
Copy link

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

@ilijastuden
Copy link
Member

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

@mikestreety
Copy link
Author

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

@ilijastuden
Copy link
Member

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

@mikestreety
Copy link
Author

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

@rajadileepkumar
Copy link

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

@mikestreety
Copy link
Author

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

@rajadileepkumar
Copy link

@mikestreety thanks it's working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants