lib/qa/authorities/getty/tgn.rb in qa-0.11.0 vs lib/qa/authorities/getty/tgn.rb in qa-0.11.1
- old
+ new
@@ -4,14 +4,9 @@
def search(q)
parse_authority_response(json(build_query_url(q)))
end
- # get_json is not ideomatic, so we'll make an alias
- def json(*args)
- get_json(*args)
- end
-
def build_query_url(q)
query = URI.escape(sparql(untaint(q)))
# Replace ampersands, otherwise the query will fail
# Gsub hack to convert the encoded regex in the REPLACE into a form Getty understands
"http://vocab.getty.edu/sparql.json?query=#{query.gsub('&', '%26').gsub(',[%5E,]+,[%5E,]+$', '%2C[^%2C]%2B%2C[^%2C]%2B%24')}&_implicit=false&implicit=true&_equivalent=false&_form=%2Fsparql"