Exception: Twitch::Errors::RateLimitError

Inherits:
TooManyRequestsError show all
Defined in:
lib/twitch/error_generator.rb

Instance Attribute Summary collapse

Attributes inherited from Twitch::ErrorGenerator

#http_status_code, #twitch_error_code, #twitch_error_message

Instance Method Summary collapse

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

#limitObject (readonly)

Returns the value of attribute limit.



100
101
102
# File 'lib/twitch/error_generator.rb', line 100

def limit
  @limit
end

#remainingObject (readonly)

Returns the value of attribute remaining.



100
101
102
# File 'lib/twitch/error_generator.rb', line 100

def remaining
  @remaining
end

#reset_atObject (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