leepeuker / movary

Self hosted web app to track and rate your watched movies
MIT License
394 stars 14 forks source link

Use append to response to minimize the amount of API requests #420

Closed JVT038 closed 1 year ago

JVT038 commented 1 year ago

Description

TMDB apparently has a feature called append to response which can combine multiple API requests into one.

In the case of Movary, when adding a movie, various requests are made. One request for the movie details and another one for the movie credits. These requests can be combined like this: https://api.themoviedb.org/3/movie/27205?append_to_response=credits&language=en-US, resulting in a response where the credits are automatically included. We should refactor the API calls to use this as whenever possible, so we reduce the amount of API requests and reduce the loading times.

Desired Behavior

Use append to response instead of separate API requests

Additional Context

No response

leepeuker commented 1 year ago

I found one case (movie details and credits endpoints) where we could utilize the append to response feature.