Try 30 days of free premium.

Question about cast embed vs castcredits embed

srob650 wrote 8 years ago: 1

I'm wondering if there's a reason that embedding "cast" in a show returns the full cast and character info while embedding "castcredits" in a person only returns a url for the person or character? Users then have to make another api call to the url to get the actual info. Why is the full info not just included?


david wrote 8 years ago: 1

It was a somewhat arbitrary choice which endpoints contain the full info by default and which ones contain references (that can be embedded).

The rationale here is that people & characters are pretty small, so just including the full info in http://api.tvmaze.com/shows/1/cast always makes sense. The show info is pretty big though and some actors will have a large number of shows, so http://api.tvmaze.com/people/1/castcredits only has a reference, which you can choose to embed using http://api.tvmaze.com/people/1/castcredits?embed=show.

srob650 wrote 8 years ago: 1

I understand. It makes things a little tricky since there are multiple ways that shows/people/characters are represented in different endpoints, but I definitely see why you did it that way.

Try 30 days of free premium.