You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
Currently it is not possible to get the total number of beers/pages from the api.Thus it is also not possible to display the index of the last page to the user. Displaying the page index is a very common thing to do when displaying a paginated list to a user.
Of course you could fetch all the beers in advance to find out the total amount. But that would lead to over-fetching data and is not an option at all (the rate limit is 1req/sec). And even then there is a possibility that a beer could be added/deleted without the client taking notice of that.
Is it possible to add some metadata to the api response that includes the total number of beers?
Currently it is not possible to get the total number of beers/pages from the api.Thus it is also not possible to display the index of the last page to the user. Displaying the page index is a very common thing to do when displaying a paginated list to a user.
Of course you could fetch all the beers in advance to find out the total amount. But that would lead to over-fetching data and is not an option at all (the rate limit is 1req/sec). And even then there is a possibility that a beer could be added/deleted without the client taking notice of that.
Is it possible to add some metadata to the api response that includes the total number of beers?
Something like this:
The text was updated successfully, but these errors were encountered: