Try 30 days of free premium.

feature request: add sorting capability to "index" endpoint

or_dvir wrote 6 years ago: 1

it is my understanding that it is not possible to perform any kind of sorting on the index endpoint, so i would like to officially request this feature.

my use case:
in the app im working on i have a page displaying all shows existing in the database and i would like to sort it by release/premiere date (meaning new shows appear before older shows), but because of the pagination on your server it means i could only sort the current page.

this isn't good enough for my needs because for example page 31 might have newer shows than page 2.

please add sorting feature to the index endpoint


gazza911 wrote 6 years ago: 1

It would be very resource intensive if sorting was added to that endpoint, so I don't think it's likely that it will be added.

or_dvir wrote 6 years ago: 1

gazza911 wrote:
It would be very resource intensive if sorting was added to that endpoint, so I don't think it's likely that it will be added.

but they have this feature on the website where you can sort by release date or popularity and a few other things


gazza911 wrote 6 years ago: 1

or_dvir wrote:
but they have this feature on the website where you can sort by release date or popularity and a few other things

Yes, but there's various differences:

1. Not every page on the site will be cached as people won't really access every page so there's not as much work to do, conversely for the API it's quite likely that someone at some point in the day will request every single page (data dump)

2. In conjunction with point #1, the site's index is only 25 per page, whereas the API is 250

3. The API is intended for developers, who are able to implement their own sorting

The suggested route is to download every page, add it to your own database and then you're free to do whatever you like with it, including sorting.

Then in the future you start from the last page you were up to.



In addition, sorting by the premiere/release date isn't actually on the site; there's only most recently added which is not the same.

or_dvir wrote 6 years ago: 1

gazza911 wrote:
Yes, but there's various differences:

1. Not every page on the site will be cached as people won't really access every page so there's not as much work to do, conversely for the API it's quite likely that someone at some point in the day will request every single page (data dump)

2. In conjunction with point #1, the site's index is only 25 per page, whereas the API is 250

3. The API is intended for developers, who are able to implement their own sorting

The suggested route is to download every page, add it to your own database and then you're free to do whatever you like with it, including sorting.

Then in the future you start from the last page you were up to.



In addition, sorting by the premiere/release date isn't actually on the site; there's only most recently added which is not the same.

2 - personally i have no problem with reducing the amount of items per page.

3.1 - like i said, i am unable to do my own sorting because it will only work per-page.

3.2 - i do not intend to download all of the shows and save them to my own DB. for my needs, that would be a huge waste of time and resources (on the client's phone). instead i prefer to load it on a page-by-page bases according to what the user is requesting.

3.3 - ill take sorting by "recently added" (if that is easier to implement). its better than what it is right now.

Limuelhumirang wrote 5 years ago: 1

gazza911 wrote:
Yes, but there's various differences:

1. Not every page on the site will be cached as people won't really access every page so there's not as much work to do, conversely for the API it's quite likely that someone at some point in the day will request every single page (data dump)

2. In conjunction with point #1, the site's index is only 25 per page, whereas the API is 250

3. The API is intended for developers, who are able to implement their own sorting

The suggested route is to download every page, add it to your own database and then you're free to do whatever you like with it, including sorting.

Then in the future you start from the last page you were up to.



In addition, sorting by the premiere/release date isn't actually on the site; there's only most recently added which is not the same.

sir what can you suggest for accurate popular shows i use the weight but the result is different in the http://www.tvmaze.com/shows most popular filter.

Try 30 days of free premium.