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

Pagination Support #22

Open
jhillacre opened this issue May 27, 2021 · 0 comments
Open

Pagination Support #22

jhillacre opened this issue May 27, 2021 · 0 comments

Comments

@jhillacre
Copy link
Contributor

A merged djangochannelsrestframework pull request, NilCoalescing/djangochannelsrestframework#71, adds pagination support. It would be nice if dcrf-client got updated to provide handling of this. (Also, see NilCoalescing/djangochannelsrestframework#76)

With a StreamedPaginatedListMixin based Consumer, the response is broken up into pages, but the server does not wait for us to request pages. Therefore, to accommodate listing a StreamedPaginatedListMixin based consumer, the list operation should take a callback, similar to subscribe, where the library user can handle one page at a time. Additionally, we may need users, or djangochannelsrestframework, to have a custom paginator that returns the expected number of pages, so dcrf-client knows when to clean up the listener.

Listing a PaginatedListMixin based Consumer should work with dcrf-client as is, although it leaves going through all the pages to the library user. The listing callback could provide a function for library users to get the next page if there is one.

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

No branches or pull requests

1 participant