Class: Qa::Authorities::Lcsh
- Inherits:
-
WebServiceBase
- Object
- WebServiceBase
- Qa::Authorities::Lcsh
- Defined in:
- lib/qa/authorities/lcsh.rb
Instance Attribute Summary
Attributes inherited from WebServiceBase
Instance Method Summary collapse
- #get_full_record(id, sub_authority) ⇒ Object
-
#initialize ⇒ Lcsh
constructor
A new instance of Lcsh.
- #search(q, sub_authority = '') ⇒ Object
Methods inherited from WebServiceBase
Constructor Details
#initialize ⇒ Lcsh
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, ) end |
#search(q, sub_authority = '') ⇒ Object
10 11 12 13 14 |
# File 'lib/qa/authorities/lcsh.rb', line 10 def search(q, ='') query_url = "http://id.loc.gov/authorities/suggest/?q=" + q json_terms = get_json(query_url) self.response = build_response(json_terms) end |