Soporte de The Movie Database

Hello,

I want to generate a list of a person's movies with the corresponding genre per film with the least number of requests to the tmdb api as possible.

From what I know at the moment, I have to call the following:

  1. https://api.themoviedb.org/3/search/person in order to get the person's id
  2. https://api.themoviedb.org/3/person/%s/movie_credits in order to get that person's movies
  3. https://api.themoviedb.org/3/movie in order to get the genre of a movie (this has to be called n times where n is the count of the person's movies :(

Is there any way to reduce the number of requests to the API?

Thanks in advance!

Bye The_Unknown

5 respuestas (en la página 1 de 1)

Jump to last post

I have 2 open tickets for this (ticket #316, and #418, which is to replicate the standard movie and tv list objects wherever a movie or TV show is part of the data.

I'm not sure when I'll get to this but it is planned.

Re: reducing the number of requests, are you using append_to_response?

Thanks for the hint to append_to_response. I used it for including videos directly in /movie/. But unfortunately it doesn't colve my problem mentioned above. I tried:

https://api.themoviedb.org/3/person/525/movie_credits?api_key=<12345>&language=de&append_to_response=movies

and

https://api.themoviedb.org/3/person/525/movie_credits?api_key=<12345>&language=de&append_to_response=movie

with no success :(

It would be awesome if the info of a movie (retrieved through /movie/) is included directly in movie_credits.

That's not quite how you use it wink You can't use it on sub requests, only the primary get info calls. Ie:

https://api.themoviedb.org/3/person/525?api_key=###&language=de&append_to_response=movie_credits

As an example. You're now getting the person details with the credits in a single call. You also chain multiple calls together i.e.:

https://api.themoviedb.org/3/person/525?api_key=###&language=de&append_to_response=movie_credits,external_ids

You can't make movie requests on the person method. The idea of append_to_response is to be able to make sub requests within the same namespace.

Ah, I see.

So is there's currently no chance to achieve what I'm trying :(?

Unfortunately, no.

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión