-
Notifications
You must be signed in to change notification settings - Fork 259
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
Conversation
$params['page[after]'] = $this->afterCursor; | ||
} | ||
$response = $this->resourcesRoot->findAll($params); | ||
$this->page = array_merge($this->page, $response->{$this->resourcesKey}); |
There was a problem hiding this comment.
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.
1522f9f
to
c5016b9
Compare
*/ | ||
private $position = 0; | ||
|
||
// TODO: page is actually growing every call, should be only one page (reset position) |
There was a problem hiding this comment.
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.
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.