The Movie Database-ondersteuning

Hi,

I have a problem about using TMDB's API and I'd like to know if anyone can help me out.

I use the following function to retreive the cast of a particular movie: the problem is that some movies have a HUGE cast, 50 or 60 people, and it's pretty useless to me, and once they are grabbed from TMDB there is no way to order them with "relevance" priority but only by name. For this reason I can't just crop the list after is retrived and stored because I would select only the first of them in alphabet order.

public function getMovieCast($id) { return $this->_makeCall('movie/'.$id.'/casts'); }

Is there any way to limit the number of people to retreive from TMDB in this function when asking for the cast of a particular movie? If I could edit this function just to retrieve 10/12 actors it would be more that enough for my need.

Thanks in advance to everyone!

Best regards

2 antwoorden (op pagina 1 van 1)

Jump to last post

Hi CANALE83,

once they are grabbed from TMDB there is no way to order them with "relevance" priority but only by name

There is a order field which is what you should be using to order the cast credits responses by. This would be your relevancy.

Is there any way to limit the number of people to retreive from TMDB

No, there is not.

If I could edit this function just to retrieve 10/12 actors it would be more that enough for my need.

Best you can do is pull the whole array down and just grab the first 10 items. It doesn't really matter what else is returned, does it?

Thanks!

Very helpful tips!

Film of tv-serie niet gevonden? Meld je aan om deze toe te voegen.

Wereldwijd

s focus op zoekbalk
p open profielmenu
esc sluit een open venster
? open sneltoetsen venster

Op media pagina's

b ga terug (of ga naar bovenliggend item)
e ga naar beweken

Op tv-seizoenspagina's

(rechter pijl) ga naar volgende seizoen
(linker pijl) ga naar vorig seizoen

Op pagina's met tv-series

(rechter pijl) ga naar volgende aflevering
(linker pijl) ga naar vorige aflevering

Op alle afbeeldingspagina's

a open venster afbeelding toevoegen

Op alle bewerkte pagina's

t open vertaalmenu
ctrl+ s verstuur formulier

Op discussiepagina's

n start nieuwe discussie
w Verander kijk status
p privé of openbaar
c schakelen sluiten/openen
a open activiteit
r beantwoord discussie
l ga naar laatste antwoord
ctrl+ enter verstuur uw bericht
(rechter pijl) volgende pagina
(linker pijl) vorige pagina

Instellingen

Want to rate or add this item to a list?

Inloggen