website icon indicating copy to clipboard operation
website copied to clipboard

feat: Add new method to get paginated shows with offset and limit

Open polilluminato opened this issue 2 years ago • 1 comments

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.

polilluminato avatar Oct 30 '21 13:10 polilluminato

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

vercel[bot] avatar Oct 30 '21 13:10 vercel[bot]