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
There are strict rate limits for several actions. For example, meeting write operations are limited to 100 requests per day per user. The Zoom API contains response headers which let the caller know how many requests remain. This information is helpful and should be available via the Zoom gem.
Example Session
Observe what happens when a meeting update rate limit is exceeded:
Currently, responses from this gem are instances of Hash containing the parsed JSON of the HTTP response body from Zoom or integers of the HTTP response code if the body is empty. If configured to do so, a new Zoom::Response object could be returned instead. This will contain three rate limit informational methods: ratelimit_category, ratelimit_limit, and ratelimit_remaining. These will return values corresponding to the response headers. Here is an example usage:
Zoom.configuredo |c|
c.api_key='my_key'c.api_secret='my_secret'c.object_responses=true# new optionendmeeting_id=88888888888client=Zoom.newresponse=client.meeting_update(meeting_id: meeting_id,topic: 'my update')response.code# 204response.body# nil or the empty string (open to suggestion here)response.ratelimit_category# 'Light'response.ratelimit_limit# 100response.ratelimit_remaining# 99response2=client.meeting_get(meeting_id: meeting_id)response2.code# 200response2.body# {"uuid"=>"dfasdfasdfasfdsdf=", "id"=>88888888888, "host_id"=>""232easdfh203, ... }response2.ratelimit_category# 'Light'response2.ratelimit_limit# 999999999response2.ratelimit_remaining# 999999998
This does require an optional new response class while maintaining backward compatibility for more simplistic clients who just want the body or response code. The new response class also opens up new possibilities for features such as enhanced error information like including the HTTP response code (see #388).
I am very interested in feedback on this proposal. Additionally, I am interested submitting a pull request to add such functionality.
The text was updated successfully, but these errors were encountered:
Additional Response Details Proposal
This is not a bug but an RFC.
Problem
There are strict rate limits for several actions. For example, meeting write operations are limited to 100 requests per day per user. The Zoom API contains response headers which let the caller know how many requests remain. This information is helpful and should be available via the Zoom gem.
Example Session
Observe what happens when a meeting update rate limit is exceeded:
And so on until the final two iterations. Observe the
x-ratelimit-remaining
response header count down:Proposal
Currently, responses from this gem are instances of Hash containing the parsed JSON of the HTTP response body from Zoom or integers of the HTTP response code if the body is empty. If configured to do so, a new
Zoom::Response
object could be returned instead. This will contain three rate limit informational methods:ratelimit_category
,ratelimit_limit
, andratelimit_remaining
. These will return values corresponding to the response headers. Here is an example usage:This does require an optional new response class while maintaining backward compatibility for more simplistic clients who just want the body or response code. The new response class also opens up new possibilities for features such as enhanced error information like including the HTTP response code (see #388).
I am very interested in feedback on this proposal. Additionally, I am interested submitting a pull request to add such functionality.
The text was updated successfully, but these errors were encountered: