Soporte de The Movie Database

Hi all, amazing API and works great! I'm hoping to make a web app (for learning) that pulls out all the rating number of a tv show. I do one API call for the search function to search for a show (call 1), this then gives me an ID for the show. Now I basically am looking at using that ID from search to get the TV Show details to find number of seasons (call 2), then I can use the number of seasons to then do multiple API calls for each season to get every single rating of an episode (call 3 to 10).

This is fine and all, but I'm super worried that to get one show displayed on the site I could be doing up to 10 API calls each time. Is there any good way i can drop the number of calls? I mean this works fine this way, but I don't want to go overboard on API calls if I can save server use.

Thanks everyone.

1 respuesta (en la página 1 de 1)

Jump to last post

@WardenclyffeTower said:

After finding the number of seasons, you can use the append_to_response parameter to construct a third call with a response including all episodes. For example, Detectorists has an id of 61828 and 3 regular seasons and a special season. Use this to get all episode info:

https://api.themoviedb.org/3/tv/61828?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&append_to_response=season/0,season/1,season/2,season/3

Oh great, thank you for this, will help a lot!

¿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 discusión

n crear nueva discusión
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder a la discusión
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