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?
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de robbie3999
le 28 août 2023 à 17h29
Hi @jhhomjhhom, if you call the details endpoint one time:
it returns the parameter "number_of_seasons". It also returns an array called "seasons" that has more information about each season.
Réponse de jhhomjhhom
le 28 août 2023 à 23h49
@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