Soporte de The Movie Database

Hi, First I would like to thank you for always having a prompt response.

Anyway, Im pulling an api call every time they type a new letter, but i only get to 4 letters before it blows up.

I guess my Question is, each time it pulls an api call is it only once? or is it dependent on how much info im pulling from it?

Reason I ask is Because I grab, poster, title, year and overview no problem, but when I add in my snippet to scrape the ID as well, It tends to Blow up.

Apologies if this question wasn't to clear, Thanks.

1 respuesta (en la página 1 de 1)

Jump to last post

Hi @Deekan142

First I would like to thank you for always having a prompt response

You're welcome 😉

I guess my Question is, each time it pulls an api call is it only once? or is it dependent on how much info im pulling from it?

A request is a request, there's no more to it than that. It's only a single call. If you make extra calls to other methods than those are extra calls.

I'm inclined to say you're running into our rate limiting. If you did a search and then try to load the details from the ID method for all 20 items, that means each search is 1+20, so 21 calls. A second letter would be 42 calls. And now you're probably tripping the rate limits.

Instead of blindly calling the id method for each item, it would be better to lazy load them based on what's showing in view. The other thing to keep an eye on is how often you're sending the keystroke to search. Most autocomplete type plugins have an option for how often they send the query back to the server and you could play with that to be more in the 500ms-1000ms range.

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión