Rate limiting
Closed this issue · 2 comments
THEGOLDENPRO commented
The API wrapper will need to handle Jikan's rate limiting respectfully with waiting.
As of the creation of this issue the Jikan rate limits are:
Duration | Requests |
---|---|
Daily | Unlimited |
Per Minute | 60 Requests |
Per Second | 3 Requests |
The concept
client = Anmoku()
# this will run fine
character = client.get(AnimeCharacter, id = "101")
character = client.get(AnimeCharacter, id = "2")
character = client.get(AnimeCharacter, id = "362")
# but when ran a fourth time under a second it should hit a rate limit.
character = client.get(AnimeCharacter, id = "67") # the program should wait right here until the time for the rate limit has passed.
character = client.get(AnimeCharacter, id = "0") # this will run after the rate limit wait
THEGOLDENPRO commented
added with #4 using slowstack
THEGOLDENPRO commented
Seems to work great, haven't had any issues with it since I added it in July so I'm closing this.