Module: Qa::Authorities::WebServiceBase
- Included in:
- Getty::AAT, Loc::GenericAuthority, Oclcts::GenericOclcAuthority
- Defined in:
- lib/qa/authorities/web_service_base.rb
Instance Attribute Summary collapse
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
Instance Method Summary collapse
-
#get_json(url) ⇒ Object
mix-in to retreive and parse JSON content from the web.
- #request_options ⇒ Object
Instance Attribute Details
#raw_response ⇒ Object
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, JSON.parse(r) end |
#request_options ⇒ Object
13 14 15 |
# File 'lib/qa/authorities/web_service_base.rb', line 13 def { accept: :json } end |