First: is it needed/require/sudgested to sleep between API queries within a program loop ?
Second: is there a way to check how many queries of my daily budget I spent ?
Non riesci a trovare un film o una serie Tv? Accedi per crearlo.
Vuoi valutare o aggiungere quest'elemento a una lista?
Non sei un membro?
Risposta da LucaZeta
il 25 novembre, 2018 alle 2:17AM
Answering by myself:
First: 40 requests within 10 seconds are allowed. Since time to answer a request is averange grater than 0.5s no sleep is required. Source.
Second: hear it is
Risposta da Travis Bell
il 25 novembre, 2018 alle 11:28AM
For your first question, you got it. I also recently wrote some mock code to demonstrate an example loop that sleeps when it reaches the bucket limit. You can check it out here.
With regards to your second question, yes, the API stats page is a good insight into what's happening but there isn't really a "daily budget" so to speak. We really only enforce things 10 seconds at a time. As per the links above, you can inspect the bucket you are currently in by looking at the
X-RateLimit-Remaining
header.