Class: Qa::Authorities::WebServiceBase

Inherits:
Base
  • Object
show all
Defined in:
lib/qa/authorities/web_service_base.rb

Direct Known Subclasses

Getty, Loc, Oclcts

Instance Attribute Summary collapse

Attributes inherited from Base

#sub_authority

Instance Method Summary collapse

Methods inherited from Base

#all, #find, #full_record, #initialize, #sub_authorities

Constructor Details

This class inherits a constructor from Qa::Authorities::Base

Instance Attribute Details

#raw_responseObject

Returns the value of attribute raw_response.



5
6
7
# File 'lib/qa/authorities/web_service_base.rb', line 5

def raw_response
  @raw_response
end

Instance Method Details

#get_json(url) ⇒ Object

mix-in to retreive and parse JSON content from the web



8
9
10
11
# File 'lib/qa/authorities/web_service_base.rb', line 8

def get_json(url)
  r = RestClient.get url, {accept: :json}
  JSON.parse(r)
end