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 ?
Can't find a movie or TV show? Login to create it.
Elementu hau kalifikatu edo zerrenda batera gehitzea nahi al duzu?
Ez zara kidea?
LucaZeta Erabiltzailearen Erantzuna
Azaroa 25, 2018 egunean 2:17 AM(e)tan
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
Travis Bell Erabiltzailearen Erantzuna
Azaroa 25, 2018 egunean 11:28 AM(e)tan
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.