Closed ChaseParate closed 1 year ago
Hey there !
Thanks for contributing ! This is indeed a nice addition to the library, thanks !
However, the algorithm is quite heavy. I think it will be easier if we call the first page and then the next pages while some are present. What do you think ?
Hey @ChaseParate !
Do you plan to do the changes or should I take care of it ? I'd like to make a release soon :slightly_smiling_face:
Please let me know, thanks
Sorry, I've been super busy! I've just implemented the changes you mentioned and it seems much more concise! I was wondering if the function should be named "get_all" or "get_all_resources" instead of "get_all_pages". What do you think?
Also, perhaps there is a way to return the paginated data without needing to await every page? Something like a Stream comes to mind, but I'm not too familiar with the futures
crate.
Hey there, no worries !
Thanks for the update, this is much more readable.
Regarding futures
to avoid awaiting every pages, do you wanna do it ? Please let me know :slightly_smiling_face:
I did a few prototypes with Stream
s, but I just couldn't quite get it to work. Maybe it would be worthwhile to investigate later.
Thanks for your contribution !
This is a more convenient way to get all of the resources from a given endpoint.