Giter Site home page Giter Site logo

Parameters with query about musicbrainz HOT 6 CLOSED

avatar29a avatar avatar29a commented on July 29, 2024
Parameters with query

from musicbrainz.

Comments (6)

wo80 avatar wo80 commented on July 29, 2024
  1. There's only the base Relation class, so specialized relations like artist-rels or url-rels are not available at the moment.
  2. The Score value will only be set for search requests.
  3. If any other properties are null, this usually means that they were not available in the server response.
  4. If you want to include additional information in a Get request, use the inc parameter, for example
Artist.GetAsync(mbid, "release-groups", "tags", "works");
  1. If you want to setup the parameters for a Search request, you can use the QueryParameters class, see QueryParametersTests.cs.

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

I see, great!

Hope to see Relation implemented.
Where can i find Tag list supported?
I found https://picard.musicbrainz.org/docs/tags/
However, it seems i need a different tag list.

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

A tag is just a string, and most Musicbrainz entities will have a list of tags associated to them. Picard is a tool for tagging audio files (i.e. MP3 tags). Two different things ...

EDIT: I've created a PR #32 to add relationships. Are there any special relationships you would be intersted in to be added?

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

For me "members" and "original members" are important as it shows the member names of groups (bands).
Other information/images links resources for the singers/band. Like Wikipedia link, BBC music link, etc..
Not sure how important is that.

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

Ok, to get members and related websites you can now do

var mbid = "ca891d65-d9b0-4258-89f7-e6ba29d83767"; // Iron Maiden

var artist = await Artist.GetAsync(mbid, "artist-rels", "url-rels");
            
Console.WriteLine("{0} members:", artist.Name);

// To filter relations, inspect "TargetType" and "Type" properties of relation.
foreach (var relation in artist.Relations.Where(r => r.TargetType == "artist" && r.Type.Contains("member")))
{
    Console.WriteLine("{0}: {1} ({2} - {3})", relation.Artist.Name, string.Join(" / ", relation.Attributes),
        relation.Begin, relation.End);
}

Console.WriteLine("{0} related websites:", artist.Name);

foreach (var relation in artist.Relations.Where(r => r.TargetType == "url"))
{
    Console.WriteLine("{0}: {1}", relation.Type, relation.Url.Resource);
}

If you'd like to play around with the code - until the PR gets merged - you can checkout my fork https://github.com/wo80/MusicBrainz.

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

I checked, it's working!
Thanks, I really appreciate it!

from musicbrainz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.