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

Response metadata and pagination #12

Open
ngrewe opened this issue Jul 1, 2016 · 4 comments
Open

Response metadata and pagination #12

ngrewe opened this issue Jul 1, 2016 · 4 comments

Comments

@ngrewe
Copy link
Contributor

ngrewe commented Jul 1, 2016

Hi guys,

I've seen that the ‘meta’ attribute of the API response has been added in c41315c, and I'm now wondering how to deal with pagination of results from the API. I actually haven't tried it yet, but it seems a bit odd that the metadata will be attached to the manager object when you call any of the list_* methods. I'd rather expect the metadata to be pertinent to the list of objects returned, preferably with some mechanism to simply fetch the next batch of entities when you've reached the end of the list. Do you already have plans on how to handle this?

Thanks,

Niels

@jacobsmith928
Copy link

@jasmingacic can you review this and see about any action?

@jasmingacic
Copy link
Contributor

@jacobsmith928 there has been a discussion about this here and it seems that the plan was to implement this on the API side.

@jasmingacic
Copy link
Contributor

jasmingacic commented Aug 26, 2019

Since current implementation of all list_* functions returns a simple collection of objects in question adding metadata object in any way would introduce breaking changes.
The best solution to keep the implementation unchanged is to use manager's property meta as shown here

@displague
Copy link
Member

I'm fond of the approach taken in another provider's API client. I haven't looked deeply enough to determine if that is viable here without breaking existing packet-python consumers.

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

4 participants