michiwend / gomusicbrainz Goto Github PK
View Code? Open in Web Editor NEWa Go (Golang) MusicBrainz WS2 client library - work in progress
License: MIT License
a Go (Golang) MusicBrainz WS2 client library - work in progress
License: MIT License
Hey!
I've been working on this for a few days and can't really figure it out.
In general, my goal is to give gomusicbrainz a MBID and get returned the URL relationships (Wikipedia, official website, Spotify, etc..).
For instance, this is my best try:
// Grab Musicbrainz artist
musicbrainzArtist, err := musicbrainzClient.LookupArtist(
gomusicbrainz.MBID(artist.MusicbrainzID), "url-rels",
)
if err != nil {
log.Warn(err)
continue
}
// List all url
for _, url := range musicbrainzArtist.Relations["url"] {
fmt.Println(gomusicbrainz.URLRelation(url).Target) // error, don't know what to do here
}
My question is: How do I convert a gomusicbrainz.Relation
to gomusicbrainz.URLRelation
?
On the musicbrainz web site, searching for the artist Slave Raider
( https://musicbrainz.org/search?query=slave+raider&type=artist&method=indexed ), I see the Artist ID is 49950dec-e4c4-4177-808d-bab8ab028665.
In search_artist.go, I changed the artist.
Name: Slave Raider Score: 100
All the 100 does is tell me how good of a match 49950dec-e4c4-4177-808d-bab8ab028665
ID is, but it doesn't provide the ID! I fail to even grasp what this purpose of this example is. How do I get the artistID?
It returns
expected element type <metadata> but have <error>
when performing a lookup like this
artist, err := client.LookupArtist("9a709693-b4f8-4da9-8cc1-038c911a61be", "discids")
Hi there,
I see there's no much activity since 2015, but I'm curious if the project is still alive.
If yes, then are you planning to add support for browse requests?
Or would you accept a PR?
Thanks!
Hi! I'm starting to use gomusicbrainz in my project and encountered a quite simple but annoying issue - there are 2 cases that call log.Fatalln(err)
(namely https://github.com/michiwend/gomusicbrainz/blob/master/gomusicbrainz.go#L140 and https://github.com/michiwend/gomusicbrainz/blob/master/gomusicbrainz.go#L147), and thus don't give any chance to handle these errors.
Is there any reason to consider these errors really fatal? Looks like simple return err
should be enough here.
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.