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

New pagination headers as of 2019-07 #39

Closed
robcurry opened this issue Sep 8, 2019 · 5 comments
Closed

New pagination headers as of 2019-07 #39

robcurry opened this issue Sep 8, 2019 · 5 comments
Assignees

Comments

@robcurry
Copy link

robcurry commented Sep 8, 2019

Would it be possible to support the new cursor based pagination recently added to the REST API version 2019-07?

As details here:
https://help.shopify.com/en/api/guides/paginated-rest-results

@gnikyt
Copy link
Owner

gnikyt commented Sep 8, 2019

Not sure there's anything I need to do? This library allows you to make the calls and grab the headers.

@mandeepsandhu91
Copy link

mandeepsandhu91 commented Sep 10, 2019

How can I grab the headers from a call?

@gnikyt
Copy link
Owner

gnikyt commented Sep 10, 2019

The library returns a full Guzzle response, so you could do this:

$call = $api->rest('GET', '/admin/shop.json');

$result = $call->body->shop; // Now has shop info
$header = $call->response->getHeader('link');

@gnikyt gnikyt self-assigned this Sep 24, 2019
@gnikyt
Copy link
Owner

gnikyt commented Sep 24, 2019

Actually... I may implement this internally to return "->link" value.

gnikyt added a commit that referenced this issue Oct 15, 2019
@gnikyt
Copy link
Owner

gnikyt commented Oct 15, 2019

6.1.0 has this now.

@gnikyt gnikyt closed this as completed Oct 15, 2019
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