Podpora 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 odpovědí (na stránce 1 z 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!

Nemůžete nalézt film nebo seriál? Přihlaste se pro jeho vytvoření.

Globální

s zaměřit panel hledání
p otevřít nabídku profilu
esc zavřít otevřené okno
? otevřít okno klávesových zkratek

Na stránkách médií

b zpět (nebo na nadřazený záznam, pokud to jde)
e na stránku úprav

Na stránkách sezón

(šipka vpravo) na další sezónu
(šipka vlevo) na předchozí sezónu

Na stránkách epizod

(šipka vpravo) na další epizodu
(šipka vlevo) na předchozí epizodu

Na všech stránkách obrázků

a otevřít okno přidání obrázku

Na všech stránkách úprav

t otevřít výběr překladu
ctrl+ s odeslat formulář

Na stránkách diskusí

n vytvořit novou diskusi
w přepnout stav zhlédnutí
p přepnout veřejný a soukromý
c přepnout zavřít a otevřít
a otevřít aktivitu
r odpovědět na diskusi
l na poslední odpověď
ctrl+ enter odeslat zprávu
(šipka vpravo) další stránka
(šipka vlevo) předchozí stránka

Nastavení

Want to rate or add this item to a list?

Přihlásit se