Exception: Evrythng::Error::EnhanceYourCalm

Inherits:
ClientError show all
Defined in:
lib/evrythng/error/enhance_your_calm.rb

Overview

Raised when Evrythng returns the HTTP status code 420

Instance Attribute Summary

Attributes inherited from Evrythng::Error

#http_headers

Instance Method Summary collapse

Methods inherited from Evrythng::Error

#initialize, #ratelimit_limit, #ratelimit_remaining, #ratelimit_reset

Constructor Details

This class inherits a constructor from Evrythng::Error

Instance Method Details

#retry_afterObject

The number of seconds your application should wait before requesting date from the Search API again



7
8
9
# File 'lib/evrythng/error/enhance_your_calm.rb', line 7

def retry_after
  @http_headers.values_at('retry-after', 'Retry-After').detect{|value| value }.to_i
end