The Movie Database atbalsts

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 reply (on page 1 of 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.

Nevari atrast filmu vai TV pārraidi? Jāpiesakās, lai to izveidotu.

Vispārējs

s fokusēties uz meklēšanas joslu
p atvērt profila izvēlni
esc aizvērt atvērtu logu
? atvērt īsinājumtaustiņu logu

Informācijas nesēju lapās

b atgriezties (vai pie vecākiem, ja nepieciešams)
e doties uz labošanas lapu

TV sezonas lapās

(labā bultiņa) pāriet uz nākamo sezonu
(kreisā bultiņa) pāriet uz iepriekšējo sezonu

TV sērijas lapās

(labā bultiņa) pāriet uz nākamo sēriju
(kreisā bultiņa) pāriet uz iepriekšējo sēriju

Visās attēlu lapās

a atvērt attēla pievienošanas logu

Visās labošanas lapās

t atvērt tulkošanas atlasītāju
ctrl+ s iesniegt veidlapu

Diskusiju lapās

n radīt jaunu diskusiju
w pārslēgt skatīšanās stāvokli
p pārslēgt publisko/privāto
c pārslēgt aizvērt/atvērt
a atklāta darbība
r atbilde uz diskusiju
l doties uz pēdējo atbildi
ctrl+ enter iesniegt savu ziņojumu
(labā bultiņa) nākamajā lapā
(kreisā bultiņa) iepriekšējā lapa

Iestatījumi

Vēlies novērtēt šo vienumu vai pievienot to sarakstam?

Pieteikties