inkstak / musicbrainz Goto Github PK
View Code? Open in Web Editor NEWSimple client for the MusicBrainz web service
License: MIT License
Simple client for the MusicBrainz web service
License: MIT License
Hi, the musicbrainz API as a 'fmt' arg that you can set to 'json'.
Is there something similar with your gem ?
Thanks !
This error crops up from time to time when querying recordings.
The full error is:
MusicBrainz error: Cannot coerce property "video" from TrueClass to #<Proc:0x0xxxxxxxxxxxxxxx@gempath/musicbrainz-e83fd26e2b25/lib/musicbrainz/models/recording.rb:11 (lambda)>: undefined method `to_i' for true:TrueClass
From my experience, this value comes in as either nil or True. When it's True, we get this error.
When calling release_groups
:
client = MusicBrainz::Client.new
albums = client.release_groups(artist: "2921ca1d-206e-411a-8d2e-e12494dcfa9a", includes: "genres")
ArgumentError: wrong number of arguments (given 3, expected 2)
/Users/gabe/.rvm/gems/ruby-3.0.2/bundler/gems/musicbrainz-8676f0dab605/lib/musicbrainz/client.rb:66:in `lookup'
/Users/gabe/.rvm/gems/ruby-3.0.2/bundler/gems/musicbrainz-8676f0dab605/lib/musicbrainz/client.rb:35:in `block (2 levels) in <class:Client>'
It works if I monkey patch it be explicitly defined:
module MusicBrainz
class Client
def release_group(uid, **options)
lookup("release-group", uid, **options) do |json|
MusicBrainz::ReleaseGroup.new json
end
end
end
end
Is this because of change in ruby 3 related to positional and keyword arguments? https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
Hey,
Just came across your fork of this and I'm super excited the most recent commit was a few days ago! I'm hoping to use this to prototype a project, glad you're doing this in Json vs Xml. Is this ready to clone and hack with? Happy to contribute too
Hi!
First, thanks you for making this ! All other Musicbrainz gems seems outdated since a long time ago. Yours is more than welcome !
I'm a Ruby newbie so sorry for this question :
Where should I define the configuration ?
MusicBrainz.configure do |c|
c.app_name = 'MyApp'
c.app_version = '0.0.1.alpha'
c.contact = '[email protected]'
end
client = MusicBrainz::Client.new
I would like it to be shared by several files within my app, should I put this somewhere in /config ?
Thanks !
I'm wondering how to get track credits (musicians who played on a release) with includes %w()
Hi, I get this notice when trying to update to Ruby 3
ruby_dep-1.5.0 requires ruby version >= 2.2.5, ~> 2.2, which is incompatible
with the current version, ruby 3.0.2p107
Not supported ?
Thanks for your good work !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.