Exception: Altmetric::APIException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/altmetric.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, query, response) ⇒ APIException

Returns a new instance of APIException.



10
11
12
13
14
15
# File 'lib/altmetric.rb', line 10

def initialize(url, query, response)
  super(response.content)
  @url = url
  @query = query
  @response = response
end

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



9
10
11
# File 'lib/altmetric.rb', line 9

def query
  @query
end

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/altmetric.rb', line 9

def response
  @response
end

#urlObject (readonly)

Returns the value of attribute url.



9
10
11
# File 'lib/altmetric.rb', line 9

def url
  @url
end