Exception: PlanRateLimitError

Inherits:
RateLimitError show all
Defined in:
lib/monkeylearn/exceptions.rb

Instance Attribute Summary collapse

Attributes inherited from MonkeylearnResponseError

#detail, #error_code, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(raw_response) ⇒ PlanRateLimitError

Returns a new instance of PlanRateLimitError.



67
68
69
70
71
72
# File 'lib/monkeylearn/exceptions.rb', line 67

def initialize(raw_response)
  body = JSON.parse(raw_response.body)
  @seconds_to_wait =  body['seconds_to_wait'].to_i

  super raw_response
end

Instance Attribute Details

#seconds_to_waitObject

Returns the value of attribute seconds_to_wait.



65
66
67
# File 'lib/monkeylearn/exceptions.rb', line 65

def seconds_to_wait
  @seconds_to_wait
end