I want to get data about the actors in the series, I want to get: photos, name, his name in the series, creditID and the episodes he appears in
i am using this call: http://www.spcrystal.com/3/tv/###/aggregate_credits?api_key=###
the data is all right, but the creditID, the episodes and the name of the stars in the series are inside a Roles, but I want to put it all together in a MAP. How do I do that?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by ticao2 š§š· pt-BR
on March 16, 2023 at 1:49 PM
To get all the data for each of the characters, I think it's better to make an API Request using credit_id, for each character.
http://www.spcrystal.com/3/credits/get-credit-details
For example.
Actor Bob Newhart worked on The Big Bang Theory.
http://www.spcrystal.com/tv/1418-the-big-bang-theory
http://www.spcrystal.com/person/64930-bob-newhart
The character is Arthur Jeffries or Professor Proton.
http://www.spcrystal.com/tv/1418-the-big-bang-theory/episodes?credit_id=563dc8f09251413b1300bdae&person_id=4bc8ace0017a3c122d0506c0
credit_id = 563dc8f09251413b1300bdae
Example:
http://www.spcrystal.com/3/credit/563dc8f09251413b1300bdae?api_key=THE_KEY
In response the 6 episodes he participated.
And also the actor name, character name, image, seasons, episodes and a few more things.
Test my example and see the response data.
Reply by Magic-MRX
on March 16, 2023 at 4:09 PM
But it will only work if I already have the creditID, here I am getting the actors based on the series I chose
I'm using the call http://www.spcrystal.com/3/tv/###/aggregate_credits?api_key=###, because it returns everything great, but as an array comes inside another it is difficult to implement everything inside a MAP
Before I used this call: http://www.spcrystal.com/3/tv/{tv_id}/credits?api_key=<>&language=en-US but it doesn't return all the complete actors like the other one you know , that's why I want to change but with it returning me the creditID, name, name of the actor in the series and how many episodes he's been in...
Reply by ticao2 š§š· pt-BR
on March 16, 2023 at 7:59 PM
Try request aggregate_credits for a season.
A slightly different answer comes.
Reply by Magic-MRX
on March 17, 2023 at 3:00 PM
it's coming this way, in the same way, you're seeing that there's an array inside another array, so this way I can't get what's inside: "roles: Array(1)"
Reply by ticao2 š§š· pt-BR
on March 17, 2023 at 4:07 PM
Well, I think on our side it's the available Requests.
Perhaps seeking help from someone who has a solution for this.
I suggest changing the title of this conversation to something
that will catch the attention of other users who are familiar with these tools.
Something like:
MAP versus Role - how to capture the data.
Or something similar and more suggestive.
Reply by Magic-MRX
on March 18, 2023 at 2:48 PM
I got it, thanks.