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

Add Pagination to the API #651

Open
polilluminato opened this issue Oct 29, 2021 · 1 comment
Open

Add Pagination to the API #651

polilluminato opened this issue Oct 29, 2021 · 1 comment

Comments

@polilluminato
Copy link

polilluminato commented Oct 29, 2021

Hi everyone, I think it could be a nice idea to add in the API section an endpoint to retrieve the shows list in paginated format, something like limit and offset in SQL. I propose this change because it would be very useful in case you want to implement a list with the contents that load on a scroll and an endpoint that returns the paginated results would be very useful.

Based on the current API structure, the endpoint could look like this:

https://syntax.fm/api/shows/paginated-[offset]-[limit]

or

https://syntax.fm/api/shows/paginated?offset=[offset]&limit=[limit]

I am developing a Flutter app for a side-project that shows the list of episodes and this feature could be very useful.

@wesbos
Copy link
Collaborator

wesbos commented Oct 23, 2023

Lets mirror the params from the shows page, that way we can re-use the queries:

page=2&perPage=20&order=asc&type=hasty

Let's limit perPage to 100

Another item is that modifying this API might break some apps, but it doesnt seem to have a TON of usage: https://github.com/search?q=syntax.fm%2Fapi&type=code

This API endpoint is getting too large and using a ton of bandwidth (thx vercel)

so, rather than versioning the API, I say we to 20 episodes per page and then try notify anyone who might be using it.

@wesbos wesbos added help wanted hacktoberfest and removed 🙋‍♂️ suggestion() SELECT issue from ISSUES A pre-working on it label. Stuff we've chosen labels Oct 23, 2023
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

3 participants