Exception: Grackle::TwitterError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/grackle/client.rb

Overview

Raised by methods which call the API if a non-200 response status is received

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, request_uri, status, response_body, msg = nil) ⇒ TwitterError

Returns a new instance of TwitterError.



12
13
14
15
16
17
18
# File 'lib/grackle/client.rb', line 12

def initialize(method, request_uri, status, response_body, msg=nil)
  self.method = method
  self.request_uri = request_uri
  self.status = status
  self.response_body = response_body
  super(msg||"#{self.method} #{self.request_uri} => #{self.status}: #{self.response_body}")
end

Instance Attribute Details

#methodObject

Returns the value of attribute method.



10
11
12
# File 'lib/grackle/client.rb', line 10

def method
  @method
end

#request_uriObject

Returns the value of attribute request_uri.



10
11
12
# File 'lib/grackle/client.rb', line 10

def request_uri
  @request_uri
end

#response_bodyObject

Returns the value of attribute response_body.



10
11
12
# File 'lib/grackle/client.rb', line 10

def response_body
  @response_body
end

#response_objectObject

Returns the value of attribute response_object.



10
11
12
# File 'lib/grackle/client.rb', line 10

def response_object
  @response_object
end

#statusObject

Returns the value of attribute status.



10
11
12
# File 'lib/grackle/client.rb', line 10

def status
  @status
end