This PR adds pagination support. Until now, the number of results on pagination endpoints (e.g. Crunchyroll::browse) must be specified manually. The Pagination struct takes over this process. With the help of future_util::stream::Stream you can iterate over a pagination result and it will fetch the data as required. You might have to add futures_util to your dependencies and use future_util::stream::Stream to gain access to some functions.
This PR adds pagination support. Until now, the number of results on pagination endpoints (e.g.
Crunchyroll::browse
) must be specified manually. ThePagination
struct takes over this process. With the help offuture_util::stream::Stream
you can iterate over a pagination result and it will fetch the data as required. You might have to addfutures_util
to your dependencies and usefuture_util::stream::Stream
to gain access to some functions.Functions which are returning
Pagination
now:Episode::comments
,Movie::comments
,Comment::replies
Crunchyroll::home_feed
,Crunchyroll::news_feed
,Crunchyroll::recommendations
Series::similar
,MovieListing::similar
Series::reviews
,MovieListing::reviews
Crunchyroll::browse
,Crunchyroll::query
This PR also updates the
format!
macro to use inlined arguments.