Class: Vindi::RateLimit
- Inherits:
-
Object
- Object
- Vindi::RateLimit
- Defined in:
- lib/vindi/rate_limit.rb
Overview
Vindi API calls has a rate limit.
Class Attribute Summary collapse
-
.rate_limit_limit ⇒ Object
Returns the value of attribute rate_limit_limit.
-
.rate_limit_remaining ⇒ Object
Returns the value of attribute rate_limit_remaining.
-
.rate_limit_reset ⇒ Object
Returns the value of attribute rate_limit_reset.
Class Method Summary collapse
Class Attribute Details
.rate_limit_limit ⇒ Object
Returns the value of attribute rate_limit_limit.
9 10 11 |
# File 'lib/vindi/rate_limit.rb', line 9 def rate_limit_limit @rate_limit_limit end |
.rate_limit_remaining ⇒ Object
Returns the value of attribute rate_limit_remaining.
9 10 11 |
# File 'lib/vindi/rate_limit.rb', line 9 def rate_limit_remaining @rate_limit_remaining end |
.rate_limit_reset ⇒ Object
Returns the value of attribute rate_limit_reset.
9 10 11 |
# File 'lib/vindi/rate_limit.rb', line 9 def rate_limit_reset @rate_limit_reset end |
Class Method Details
.update(rate = {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/vindi/rate_limit.rb', line 11 def update(rate = {}) @rate_limit_limit = rate[:limit].to_i @rate_limit_remaining = rate[:remaining].to_i @rate_limit_reset = Time.at(rate[:reset].to_i) end |