You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to give feedback to users of our API once they run into the ratelimit, about how long they will have to wait until the limitation is lifted. That information is available already in the result of get_usage(...)["time_left"]", but using your @ratelimited decorator it is not passed along, all we get is either request.limited or we can handle the Ratelimited exception that doesn't carry the information either.
From what I understand I could write my own decorator or view logic from your building blocks to implement this, but I thought it might be worth thinking about this being a default behavior. I have used 3rd party APIs in the past that responded in such a way ("Your request was throttled, please try again in 0h 0m 59s") and found that very helpful as a user.
It may be more complicated than it appears to me or you may have additional concerns about backwards compatibility that I am not aware of. In that case please feel free to dismiss this.
Anyways: Thank you for creating/maintaining and sharing this wonderful library!
The text was updated successfully, but these errors were encountered:
I would like to be able to give feedback to users of our API once they run into the ratelimit, about how long they will have to wait until the limitation is lifted. That information is available already in the result of
get_usage(...)["time_left"]"
, but using your@ratelimited
decorator it is not passed along, all we get is eitherrequest.limited
or we can handle theRatelimited
exception that doesn't carry the information either.From what I understand I could write my own decorator or view logic from your building blocks to implement this, but I thought it might be worth thinking about this being a default behavior. I have used 3rd party APIs in the past that responded in such a way ("Your request was throttled, please try again in 0h 0m 59s") and found that very helpful as a user.
To illustrate: #324
It may be more complicated than it appears to me or you may have additional concerns about backwards compatibility that I am not aware of. In that case please feel free to dismiss this.
Anyways: Thank you for creating/maintaining and sharing this wonderful library!
The text was updated successfully, but these errors were encountered: