Class: Mei::GeoNamesResource

Inherits:
Object
  • Object
show all
Defined in:
app/models/mei/geo_names_resource.rb

Class Method Summary collapse

Class Method Details

.find(subject, type, solr_field) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'app/models/mei/geo_names_resource.rb', line 3

def self.find(subject, type, solr_field)
  authority_check = Mei::Geonames.new(type)
  authority_result = authority_check.search(subject) #URI escaping doesn't work for Baseball fields?
  if authority_result.present?
    return authority_result
  else
    return []
  end
end