Служба підтримки The Movie Database

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 відповідь (на сторінці 1 із 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!

Не вдалося знайти фільм або серіал? Увійдіть, щоб додати.

Загальні

s відкрити панель пошуку
p відкрити меню профілю
esc закрити відкрите вікно
? відкрити вікно з гарячими клавішами

На сторінках медіа

b повернутися назад
e перейти до сторінки редагування

На сторінках сезонів шоу

(стрілка вправо) перейти до наступного сезону
(стрілка вліво) перейти до попереднього сезону

На сторінках серій шоу

(стрілка вправо) перейти до наступної серії
(стрілка вліво) перейти до попередньої серії

На всіх сторінках зображень

a відкрити вікно додавання зображення

На всіх сторінках редагування

t відкрити перемикач перекладів
ctrl+ s підтвердити форму

На сторінках обговорення

n створити нове обговорення
w змінити статус стеження
p перемикач публічно/приватно
c перемикач відкрито/закрито
a відкрити активність
r відповісти на обговорення
l перейти до останньої відповіді
ctrl+ enter підтвердити повідомлення
(стрілка вправо) наступна сторінка
(стрілка вліво) попередня сторінка

Налаштування

Хочете поставити оцінку чи додати до списку?

Увійти