Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I get the [character] each actor played in the movie?? #78

Open
mpol12 opened this issue Aug 9, 2021 · 0 comments
Open

How do I get the [character] each actor played in the movie?? #78

mpol12 opened this issue Aug 9, 2021 · 0 comments

Comments

@mpol12
Copy link

mpol12 commented Aug 9, 2021

Hi,
I successfully got all movie details along with the getCast() array which includes all movie actors along with their information. Among this information is the Character the actor plays in the movie.
How do I get this information??

For example for movie "The Suicide Squad (2021)" with tmdb_id 436969..
This is the info I get for the first actor
Array
(
[0] => Person Object
(
[_data:Person:private] => Array
(
[adult] =>
[gender] => 1
[id] => 234352
[known_for_department] => Acting
[name] => Margot Robbie
[original_name] => Margot Robbie
[popularity] => 84.384
[profile_path] => /euDPyqLnuwaWMHajcU3oZ9uZezR.jpg
[cast_id] => 33
[character] => Harleen Quinzel / Harley Quinn
[credit_id] => 5ca268419251411a16098d23
[order] => 0
)

    )

...and the array continues..

I can get almost all data via the defined functions, for example I get the name of the actor with person->getName()..
How do I get the "character"??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant