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 ?
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por LucaZeta
el 25 de noviembre de 2018 a las 02:17
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
Contestado por Travis Bell
el 25 de noviembre de 2018 a las 11:28
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.