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.
Nevari atrast filmu vai TV pārraidi? Jāpiesakās, lai to izveidotu.
Vēlies novērtēt šo vienumu vai pievienot to sarakstam?
Neesi dalībnieks?
Atbilde no Travis Bell
on decembris 21, 2016 at 3:31 PM
Hi @Deekan142
You're welcome 😉
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.