Sha256: 632831a2dde9995680ae21943fdc1bdfc114e075f9c81e4fd1f11c5dcc4073f8
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.3 | lib/musicbrainz.rb |
musicbrainz_ruby-0.0.2 | lib/musicbrainz.rb |