Method: BioPortal::RestAPI#get_concept
- Defined in:
- lib/bioportal.rb
#get_concept(ontology_acronym, class_id, options = {}) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/bioportal.rb', line 103 def get_concept ontology_acronym,class_id,={} url = "/ontologies/#{ontology_acronym}/classes/#{URI.escape(class_id,":/")}?" .keys.each{|key| url += "#{key.to_s}=#{URI.encode(options[key].to_s)}&"} url=bioportal_base_rest_url+url json = fetch_json(url) concept={} concept[:label]=json["prefLabel"] concept[:synonyms]=json["synonym"] concept[:definitions]=json["definition"] concept end |