Documentation
¶
Index ¶
- Constants
- type Album
- type AlbumAttributes
- type AlbumData
- type AlbumExternalLink
- type AlbumExternalLinkType
- type AlbumRelationships
- type Artist
- type ArtistAttributes
- type ArtistData
- type ArtistExternalLink
- type ArtistExternalLinkType
- type ArtistRelationships
- type Artwork
- type ArtworkAttributes
- type ArtworkData
- type ArtworkFile
- type ArtworkFiles
- type ArtworkMediaType
- type ArtworkRelationships
- type Artworks
- type DateTime
- type Duration
- type IncludedObject
- type IncludedObjects
- func (i IncludedObjects) Albums(relationships ...Relationship) (responses []Album)
- func (i IncludedObjects) Artists(relationships ...Relationship) (responses []Artist)
- func (i IncludedObjects) FromRelationships(relationships []Relationship, t string) IncludedObjects
- func (i IncludedObjects) FromType(t string) IncludedObjects
- func (i IncludedObjects) Lyrics(relationships ...Relationship) (responses []Lyrics)
- func (i IncludedObjects) PlainAlbums(relationships ...Relationship) []AlbumData
- func (i IncludedObjects) PlainArtists(relationships ...Relationship) []ArtistData
- func (i IncludedObjects) PlainArtworks(relationships ...Relationship) Artworks
- func (i IncludedObjects) PlainLyrics(relationships ...Relationship) []LyricsData
- func (i IncludedObjects) PlainPlaylists(relationships ...Relationship) []PlaylistData
- func (i IncludedObjects) PlainTracks(relationships ...Relationship) []TrackData
- func (i IncludedObjects) Playlists(relationships ...Relationship) (responses []Playlist)
- func (i IncludedObjects) Tracks(relationships ...Relationship) (responses []Track)
- func (i *IncludedObjects) UnmarshalJSON(b []byte) error
- type Links
- type LinksMeta
- type Lyrics
- type LyricsAttributes
- type LyricsAttributesProvider
- type LyricsAttributesProviderSource
- type LyricsData
- type LyricsDirection
- type LyricsRelationships
- type ObjectType
- type Playlist
- type PlaylistAttributes
- type PlaylistData
- type PlaylistExternalLink
- type PlaylistExternalLinkType
- type PlaylistRelationships
- type PlaylistType
- type Relationship
- type Response
- type SearchResult
- type SearchResultAttributes
- type SearchResultData
- type SearchResultRelationships
- type Track
- type TrackAttributes
- type TrackAvailability
- type TrackData
- type TrackExternalLink
- type TrackExternalLinkType
- type TrackRelationships
- type UserAttributes
- type UserCollection
- type UserCollectionAttributes
- type UserCollectionData
- type UserCollectionRelationships
- type UserData
Constants ¶
View Source
const ObjectTypeAlbums = "albums"
View Source
const ObjectTypeArtists = "artists"
View Source
const ObjectTypeArtworks = "artworks"
View Source
const ObjectTypeLyrics = "lyrics"
View Source
const ObjectTypePlaylists = "playlists"
View Source
const ObjectTypeSearchResult = "searchResult"
View Source
const ObjectTypeTracks = "tracks"
View Source
const ObjectTypeUserCollections = "userCollections"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumAttributes ¶
type AlbumAttributes struct {
AccessType string `json:"accessType"`
Availability []string `json:"availability"`
BarcodeID string `json:"barcodeId"`
Copyright struct {
Text string `json:"text"`
}
Duration Duration `json:"duration"`
Explicit bool `json:"explicit"`
ExternalLinks []AlbumExternalLink `json:"externalLinks"`
MediaTags []string `json:"media_tags"`
NumberOfItems int `json:"numberOfItems"`
NumberOfVolumes int `json:"numberOfVolumes"`
Popularity float64 `json:"popularity"`
ReleaseDate helper.TimeDateOnly `json:"releaseDate"`
Title string `json:"title"`
Type string `json:"type"`
}
type AlbumData ¶
type AlbumData struct {
Attributes AlbumAttributes `json:"attributes"`
ID string `json:"id"`
Relationships AlbumRelationships `json:"relationships"`
Type string `json:"type"`
}
type AlbumExternalLink ¶
type AlbumExternalLink struct {
Href string `json:"href"`
Meta struct {
Type AlbumExternalLinkType `json:"type"`
} `json:"meta"`
}
type AlbumExternalLinkType ¶
type AlbumExternalLinkType string
const (
AlbumExternalLinkTypeTidalSharing AlbumExternalLinkType = "TIDAL_SHARING"
)
type AlbumRelationships ¶
type AlbumRelationships struct {
Artists Response[[]Relationship] `json:"artists"`
CoverArt Response[[]Relationship] `json:"coverArt"`
Genres Response[[]Relationship] `json:"genres"`
Items Response[[]Relationship] `json:"items"`
Owners Response[[]Relationship] `json:"owners"`
Providers Response[[]Relationship] `json:"providers"`
SimilarAlbums Response[[]Relationship] `json:"similarAlbums"`
SuggestedCoverArts Response[[]Relationship] `json:"suggestedCoverArts"`
}
type Artist ¶
type Artist Response[ArtistData]
type ArtistAttributes ¶
type ArtistAttributes struct {
ContributionsEnabled bool `json:"contributionsEnabled"`
ExternalLinks []ArtistExternalLink `json:"externalLinks"`
Name string `json:"name"`
Popularity float64 `json:"popularity"`
Spotlighted bool `json:"spotlighted"`
}
type ArtistData ¶
type ArtistData struct {
Attributes ArtistAttributes `json:"attributes"`
ID string `json:"id"`
Relationships ArtistRelationships `json:"relationships"`
Type string `json:"type"`
}
type ArtistExternalLink ¶
type ArtistExternalLink struct {
Href string `json:"href"`
Meta struct {
Type ArtistExternalLinkType `json:"type"`
} `json:"meta"`
}
type ArtistExternalLinkType ¶
type ArtistExternalLinkType string
const (
ArtistExternalLinkTypeTidalSharing ArtistExternalLinkType = "TIDAL_SHARING"
)
type ArtistRelationships ¶
type ArtistRelationships struct {
Albums Response[[]Relationship] `json:"albums"`
Biography Response[[]Relationship] `json:"biography"`
Followers Response[[]Relationship] `json:"followers"`
Following Response[[]Relationship] `json:"following"`
Owners Response[[]Relationship] `json:"owners"`
ProfileArt Response[[]Relationship] `json:"profileArt"`
Radio Response[[]Relationship] `json:"radio"`
Roles Response[[]Relationship] `json:"roles"`
SimilarArtists Response[[]Relationship] `json:"similarArtists"`
TrackProviders Response[[]Relationship] `json:"trackProviders"`
Tracks Response[[]Relationship] `json:"tracks"`
Videos Response[[]Relationship] `json:"videos"`
}
type Artwork ¶
type Artwork Response[ArtworkData]
type ArtworkAttributes ¶
type ArtworkAttributes struct {
Files ArtworkFiles `json:"files"`
MediaType ArtworkMediaType `json:"mediaType"`
}
func (ArtworkAttributes) IsPicture ¶
func (a ArtworkAttributes) IsPicture() bool
type ArtworkData ¶
type ArtworkData struct {
Attributes ArtworkAttributes `json:"attributes"`
ID string `json:"id"`
Relationship ArtworkRelationships `json:"relationships"`
Type string `json:"type"`
}
type ArtworkFile ¶
type ArtworkFiles ¶
type ArtworkFiles []ArtworkFile
func (ArtworkFiles) AtLeast ¶
func (files ArtworkFiles) AtLeast(size int) ArtworkFile
type ArtworkMediaType ¶
type ArtworkMediaType string
const ( ArtworkMediaTypeImage ArtworkMediaType = "IMAGE" ArtworkMediaTypeVideo ArtworkMediaType = "VIDEO" )
type ArtworkRelationships ¶
type ArtworkRelationships struct {
Owners Response[[]Relationship] `json:"owners"`
}
type Artworks ¶ added in v1.1.0
type Artworks []ArtworkData
type IncludedObject ¶
type IncludedObject struct {
ID string `json:"id"`
Type string `json:"type"`
Raw json.RawMessage
}
func (*IncludedObject) UnmarshalJSON ¶
func (i *IncludedObject) UnmarshalJSON(b []byte) error
type IncludedObjects ¶
type IncludedObjects []IncludedObject
func (IncludedObjects) Albums ¶
func (i IncludedObjects) Albums(relationships ...Relationship) (responses []Album)
func (IncludedObjects) Artists ¶
func (i IncludedObjects) Artists(relationships ...Relationship) (responses []Artist)
func (IncludedObjects) FromRelationships ¶
func (i IncludedObjects) FromRelationships(relationships []Relationship, t string) IncludedObjects
func (IncludedObjects) FromType ¶
func (i IncludedObjects) FromType(t string) IncludedObjects
func (IncludedObjects) Lyrics ¶
func (i IncludedObjects) Lyrics(relationships ...Relationship) (responses []Lyrics)
func (IncludedObjects) PlainAlbums ¶
func (i IncludedObjects) PlainAlbums(relationships ...Relationship) []AlbumData
func (IncludedObjects) PlainArtists ¶
func (i IncludedObjects) PlainArtists(relationships ...Relationship) []ArtistData
func (IncludedObjects) PlainArtworks ¶
func (i IncludedObjects) PlainArtworks(relationships ...Relationship) Artworks
func (IncludedObjects) PlainLyrics ¶
func (i IncludedObjects) PlainLyrics(relationships ...Relationship) []LyricsData
func (IncludedObjects) PlainPlaylists ¶
func (i IncludedObjects) PlainPlaylists(relationships ...Relationship) []PlaylistData
func (IncludedObjects) PlainTracks ¶
func (i IncludedObjects) PlainTracks(relationships ...Relationship) []TrackData
func (IncludedObjects) Playlists ¶
func (i IncludedObjects) Playlists(relationships ...Relationship) (responses []Playlist)
func (IncludedObjects) Tracks ¶
func (i IncludedObjects) Tracks(relationships ...Relationship) (responses []Track)
func (*IncludedObjects) UnmarshalJSON ¶
func (i *IncludedObjects) UnmarshalJSON(b []byte) error
type LinksMeta ¶
type LinksMeta struct {
// Value to be passed to the next request to retrieve the next page of results
NextCursor *string `json:"nextCursor,omitempty"`
}
type Lyrics ¶
type Lyrics Response[LyricsData]
type LyricsAttributes ¶
type LyricsAttributes struct {
Direction LyricsDirection `json:"direction"`
LRCText string `json:"lrcText"`
Provider LyricsAttributesProvider `json:"provider"`
TechnicalStatus string `json:"technicalStatus"`
Text string `json:"text"`
}
type LyricsAttributesProvider ¶
type LyricsAttributesProvider struct {
CommonTrackID string `json:"commonTrackId"`
LyricsID string `json:"lyricsId"`
Name string `json:"name"`
Source LyricsAttributesProviderSource `json:"source"`
}
type LyricsAttributesProviderSource ¶
type LyricsAttributesProviderSource string
const (
LyricsAttributesProviderSourceThirdParty LyricsAttributesProviderSource = "THIRD_PARTY"
)
type LyricsData ¶
type LyricsData struct {
Attributes LyricsAttributes `json:"attributes"`
ID string `json:"id"`
Relationships LyricsRelationships `json:"relationships"`
Type string `json:"type"`
}
type LyricsDirection ¶
type LyricsDirection string
const ( LyricsDirectionLTR LyricsDirection = "LEFT_TO_RIGHT" LyricsDirectionRTL LyricsDirection = "RIGHT_TO_LEFT" )
type LyricsRelationships ¶
type LyricsRelationships struct {
Owners Response[[]Relationship] `json:"owners"`
Track Response[Relationship] `json:"track"`
}
type ObjectType ¶
type ObjectType string
type Playlist ¶
type Playlist Response[PlaylistData]
type PlaylistAttributes ¶
type PlaylistAttributes struct {
AccessType string `json:"accessType"`
Bounded bool `json:"bounded"`
CreatedAt DateTime `json:"createdAt"`
Description string `json:"description"`
Duration *Duration `json:"duration,omitempty"`
ExternalLinks []PlaylistExternalLink `json:"externalLinks"`
LastModifiedAt DateTime `json:"lastModifiedAt"`
Name string `json:"name"`
NumberOfFollowers int `json:"numberOfFollowers"`
NumberOfItems int `json:"numberOfItems"`
PlaylistType PlaylistType `json:"playlistType"`
}
type PlaylistData ¶
type PlaylistData struct {
Attributes PlaylistAttributes `json:"attributes"`
ID string `json:"id"`
Relationships PlaylistRelationships `json:"relationships"`
Type string `json:"type"`
}
type PlaylistExternalLink ¶
type PlaylistExternalLink struct {
Href string `json:"href"`
Meta struct {
Type PlaylistExternalLinkType `json:"type"`
} `json:"meta"`
}
type PlaylistExternalLinkType ¶
type PlaylistExternalLinkType string
const ( PlaylistExternalLinkTypeTidalSharing PlaylistExternalLinkType = "TIDAL_SHARING" PlaylistExternalLinkTypeTidalAutoplayAndroid PlaylistExternalLinkType = "TIDAL_AUTOPLAY_ANDROID" PlaylistExternalLinkTypeTidalAutoplayIOS PlaylistExternalLinkType = "TIDAL_AUTOPLAY_IOS" PlaylistExternalLinkTypeTidalAutoplayWeb PlaylistExternalLinkType = "TIDAL_AUTOPLAY_WEB" )
type PlaylistRelationships ¶
type PlaylistRelationships struct {
CoverArt Response[[]Relationship] `json:"coverArt"`
Items Response[[]Relationship] `json:"items"`
OwnerProfiles Response[[]Relationship] `json:"ownerProfiles"`
Owners Response[[]Relationship] `json:"owners"`
}
type PlaylistType ¶
type PlaylistType string
const ( PlaylistTypeEditorial PlaylistType = "EDITORIAL" PlaylistTypeMix PlaylistType = "MIX" PlaylistTypeUser PlaylistType = "USER" )
type Relationship ¶
type Response ¶
type Response[DataType any] struct { Data DataType `json:"data"` Included IncludedObjects `json:"included,omitempty"` Links Links `json:"links"` }
type SearchResult ¶
type SearchResult Response[SearchResultData]
type SearchResultAttributes ¶
type SearchResultAttributes struct {
TrackingID string `json:"trackingId"`
}
type SearchResultData ¶
type SearchResultData struct {
Attributes SearchResultAttributes `json:"attributes"`
ID string `json:"id"`
Relationships SearchResultRelationships `json:"relationships"`
Type string `json:"type"`
}
type SearchResultRelationships ¶
type SearchResultRelationships struct {
Albums Response[[]Relationship] `json:"albums"`
Artists Response[[]Relationship] `json:"artists"`
Playlists Response[[]Relationship] `json:"playlists"`
TopHits Response[[]Relationship] `json:"topHits"`
Tracks Response[[]Relationship] `json:"tracks"`
Videos Response[[]Relationship] `json:"videos"`
}
type TrackAttributes ¶
type TrackAttributes struct {
AccessType string `json:"accessType"`
Availability []TrackAvailability `json:"availability"`
BPM float64 `json:"bpm"`
Copyright struct {
Text string `json:"text"`
}
CreatedAt DateTime `json:"createdAt"`
Duration helper.DurationISO8601 `json:"duration"`
Explicit bool `json:"explicit"`
ExternalLinks []TrackExternalLink `json:"externalLinks"`
ISRC string `json:"isrc"`
Key string `json:"key"`
KeyScale string `json:"keyScale"`
MediaTags []string `json:"media_tags"`
Popularity float64 `json:"popularity"`
Spotlighted bool `json:"spotlighted"`
Title string `json:"title"`
ToneTags []string `json:"toneTags"`
Version any `json:"version"`
}
type TrackAvailability ¶
type TrackAvailability string
const ( TrackAvailabilityDJ TrackAvailability = "DJ" TrackAvailabilityStream TrackAvailability = "STREAM" )
type TrackData ¶
type TrackData struct {
Attributes TrackAttributes `json:"attributes"`
ID string `json:"id"`
Relationships TrackRelationships `json:"relationships"`
Type string `json:"type"`
}
type TrackExternalLink ¶
type TrackExternalLink struct {
Href string `json:"href"`
Meta struct {
Type TrackExternalLinkType `json:"type"`
} `json:"meta"`
}
type TrackExternalLinkType ¶
type TrackExternalLinkType string
const (
TrackExternalLinkTypeTidalSharing TrackExternalLinkType = "TIDAL_SHARING"
)
type TrackRelationships ¶
type TrackRelationships struct {
Albums Response[[]Relationship] `json:"albums"`
Artists Response[[]Relationship] `json:"artists"`
Genres Response[[]Relationship] `json:"genres"`
Lyrics Response[[]Relationship] `json:"lyrics"`
Owners Response[[]Relationship] `json:"owners"`
Providers Response[[]Relationship] `json:"providers"`
Radio Response[[]Relationship] `json:"radio"`
SimilarTracks Response[[]Relationship] `json:"similarTracks"`
SourceFile Response[[]Relationship] `json:"sourceFile"`
TrackStatistics Response[[]Relationship] `json:"trackStatistics"`
}
type UserAttributes ¶
type UserCollection ¶
type UserCollection Response[UserCollectionData]
type UserCollectionAttributes ¶
type UserCollectionAttributes struct{}
type UserCollectionData ¶
type UserCollectionData struct {
Attributes UserCollectionAttributes `json:"attributes"`
ID string `json:"id"`
Relationships UserCollectionRelationships `json:"relationships"`
Type string `json:"type"`
}
type UserCollectionRelationships ¶
type UserCollectionRelationships struct {
Albums Response[[]Relationship] `json:"albums"`
Artists Response[[]Relationship] `json:"artists"`
Owners Response[[]Relationship] `json:"owners"`
Playlists Response[[]Relationship] `json:"playlists"`
Tracks Response[[]Relationship] `json:"tracks"`
Videos Response[[]Relationship] `json:"videos"`
}
type UserData ¶
type UserData struct {
Attributes UserAttributes `json:"attributes"`
ID string `json:"id"`
Type string `json:"type"`
}
Click to show internal directories.
Click to hide internal directories.