Try 30 days of free premium.

Embedding Cast + Guests + Crew @ Season Level

mossman1120 wrote 3 years ago: 1

I want to start out by saying thank you for making an API that is actually easy to use and has the endpoints you would naturally needed to look up information about a show and episode. It is such a sane approach compared to how the TVDB is structured.

I would like to make a feature request which hopefully isn't too hard to add. I would be happy to help add it if there is a way for me to do that? Via a PR?

It seems like the main site is able to display cast and guest cast at an episode level. Is there any chance to extend the current show and episode endpoints to support the embedding feature?

http://api.tvmaze.com/shows/1/episodebynumber?season=1&number=1

http://api.tvmaze.com/shows/1/episodesbydate?date=2013-07-01

http://api.tvmaze.com/episodes/1

Something like adding embed[]=xxx where xxx can be one of the following values: cast (cast members of the show present in the episode), guests (guest stars / cast members present in the episode), and if the data exists crew (crew members present in the episode).

Thank so much for all the hard work and making such an amazing site.

mossman1120 wrote 3 years ago: 1

To expand on the above request, would it be possible to add start time to filter the update endpoint? 

http://api.tvmaze.com/updates/shows?from=xxx

Where xxx would be a unix timestamp (inclusive) and it would would only return shows that were modification >= xxx?

Is there any chance to extend this to support show episodes as well? So if a call to the first episode returns show 1 has changed, I could call the episode one in a similar fashion to see which episodes change.

http://api.tvmaze.com/updates/show/:id (1)/episodes?from=xxx

As it stands now there doesn't seem to an updated field present on the episode record which makes it a little harder to sort out if something has changed.

mossman1120 wrote 3 years ago: 1

For the show episode point is it possible to add the votes to the section that contains the average rating?


david wrote 3 years ago: 2

Thanks so much for your compliments! :-)

I'm noting your request to add episode cast/crew to the API, as well as exposing the vote count.

Adding a filter to the updates endpoint is one of those things that's unlikely to happen in the public API for performance reasons; it would mean the endpoint can no longer be cached but has to be generated dynamically for each request. I understand that it'd be a very useful change and I'd love to make it, but in order to keep our API free despite the enormous and ever-increasing amount of requests it gets, we have to be very conscious about decisions like these.

mossman1120 wrote 3 years ago: 1

@david wrote:
Thanks so much for your compliments! :-)

I'm noting your request to add episode cast/crew to the API, as well as exposing the vote count.

Adding a filter to the updates endpoint is one of those things that's unlikely to happen in the public API for performance reasons; it would mean the endpoint can no longer be cached but has to be generated dynamically for each request. I understand that it'd be a very useful change and I'd love to make it, but in order to keep our API free despite the enormous and ever-increasing amount of requests it gets, we have to be very conscious about decisions like these.

I forgot about the caching layer that sits in front of the requests. Makes total sense to have a single page Otherwise like you said it makes it require custom requests.

 

In terms of checking for updated episodes can an updated field be added to the episode entry? One would still use the show updates endpoint to figure out which shoes require checking. The fetch all show episodes endpoint would then be used and the updated field can be checked to see which episodes need updating. I assume providing an episode update endpoint wouldn’t be possible due to the episode count.

 

Out of curiosity how does one check for cast / crew updates?

 

My offer to help still stands as well.


david wrote 3 years ago: 1

@mossman1120 wrote:
In terms of checking for updated episodes can an updated field be added to the episode entry? One would still use the show updates endpoint to figure out which shoes require checking. The fetch all show episodes endpoint would then be used and the updated field can be checked to see which episodes need updating. I assume providing an episode update endpoint wouldn’t be possible due to the episode count.

The update timestamp is actually only tracked on the show level. The reason is that the API output for an episode can change even because of a change elsewhere in a show, not just because of changes to the episode itself. (For example, changing a season's network can affect the airstamp of all episodes in that season; or changing one episode's airdate can affect the ordering of a special in that season). So whenever the show has been updated, you should clear your local cache for the show and all episodes under it. 

mossman1120 wrote 3 years ago: 1

@david wrote:
The update timestamp is actually only tracked on the show level. The reason is that the API output for an episode can change even because of a change elsewhere in a show, not just because of changes to the episode itself. (For example, changing a season's network can affect the airstamp of all episodes in that season; or changing one episode's airdate can affect the ordering of a special in that season). So whenever the show has been updated, you should clear your local cache for the show and all episodes under it. 

Thanks for that clarification. I apologize if any of these are n00b questions. Just trying to sort out implementing details between how I did things with TVDB and what needs to change to use TV Maze.

Not to be pushy or anything, just curious on what the turn around time is for those previous changes? No rush, just curious or if there is a timeline page I can refer to.

mossman1120 wrote 3 years ago: 1

For the image endpoint is there a reason that main is only set to true for the poster image and not for banners and backgrounds?


gazza911 wrote 3 years ago: 1

@mossman1120 wrote:
For the image endpoint is there a reason that main is only set to true for the poster image and not for banners and backgrounds?

You can only have 1 main image on a show and you can only set a poster to be the main image that's displayed across the site.

It's not 'this is the main background / typography / etc.'


gazza911 wrote 3 years ago: 1

@mossman1120 wrote:
Not to be pushy or anything, just curious on what the turn around time is for those previous changes? No rush, just curious or if there is a timeline page I can refer to.

David can if he wants, but we don't generally give estimates or timelines.

There's a lot of work planned in various areas of the site.

mossman1120 wrote 3 years ago: 1

@gazza911 wrote:
You can only have 1 main image on a show and you can only set a poster to be the main image that's displayed across the site.

It's not 'this is the main background / typography / etc.'

Ah okay, so there isn't a preferred "banner", "background", and "typographies" image, only a "poster". Seems like it might be nice to have a "preferred" image for each category for display purposes.

I was looking at the images for the show "The Expanse" and noticed that some of the images have text in different languages. Are there any plans to include and bubble up languages on the images?

Under the image section, for the images, would it be possible to return the size or at least list what the normalized dimensions are for the "medium" images?

mossman1120 wrote 3 years ago: 1

@gazza911 wrote:
David can if he wants, but we don't generally give estimates or timelines.

There's a lot of work planned in various areas of the site.

So noted. Just trying to figure out my migration timeline.

mossman1120 wrote 3 years ago: 1

For a show like Firefly that has the aired (broken) order and the dvd (correct) order, are there any plans to return that information in the API either with a episodes by dvd order or via some flag on the existing episodes by number endpoint? I saw a post about alternative ordering list for the show but I don't see that in the api anywhere.

As I mentioned before I am happy to help out if you need it. I don't want to seem like I am just complaining / asking for things without an offer of help.


david wrote 3 years ago: 1

@mossman1120 wrote:
Thanks for that clarification. I apologize if any of these are n00b questions. Just trying to sort out implementing details between how I did things with TVDB and what needs to change to use TV Maze.

Not to be pushy or anything, just curious on what the turn around time is for those previous changes? No rush, just curious or if there is a timeline page I can refer to.

No problem at all, ask away as much as you want :)

I can't really tell you anything about a timeline though, there's pretty much an infinite amount of wishes but only little time to go around. But in general, we prioritize the features that are requested most frequently.


david wrote 3 years ago: 1

@mossman1120 wrote:
Ah okay, so there isn't a preferred "banner", "background", and "typographies" image, only a "poster". Seems like it might be nice to have a "preferred" image for each category for display purposes.

I was looking at the images for the show "The Expanse" and noticed that some of the images have text in different languages. Are there any plans to include and bubble up languages on the images?

Under the image section, for the images, would it be possible to return the size or at least list what the normalized dimensions are for the "medium" images?

FWIW, the intention was to eventually support this based on the amounts of upvotes/downvotes that the images get, but I haven't seen enough votes on images to make that representative. Might be a bit of a chicken-egg situation though..

The dimensions of the medium image thumbnail are always exactly the same.


david wrote 3 years ago: 1

@mossman1120 wrote:
For a show like Firefly that has the aired (broken) order and the dvd (correct) order, are there any plans to return that information in the API either with a episodes by dvd order or via some flag on the existing episodes by number endpoint? I saw a post about alternative ordering list for the show but I don't see that in the api anywhere.

As I mentioned before I am happy to help out if you need it. I don't want to seem like I am just complaining / asking for things without an offer of help.

Please check out https://www.tvmaze.com/threads/4542/alpha-api-for-alternate-airdates and share your thoughts :) This is already implemented as alpha, but it's pending sufficient feedback.

(Thanks for the offer to help, I think the best thing you can do to help is exactly this: engage in the community, encourage other people to do the same, test new features, give feedback on existing ones)

Try 30 days of free premium.