require "musicbrainz/version" require "net/http" require "uri" require 'json' module Musicbrainz class Base def self.get_path(method, mbid, query) path="/ws/2/#{method}/#{mbid}?inc=#{query}" 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 def self.release_getInfo(mbid) query='recordings' get_path('release', {'mbid' => mbid}, query) end end end