1

I'm updating/re-building an simple application for Imgur using their APIs and their python library.

I'm doing my best to implement some rate limiting, to ensure that I remain withing their rate limits. To do so I'm occasionally checking what the remaining quota for the application is at any given time, and reducing options/actions if quota's go below a certain limit. To monitor my quota, I have a simple command that prints my remaining quota:

def printQuota():

    client = authAsUser()#check you\'re authorized as a user. 

    timeTillUserReset = client.credits['UserReset']#Grabs the time the user quota will reset in Unix Epoch
    timeString = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(float(timeTillUserReset)))#Formats the Unix Epoch to something readable
    print ('User Limit: ' + str(client.credits['UserLimit']))#Print the Total credits that can be allocated.
    print ('User Remaining: ' + str(client.credits['UserRemaining']))#Print Total credits available.
    print ('User Reset: ' + str(timeString)) #Timestamp for when the credits will be reset.
    print ('User Client Limit: ' + str(client.credits['ClientLimit'])) #Total credits that can be allocated for the application in a day.
    print ('User Client Remaining: ' + str(client.credits['ClientRemaining'])) #Total credits remaining for the application in a day.

Despite the fact that I make multiple calls with the application, my quota never seems to go down. Very very occasionally, the user quota will dip by a few points, but tends to spring back up again within 30 seconds.

Why does my remaining quota never change? I would expect it to go steadily down over the course of multiple calls, but it almost always returns the following values:

enter image description here

Even if I call it after directly making an API call.

HDCerberus
  • 2,113
  • 4
  • 20
  • 36
  • This seems like a support question for imgur – Blue Aug 11 '16 at 23:23
  • Maybe, I was wondering if I just misunderstood their quota/was calling the quota incorrectly. – HDCerberus Aug 11 '16 at 23:24
  • did you figure what was wrong? I have the same question http://stackoverflow.com/questions/40115380/imgurpython-helpers-error-imgurclientratelimiterror-rate-limit-exceeded – Mona Jalal Oct 18 '16 at 18:35
  • No I never got around to asking Imgur support. With your additional question I'll send them an email today and see what the story is. – HDCerberus Oct 18 '16 at 18:37

0 Answers0