Documentation
¶
Overview ¶
Package musicbrainz provides a client for querying the MusicBrainz API. It supports searching for releases by various criteria and retrieving detailed release information including recordings, artists, labels, and genres.
Index ¶
- Variables
- func ArtistsCreditNames(credits []ArtistCredit) []string
- func ArtistsCreditString(credits []ArtistCredit) string
- func ArtistsEnNames(credits []ArtistCredit) []string
- func ArtistsEnString(credits []ArtistCredit) string
- func ArtistsNames(credits []ArtistCredit) []string
- func ArtistsSortNames(credits []ArtistCredit) []string
- func ArtistsSortString(credits []ArtistCredit) string
- func ArtistsString(credits []ArtistCredit) string
- func IsCompilation(rg ReleaseGroup) bool
- func ReleaseDisambiguation(release Release) string
- func ReleaseEnTitle(release Release) string
- func ReleaseGroupEnTitle(rg ReleaseGroup) string
- func ReleaseOrGroupEnTitle(release Release) string
- type Alias
- type AnyTime
- type Artist
- type ArtistCredit
- type CAAClient
- type Genre
- type Label
- type LabelInfo
- type MBClient
- type Media
- type Relation
- type Release
- type ReleaseGroup
- type ReleaseGroupPrimaryType
- type ReleaseGroupSecondaryType
- type ReleaseQuery
- type StatusError
- type Track
- type Work
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoResults = errors.New("no results")
Functions ¶
func ArtistsCreditNames ¶
func ArtistsCreditNames(credits []ArtistCredit) []string
func ArtistsCreditString ¶
func ArtistsCreditString(credits []ArtistCredit) string
func ArtistsEnNames ¶ added in v0.9.0
func ArtistsEnNames(credits []ArtistCredit) []string
func ArtistsEnString ¶ added in v0.9.0
func ArtistsEnString(credits []ArtistCredit) string
func ArtistsNames ¶
func ArtistsNames(credits []ArtistCredit) []string
func ArtistsSortNames ¶ added in v0.14.0
func ArtistsSortNames(credits []ArtistCredit) []string
func ArtistsSortString ¶ added in v0.14.0
func ArtistsSortString(credits []ArtistCredit) string
func ArtistsString ¶
func ArtistsString(credits []ArtistCredit) string
func IsCompilation ¶
func IsCompilation(rg ReleaseGroup) bool
func ReleaseDisambiguation ¶ added in v0.32.0
func ReleaseEnTitle ¶ added in v0.32.0
func ReleaseGroupEnTitle ¶ added in v0.32.0
func ReleaseGroupEnTitle(rg ReleaseGroup) string
func ReleaseOrGroupEnTitle ¶ added in v0.32.0
Types ¶
type AnyTime ¶
func (*AnyTime) UnmarshalJSON ¶
type ArtistCredit ¶
type Genre ¶
type LabelInfo ¶
func AnyLabelInfo ¶
type Relation ¶ added in v0.14.0
type Relation struct {
TargetType string `json:"target-type"`
TypeID string `json:"type-id"`
SourceCredit string `json:"source-credit"`
TargetCredit string `json:"target-credit"`
AttributeIDs struct{} `json:"attribute-ids"`
Direction string `json:"direction"`
Attributes []any `json:"attributes"`
Type string `json:"type"`
AttributeValues struct{} `json:"attribute-values"`
Begin any `json:"begin"`
End any `json:"end"`
Ended bool `json:"ended"`
Artist Artist `json:"artist"`
Work Work `json:"work"`
}
type Release ¶
type Release struct {
Title string `json:"title"`
ID string `json:"id"`
TextRepresentation struct {
Language string `json:"language"`
Script string `json:"script"`
} `json:"text-representation"`
StatusID string `json:"status-id"`
ASIN string `json:"asin"`
Genres []Genre `json:"genres"`
Country string `json:"country"`
Barcode string `json:"barcode"`
Disambiguation string `json:"disambiguation"`
Packaging string `json:"packaging"`
CoverArtArchive struct {
Artwork bool `json:"artwork"`
Front bool `json:"front"`
Darkened bool `json:"darkened"`
Back bool `json:"back"`
Count int `json:"count"`
} `json:"cover-art-archive"`
Artists []ArtistCredit `json:"artist-credit"`
Date AnyTime `json:"date"`
Quality string `json:"quality"`
Media []Media `json:"media"`
Status string `json:"status"`
ReleaseGroup ReleaseGroup `json:"release-group"`
ReleaseEvents []struct {
Area struct {
ID string `json:"id"`
Name string `json:"name"`
Iso31661Codes []string `json:"iso-3166-1-codes"`
TypeID any `json:"type-id"`
SortName string `json:"sort-name"`
Disambiguation string `json:"disambiguation"`
Type any `json:"type"`
} `json:"area"`
Date AnyTime `json:"date"`
} `json:"release-events"`
PackagingID string `json:"packaging-id"`
LabelInfo []LabelInfo `json:"label-info"`
Aliases []Alias `json:"aliases"`
}
type ReleaseGroup ¶
type ReleaseGroup struct {
FirstReleaseDate AnyTime `json:"first-release-date"`
Genres []Genre `json:"genres"`
PrimaryTypeID string `json:"primary-type-id"`
Disambiguation string `json:"disambiguation"`
Artists []ArtistCredit `json:"artist-credit"`
SecondaryTypeIDs []any `json:"secondary-type-ids"`
PrimaryType ReleaseGroupPrimaryType `json:"primary-type"`
ID string `json:"id"`
SecondaryTypes []ReleaseGroupSecondaryType `json:"secondary-types"`
Title string `json:"title"`
Aliases []Alias `json:"aliases"`
}
type ReleaseGroupPrimaryType ¶
type ReleaseGroupPrimaryType string
const ( Album ReleaseGroupPrimaryType = "Album" Single ReleaseGroupPrimaryType = "Single" EP ReleaseGroupPrimaryType = "EP" Broadcast ReleaseGroupPrimaryType = "Broadcast" Other ReleaseGroupPrimaryType = "Other" )
type ReleaseGroupSecondaryType ¶
type ReleaseGroupSecondaryType string
const ( AudioDrama ReleaseGroupSecondaryType = "Audio drama" Audiobook ReleaseGroupSecondaryType = "Audiobook" Compilation ReleaseGroupSecondaryType = "Compilation" Demo ReleaseGroupSecondaryType = "Demo" DJMix ReleaseGroupSecondaryType = "DJ-mix" FieldRecording ReleaseGroupSecondaryType = "Field recording" Interview ReleaseGroupSecondaryType = "Interview" Live ReleaseGroupSecondaryType = "Live" MixtapeStreet ReleaseGroupSecondaryType = "Mixtape/Street" Remix ReleaseGroupSecondaryType = "Remix" Soundtrack ReleaseGroupSecondaryType = "Soundtrack" Spokenword ReleaseGroupSecondaryType = "Spokenword" )
type ReleaseQuery ¶
type StatusError ¶
type StatusError int
func (StatusError) Error ¶
func (se StatusError) Error() string
type Track ¶
type Track struct {
ID string `json:"id"`
Length int `json:"length"`
Recording struct {
FirstReleaseDate string `json:"first-release-date"`
Genres []Genre `json:"genres"`
Video bool `json:"video"`
Disambiguation string `json:"disambiguation"`
ID string `json:"id"`
Length int `json:"length"`
Title string `json:"title"`
Artists []ArtistCredit `json:"artist-credit"`
Relations []Relation `json:"relations"`
ISRCs []string `json:"isrcs"`
} `json:"recording"`
Number string `json:"number"`
Position int `json:"position"`
Title string `json:"title"`
Artists []ArtistCredit `json:"artist-credit"`
}
type Work ¶ added in v0.15.0
type Work struct {
Type any `json:"type"`
Relations []Relation `json:"relations"`
Language string `json:"language"`
Languages []string `json:"languages"`
Disambiguation string `json:"disambiguation"`
Title string `json:"title"`
Iswcs []any `json:"iswcs"`
ID string `json:"id"`
Attributes []any `json:"attributes"`
TypeID any `json:"type-id"`
}
Click to show internal directories.
Click to hide internal directories.