You will receive a list of about 250 persons, divided into pages of 20 each. Fetch all pages and put them into one large array (but mind the request limit. Maybe cache the results.)
Then randomly select persons out of this array. The list will contain actors as well as popular directors/writers, because there is no information like "person x is an actor" in the database. It would't make sense, since it differs from movie to movie. An actor on movie A could be a director on movie B, or vice versa.
I hope this helps and I hope my info is correct, since I started using the API only a few days ago myself :)
retailer Erabiltzailearen Erantzuna
Azaroa 28, 2013 egunean 10:27 AM(e)tan
Since there are many (unknown) actors on TMDb I would suggest to fetch the list of popular people first with
/3/person/popular http://docs.themoviedb.apiary.io/#get-%2F3%2Fperson%2Fpopular
You will receive a list of about 250 persons, divided into pages of 20 each. Fetch all pages and put them into one large array (but mind the request limit. Maybe cache the results.)
Then randomly select persons out of this array. The list will contain actors as well as popular directors/writers, because there is no information like "person x is an actor" in the database. It would't make sense, since it differs from movie to movie. An actor on movie A could be a director on movie B, or vice versa.
I hope this helps and I hope my info is correct, since I started using the API only a few days ago myself :)
varundam Erabiltzailearen Erantzuna
Azaroa 28, 2013 egunean 10:37 AM(e)tan
When I put the following URL in the browser I got the NOT FOUND page:
http://api.themoviedb.org/3/person/popular/550?api_key=xxxx
I'm sure I provided the right key
Travis Bell Erabiltzailearen Erantzuna
Azaroa 28, 2013 egunean 10:51 AM(e)tan
There's no id to provide with the popular method. To query for a person, use:
retailer Erabiltzailearen Erantzuna
Azaroa 28, 2013 egunean 10:53 AM(e)tan
vanrundam, use this URL: http://api.themoviedb.org/3/person/popular?api_key=###
You can get the second page like this: http://api.themoviedb.org/3/person/popular?api_key=###&page=2
varundam Erabiltzailearen Erantzuna
Azaroa 28, 2013 egunean 10:55 AM(e)tan
It returns me this:
Stuart Boston Erabiltzailearen Erantzuna
Abendua 3, 2013 egunean 9:33 AM(e)tan
"profile_path" is where the image is normally kept. Because that is null, that means there is no image. For your app, I would skip that entry