The Movie Database-ondersteuning

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 antwoord (op blad 1 van 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!

Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.

Globaal

s fokus op soekbalk
p open profielkieslys
esc sluit ’n oop venster
? open sneltoetsvenster

Op mediablaaie

b gaan terug (na ouer waar van toepassing)
e gaan na wysigblad

Op TV-seisoenblaaie

(regterpyl) gaan na volgende seisoen
(linkerpyl) gaan na vorige seisoen

Op TV-episodeblaaie

(regterpyl) gaan na volgende episode
(linkerpyl) gaan na vorige episode

Op alle beeldblaaie

a open beeldtoevoegvenster

Op alle wysigingsblaaie

t open vertaalkieser
ctrl+ s dien form in

Op besprekingsblaaie

n skep nuwe bespreking
w tokkel kykstatus
p tokkel openbaar/privaat
c tokkel maak oop/toe
a open aktiwiteit
r reageer op bespreking
l gaan na laaste reaksie
ctrl+ enter dien u boodskap in
(regterpyl) volgende blad
(linkerpyl) vorige blad

Instellings

Wil u hierdie item gradeer of tot ’n lys toevoeg?

Teken aan