website
website copied to clipboard
feat: Add new method to get paginated shows with offset and limit
Description
As request in the issue #651 it would be nice to have the results list paginated in order to implement a lazy loading list that loads content on scroll.
Solution
I've added a new method in the API endpoint to get the shows paginated. Now if you call the API endpoint api/shows/paginated
like this:
https://syntax.fm/api/shows/paginated?offset=0&limit=20
you'll get the first 20 episodes, and so on depending on the offset and limit values. Operation is practically the same as SQL queries with the OFFSET and LIMIT keywords.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/wesbos/Syntax/FGMtDzNfxyvPZw1fJ24fFseX8nXt
✅ Preview: https://syntax-git-fork-polilluminato-feature-api-pagination-wesbos.vercel.app