Hi,
Had a couple of questions for my usecase. Firstly wanted to say love the support and the API, really appreciative to the amazing developers and community contributors!!!
Context:
Building a website with rows of content from discover endpoint and each row has poster.
Calling discover endpoint for each row.
I need to call details endpoint for each poster in the row for following parameters:
english_backdrop: Since the posters are horizontal with no embedded title, I need the English backdrop for each poster. I append to response the image endpoint
Runtime: On hover for movies I show runtime
Seasons: On hover for shows I show seasons
Genre / Date are also shown on hover but I can get from initial discover response.
Issues / Questions: I have roughly 25 rows with 20 posters each - so total of 25 discover + (25 * 20 details) = 525 requests per page per user. This is obviously higher than the limit of 50 requests per second.
Can I rely on the rate issue 525 error to wait? So for each of my posters I call details endpoint and if I get a 425 wait 1 seconds, keep doing this until I get response or error.
Secondly, seems like the API rate limits are per IP address. But my requests are sent via cloud functions to prevent users from seeing my API key. Wouldn't that mean that there's only 1 IP address, my server IP?
Suggestions / Feature Requests:
Thank you!
找不到电影或节目?登录并创建它吧。
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 07 日 7:58上午
A reminder.
In a standard Discover response, you already receive the film's Poster and Backdrop, in the specified language.
Maybe it will help to reduce the number of Requests.
I leave your other questions to someone with more knowledge to answer.
Respearme 的回复
于 2023 年 12 月 07 日 8:13上午
Yes that makes sense but most of the time its no language - I think it just gets the most popular. I have to make sure that its English because I am not showing the content title in my poster.
So what I'm doing now is appending images to details endpoint and filtering all backdrops to only ones with english
but this requires details endpoint
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 07 日 8:15上午
It may be best to specify in detail what data you need that is not in the initial Discover API Request.
If possible, separate the list for film and series.
Untitled Poster
Untitled Backdrop (usually they are already untitled)
Duration
ETC...
Respearme 的回复
于 2023 年 12 月 07 日 8:21上午
Here is the data I need for initial Discover endpoint:
Both Movies and Shows: Backdrop - English if available, if not then untitled (Right now Discover doesn't give this so I need to call details endpoint)
Movies: Runtime
Shows: Seasons count
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 07 日 8:33上午
Movies
I'm not entirely sure, but I believe that in the case of Backdrop, the response prefers the one with a title in the specified language and, if it doesn't exist, it sends the one without a title.
TV Show
I do not remember. But probably the same rule.
I would need to take a test. Or you do it yourself.
Need Details.
Need Details.
Respearme 的回复
于 2023 年 12 月 07 日 8:50上午
Yes I've tested everything and need details for it all. That's why I asked the 2 questions above about workarounds / solutions.
Also would love some sort of batch send / append to response solution to greatly reduce payload + number of requests.