Soporte de The Movie Database

Hey there, I want to get all seasons of the series without adding the seasons manually I meant I won't be knowing if the series have n number of seasons so, in this case How can I get all the seasons if I don't know how many seasons a series have to add in parameters. In the below url user need to pass the seasons to get in the response

https://api.themoviedb.org/3/tv/114461?api_key=API_KEY&append_to_response=season/1,season/2,season/3,season/4,season/5,season/6

This API is successfully working but What to do if someone don't know how many seasons are there so how many to pass?

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

Jump to last post

Hi @jhhomjhhom, if you call the details endpoint one time:

https://api.themoviedb.org/3/tv/114461?api_key=API_KEY

it returns the parameter "number_of_seasons". It also returns an array called "seasons" that has more information about each season.

@robbie3999, so You're saying I will have to call the empty response of tv detail to get the number_of_seasons and concatenate the received number into season\1,season\2,\season3? I think it is not that bad, but making a call only to get number_of_seasons is kinda odd, I think I will have to reconsider the implementation

¿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