module MusicBrainz class Base def self.get(method, mbid, query) includes="?inc=#{query}" unless query==[] path="/ws/2/#{method}/#{mbid}#{includes}" uri_host="musicbrainz.org" uri_port="80" http = Net::HTTP.new(uri_host, uri_port).get(path) response = http.response.code body = http.response.body body=Hash.from_xml(body) if response=="200" return body else return false end end end end