Sha256: 5ab1a1dd8b50d13a7a5dfb9323f6fdcd010e99e76cc9fea181dd5c2ee598fecd
Contents?: true
Size: 644 Bytes
Versions: 2
Compression:
Stored size: 644 Bytes
Contents
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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
musicbrainz_ruby-0.0.4 | lib/music_brainz.rb |
musicbrainz_ruby-0.0.1 | lib/musicbrainz.rb |