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

Accessing next page with the cursor value returns same page #209

Closed
vishalmelmatti opened this issue Feb 29, 2016 · 3 comments
Closed

Accessing next page with the cursor value returns same page #209

vishalmelmatti opened this issue Feb 29, 2016 · 3 comments
Labels
V2 V2 Client

Comments

@vishalmelmatti
Copy link

Hi,

I am retching users subscription using

Recurly_SubscriptionList::getForAccount($accountCode, $params);

To get paginated result I am passing per_page parameter for first page per_page=2. Though there are more pages, I can't see next links (I had raised another issue for this #208 ).

I could get the next link after calling $pager->count() or $pager->rewind() as these methods internally calls _loadLinks.

Now I am calling next url but in response I get same page, not the next one. Pagination doesn't seem to be working.

https://mydomain.recurly.com/v2/accounts/MY_ACCOUNT/subscriptions?cursor=NEXT_CURSOR&per_page=1

@drewish
Copy link

drewish commented Feb 29, 2016

Could you give some sample code to demonstrate the issue?

@drewish
Copy link

drewish commented Mar 1, 2016

The pager implements the Iterator Interface. You nee to call the rewind() method to initialize it.

@drewish
Copy link

drewish commented Mar 1, 2016

I'm going to close this issue since it overlaps with #208.

@drewish drewish closed this as completed Mar 1, 2016
@bhelx bhelx added the V2 V2 Client label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 V2 Client
Projects
None yet
Development

No branches or pull requests

3 participants