Class: Qa::Authorities::Lcsh

Inherits:
WebServiceBase show all
Defined in:
lib/qa/authorities/lcsh.rb

Instance Attribute Summary

Attributes inherited from WebServiceBase

#raw_response, #response

Instance Method Summary collapse

Methods inherited from WebServiceBase

#get_json, #results

Constructor Details

#initializeLcsh

Returns a new instance of Lcsh.



6
7
8
# File 'lib/qa/authorities/lcsh.rb', line 6

def initialize
  super
end

Instance Method Details

#get_full_record(id, sub_authority) ⇒ Object



16
17
# File 'lib/qa/authorities/lcsh.rb', line 16

def get_full_record(id, sub_authority)
end

#search(q, sub_authority = '') ⇒ Object



10
11
12
13
14
# File 'lib/qa/authorities/lcsh.rb', line 10

def search(q, sub_authority='')
  query_url = "http://id.loc.gov/authorities/suggest/?q=" + q
  json_terms = get_json(query_url)
  self.response = build_response(json_terms)
end