Exception: Twitch::Errors::RateLimitError
- Inherits:
-
TooManyRequestsError
- Object
- StandardError
- Twitch::ErrorGenerator
- TooManyRequestsError
- Twitch::Errors::RateLimitError
- Defined in:
- lib/twitch/error_generator.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
-
#reset_at ⇒ Object
readonly
Returns the value of attribute reset_at.
Attributes inherited from Twitch::ErrorGenerator
#http_status_code, #twitch_error_code, #twitch_error_message
Instance Method Summary collapse
-
#initialize(response_body, http_status_code, reset_at: nil, remaining: nil, limit: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(response_body, http_status_code, reset_at: nil, remaining: nil, limit: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
102 103 104 105 106 107 |
# File 'lib/twitch/error_generator.rb', line 102 def initialize(response_body, http_status_code, reset_at: nil, remaining: nil, limit: nil) @reset_at = reset_at @remaining = remaining @limit = limit super(response_body, http_status_code) end |
Instance Attribute Details
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
100 101 102 |
# File 'lib/twitch/error_generator.rb', line 100 def limit @limit end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
100 101 102 |
# File 'lib/twitch/error_generator.rb', line 100 def remaining @remaining end |
#reset_at ⇒ Object (readonly)
Returns the value of attribute reset_at.
100 101 102 |
# File 'lib/twitch/error_generator.rb', line 100 def reset_at @reset_at end |