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
In Adhesive, I'd like to check if I've been rate limited before proceeding with the conversion process. I propose to separate the pack registration code:
"Service rate limit exceeded, please try again later.")
pack_attrs=register_req.json()
Into a separate public function that returns pack_attrs and pack_key. The caller doesn't care about this data, and treats it as an opaque "token" object to be passed back to the upload code. For backwards compatibility and to maintain a simple API, upload_pack should remain as is with the same interface, wrapping the new function.
The text was updated successfully, but these errors were encountered:
So if I understand correctly, this is the kind of API you'd like?
pack=Pack()
client=StickersClient("foo", "bar")
# So instead of client.upload_pack(pack)
# You would do something liketry:
registration=client.register(pack)
client.upload_pack_from_registration(pack, registration)
exceptRateLimitException:
...
In addition to, yea. client.upload_pack(pack) would be equivalent to client.upload_pack_from_registration(pack, client.register(pack)). What do you think?
In Adhesive, I'd like to check if I've been rate limited before proceeding with the conversion process. I propose to separate the pack registration code:
signalstickers-client/signalstickers_client/classes/uploader.py
Lines 24 to 39 in 2d74c45
Into a separate public function that returns pack_attrs and pack_key. The caller doesn't care about this data, and treats it as an opaque "token" object to be passed back to the upload code. For backwards compatibility and to maintain a simple API, upload_pack should remain as is with the same interface, wrapping the new function.
The text was updated successfully, but these errors were encountered: