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

CBP iterator for Users #512

Merged
merged 6 commits into from
Oct 31, 2023
Merged

CBP iterator for Users #512

merged 6 commits into from
Oct 31, 2023

Conversation

ecoologic
Copy link
Collaborator

@ecoologic ecoologic commented Oct 18, 2023

Now using CBP for Tickets and Users. TicketIterator becoming CbpIterator.

PS: There's a major refactoring coming to accommodate OBP endpoints, this is a minor stepping stone. Most of the changes are renaming and extractions.

$params['page[after]'] = $this->afterCursor;
}
$response = $this->resourcesRoot->findAll($params);
$this->page = array_merge($this->page, $response->{$this->resourcesKey});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now using resourcesKey (eg: tickets or users) we can get the data in the response from the right place.

@ecoologic ecoologic changed the title CBP or OBP for all resources CBP iterator for Users Oct 18, 2023
*/
private $position = 0;

// TODO: page is actually growing every call, should be only one page (reset position)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently up for debate. I'll update if we decide, in my next PR.

@ecoologic ecoologic requested a review from a team October 18, 2023 23:50
@ecoologic ecoologic marked this pull request as ready for review October 18, 2023 23:51
@ecoologic ecoologic merged commit 238b314 into master Oct 31, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant