The Movie Database Support

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 svar (på sida 1 av 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.

Kan du inte hitta en film eller tv-serie? Logga in för att skapa den.

Globala

s fokus på sökrutan
p öppna profilmenyn
esc stäng ett öppet fönster
? öppna tangentbordsgenväg fönstret

På mediasidor

b gå tillbaka (eller till förälder när det är tillämpligt)
e gå till redigerings sidan

På tv-säsongssidor

(höger pil) gå till nästa säsong
(vänster pil) gå till den föregående säsongen

På tv-avsnittssidor

(höger pil) gå till nästa avsnitt
(vänster pil) gå till föregående avsnitt

På alla bildsidor

a öppna lägg till bild fönstret

På alla redigeringssidor

t öppna översättnings väljaren
ctrl+ s skicka förmulär

På diskussionssidor

n skapa ny diskussion
w växla sedd-status
p växla offentligt/privat
c växla stäng/öppna
a öppna aktivitet
r svara på diskussionen
l gå till det senaste svaret
ctrl+ enter skicka ditt meddelande
(höger pil) nästa sida
(vänster pil) föregående sida

Inställningar

Vill du betygsätta denna artikel eller lägga till den i en lista?

Logga in