Supporto The Movie Database

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 risposte (nella pagina 1 di 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!

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi