Try 30 days of free premium.

endpoint for new/upcoming shows?

or_dvir wrote 6 years ago: 1

Hi.
i have started developing an android app which uses TVmaze API and i would like to have a section for "upcoming shows".
when i say "upcoming shows" i dont mean existing shows that have upcoming episodes, i mean NEW shows that have not premiered yet. i have looked through the forums and found http://www.tvmaze.com/threads/811/new-upcoming-shows and http://www.tvmaze.com/threads/299/new-series-list but both are over a year old so i have decided to open a new thread. if the proper thing to have done was to comment on these threads, please accept my apology and let me know so i will do so in the future.

so, any update on this topic? will there be an API endpoint for this? if so, do you have an approximate release date?


david wrote 6 years ago: 1

This probably isn't coming to the free API any time soon, if ever. I would recommend using the "full schedule" endpoint, then manually filtering the episodes with both "season" and "number" set to 1. A little more work on your end, but the same result :)

or_dvir wrote 6 years ago: 1

I tried checking it out but the result is so big even my computer freezes when I try to copy it to a Json viewer so I can actually see what information it contains. I'm scared to imagine what it would do to a phone (I'm making an android app).

Is there a way to limit the number of results this endpoint returns? I feel like this endpoint should be paginated


david wrote 6 years ago: 1

The regular schedule endpoint is pretty much a "paginated" version :) Feel free to request a bunch of dates simultaneously and use that to create your overview.


gazza911 wrote 6 years ago: 1

Yes, you would do it by calling it on each day.

However it's going to be a lot quicker than the full one as you're only getting a month rather than all future episodes, and only from one country.


david wrote 6 years ago: 1

Oh no, I just meant you'd make seperate requests, one for each date. The first time your app launches you'd have to make a few requests (30, assuming you'd look one month ahead) but after that you'll only need one more request a day to catch up.

or_dvir wrote 6 years ago: 1

that doesn't really make sense... why would i make 30 separate requests? also that would hit the rate limit and i would get errors. it makes much more sense to enter a range of dates. but since that is not currently an option, i guess ill have to do it manually... even though it would effectively be a loop so it's not THAT much work, its still kind of annoying


david wrote 6 years ago: 1

I understand that this isn't the most optimal approach from the perspective of an API client. However, it makes a lot of sense from our side. We offer our API for free, while hosting definitely isn't free for us. We deal with hundreds of millions of API requests every week, so every tiny change can have a large impact on the resource usage and our hosting bill. The current schedule endpoint - one request for a single day - is easy to cache in various layers which reduces the load. An endpoint that accepts a range of dates would be much harder to cache thus much more costly.

That's the reason we can't offer this, nor some other frequently requested features like filters, sorting or similar endpoints where the response greatly varies based on user input. Not for free anyway, for users willing to pay for API access anything is possible. :)

or_dvir wrote 6 years ago: 1

thank you for your detailed explanation. although not exactly what i expected to hear, i completely understand.

in that case, may i please offer a compromise?
instead of adding a range of dates (which as you say can have many variations), will you consider adding an option for a specific month? for example: "http://api.tvmaze.com/schedule?country=US&date=2017-7" to retrieve the entire month of July 2017.
since the results will be limited to 1 month, its' size would also only vary so much... that way, its going to be a little easier for the clients, and should be easier for you to manage (although im not a server developer so i could wrong).

p.s.
for future posts... should new API feature request (such as this one) be posted in this forum or in Suggestions forum?


david wrote 6 years ago: 1

That could be an acceptable form if there's a lot of demand for it.

Both API bugs and suggestions are best placed here in the API forums.

Try 30 days of free premium.