Suporte do 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 respostas (na página 1 de 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!

Não consegue encontrar um certo filme ou série? Inicie sessão e adicione-o.

Geral

s focus the search bar
p abrir menu do perfil
esc close an open window
? open keyboard shortcut window

Em páginas de Média

b go back (or to parent when applicable)
e ir para a página de edição

Em páginas de temporadas de séries

(seta para a direita) ir para a próxima temporada
(seta para a esquerda) ir para a temporada anterior

Em Páginas de Episódios de Séries

(seta para a direita) ir para o próximo episódio
(seta para a esquerda) ir para o episódio anterior

Em Todas as Páginas de Imagens

a abrir janela para adicionar imagem

Em Todas as Páginas de Edição

t open translation selector
ctrl+ s submit form

Em Páginas de Discussão

n criar uma nova discussão
w toggle watching status
p toggle public/private
c toggle close/open
a abrir actividade
r reply to discussion
l ir para a última resposta
ctrl+ enter submit your message
(seta para a direita) página seguinte
(seta para a esquerda) página anterior

Definições

Deseja classificar ou adicionar este item a uma lista?

Iniciar Sessão

Ainda não é um membro?

Crie uma Conta e Adere a Comunidade