Try 30 days of free premium.

api seasons


momijigari wrote 6 years ago: 1

The season 2 page exists because the show is renewed, and it says that the show will return in 2018 with 10 episodes.

But as no airdates or episodetitles are released yet, there are no episodes added to the page.

or_dvir wrote 6 years ago: 1

thanks for you reply.

since the seasons endpoint does not include episodes information, and (as far as i know) there is no way to query for a list of episodes for a specific season, i have to query for these endpoints separately and then combine the results - which, as i mentioned, creates an indexOutOfBoundsException because the 2 lists are not the same size...

what do you think about making sure these 2 endpoints are synced, and have null values until more information is available? for example, the season endpoints says 10 episodes were ordered. so the episodes endpoint should have 10 entries with null values


gazza911 wrote 6 years ago: 1

I can't see this happening as it's a fundamental change to an endpoint that's widely used.

When you say that you get indexOutOfBoundsException it seems like you're getting the count from episode order, rather than simply doing a for loop based on the length of the array.

or_dvir wrote 6 years ago: 1

david wrote:
You could just match the season.number property on episode.season. But you can now also use: http://api.tvmaze.com/seasons/1?embed=episodes

omg thank you David! this is a wonderful addition!!!

please add an explanation for this: http://api.tvmaze.com/seasons/1?embed=episodes
i assume that "1" represents the show id but when i use this query for Timeless with id 8873 the results i get are of a different show

EDIT:
never mind the number is the season id... please add this to the docs at http://www.tvmaze.com/api


gazza911 wrote 6 years ago: 1

Just as an FYI, I don't think that endpoint returns specials (could be wrong, can't check right now)

or_dvir wrote 6 years ago: 1

gazza911 wrote:
Oops look like i was wrong lol.

Regarding your other question, the number in the season endpoint is the Season ID.

You can find the season ID through this:

http://api.tvmaze.com/shows/1/seasons

yes i realize that now... but it's missing explenation/documentation in http://www.tvmaze.com/api


david wrote 6 years ago: 1

or_dvir wrote:
omg thank you David! this is a wonderful addition!!!

please add an explanation for this: http://api.tvmaze.com/seasons/1?embed=episodes
i assume that "1" represents the show id but when i use this query for Timeless with id 8873 the results i get are of a different show

EDIT:
never mind the number is the season id... please add this to the docs at http://www.tvmaze.com/api

You're welcome!

The ID is always of the type listed in the URL. In "episodes/1", 1 is an episode id; in "shows/1" a show id; in "seasons/1" a season id; etc. Improving the API documentation is on our list though, we'll clear that up one day :)

Try 30 days of free premium.