Exception: Peerindex::EnhanceYourCalm

Inherits:
Error
  • Object
show all
Defined in:
lib/peerindex/error.rb

Overview

Raised when Twitter returns the HTTP status code 420

Instance Attribute Summary

Attributes inherited from Error

#http_headers

Instance Method Summary collapse

Methods inherited from Error

#initialize, #ratelimit_limit, #ratelimit_remaining, #ratelimit_reset

Constructor Details

This class inherits a constructor from Peerindex::Error

Instance Method Details

#retry_afterObject

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



48
49
50
# File 'lib/peerindex/error.rb', line 48

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