types

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlbumSearchType

type AlbumSearchType struct {
	SearchTypeCommon
	Data []AlbumTypeMinimal `json:"data"`
}

type AlbumTracksType

type AlbumTracksType struct {
	Data          []TrackType `json:"data"`                     // List of track data
	Count         int         `json:"count"`                    // Count of tracks
	Total         int         `json:"total"`                    // Total tracks in album
	FilteredCount int         `json:"filtered_count"`           // Filtered count
	FilteredItems []int       `json:"filtered_items,omitempty"` // Optional filtered item IDs
	Next          int         `json:"next,omitempty"`           // Next page number if available
}

AlbumTracksType represents track details in an album including count and filtering information.

type AlbumType

type AlbumType struct {
	ALB_CONTRIBUTORS struct {
		MainArtist []string `json:"main_artist"` // Main artist, e.g., ['Avicii']
	} `json:"ALB_CONTRIBUTORS"`
	ALB_ID                 string `json:"ALB_ID"`      // Album ID, e.g., '9188269'
	ALB_PICTURE            string `json:"ALB_PICTURE"` // Album picture hash, e.g., '6e58a99f59a150e9b4aefbeb2d6fc856'
	EXPLICIT_ALBUM_CONTENT struct {
		EXPLICIT_LYRICS_STATUS int `json:"EXPLICIT_LYRICS_STATUS"` // Explicit lyrics status, e.g., 0
		EXPLICIT_COVER_STATUS  int `json:"EXPLICIT_COVER_STATUS"`  // Explicit cover status, e.g., 0
	} `json:"EXPLICIT_ALBUM_CONTENT"`
	ALB_TITLE             string       `json:"ALB_TITLE"`                       // Album title, e.g., 'The Days / Nights'
	ARTISTS               []ArtistType `json:"ARTISTS"`                         // List of artists
	ART_ID                string       `json:"ART_ID"`                          // Artist ID, e.g., '293585'
	ART_NAME              string       `json:"ART_NAME"`                        // Artist name, e.g., 'Avicii'
	ARTIST_IS_DUMMY       bool         `json:"ARTIST_IS_DUMMY"`                 // Indicates if the artist is a dummy
	DIGITAL_RELEASE_DATE  string       `json:"DIGITAL_RELEASE_DATE"`            // Digital release date, e.g., '2014-12-01'
	EXPLICIT_LYRICS       *string      `json:"EXPLICIT_LYRICS,omitempty"`       // Optional explicit lyrics status
	NB_FAN                int          `json:"NB_FAN"`                          // Number of fans, e.g., 36285
	NUMBER_DISK           string       `json:"NUMBER_DISK"`                     // Number of disks, e.g., '1'
	NUMBER_TRACK          string       `json:"NUMBER_TRACK"`                    // Number of tracks, e.g., '1'
	PHYSICAL_RELEASE_DATE *string      `json:"PHYSICAL_RELEASE_DATE,omitempty"` // Optional physical release date
	PRODUCER_LINE         string       `json:"PRODUCER_LINE"`                   // Producer line, e.g., '℗ 2014 Avicii Music AB'
	PROVIDER_ID           string       `json:"PROVIDER_ID"`                     // Provider ID, e.g., '427'
	RANK                  string       `json:"RANK"`                            // Rank, e.g., '601128'
	RANK_ART              string       `json:"RANK_ART"`                        // Artist rank, e.g., '861905'
	STATUS                string       `json:"STATUS"`                          // Status, e.g., '1'
	TYPE                  string       `json:"TYPE"`                            // Type, e.g., '1'
	UPC                   string       `json:"UPC"`                             // UPC, e.g., '602547151544'
	TYPE_INTERNAL         string       `json:"__TYPE__"`                        // Internal type, e.g., 'album'
}

AlbumType represents detailed information about an album including contributors and release dates.

type AlbumTypeMinimal

type AlbumTypeMinimal struct {
	ALB_ID                 string       `json:"ALB_ID"`      // Album ID, e.g., '9188269'
	ALB_TITLE              string       `json:"ALB_TITLE"`   // Album title, e.g., 'The Days / Nights'
	ALB_PICTURE            string       `json:"ALB_PICTURE"` // Album picture hash, e.g., '6e58a99f59a150e9b4aefbeb2d6fc856'
	ARTISTS                []ArtistType `json:"ARTISTS"`     // List of artists
	AVAILABLE              bool         `json:"AVAILABLE"`   // Availability status
	VERSION                string       `json:"VERSION"`     // Version string, e.g., ”
	ART_ID                 string       `json:"ART_ID"`      // Artist ID, e.g., '293585'
	ART_NAME               string       `json:"ART_NAME"`    // Artist name, e.g., 'Avicii'
	EXPLICIT_ALBUM_CONTENT struct {
		EXPLICIT_LYRICS_STATUS int `json:"EXPLICIT_LYRICS_STATUS"` // Explicit lyrics status, e.g., 1
		EXPLICIT_COVER_STATUS  int `json:"EXPLICIT_COVER_STATUS"`  // Explicit cover status, e.g., 2
	} `json:"EXPLICIT_ALBUM_CONTENT"`
	PHYSICAL_RELEASE_DATE string `json:"PHYSICAL_RELEASE_DATE"` // Physical release date
	TYPE                  string `json:"TYPE"`                  // Album type, e.g., '0'
	ARTIST_IS_DUMMY       bool   `json:"ARTIST_IS_DUMMY"`       // Indicates if the artist is a dummy
	NUMBER_TRACK          string `json:"NUMBER_TRACK"`          // Number of tracks, e.g., '1'
	TYPE_INTERNAL         string `json:"__TYPE__"`              // Internal type, e.g., 'album'
}

AlbumTypeMinimal represents minimal information about an album, including artist and explicit content details.

type AlbumTypePublicApi

type AlbumTypePublicApi struct {
	ID                    int                     `json:"id"`                      // Album ID, e.g., 302127
	Title                 string                  `json:"title"`                   // Album title, e.g., 'Discovery'
	UPC                   string                  `json:"upc"`                     // UPC code, e.g., '724384960650'
	Link                  string                  `json:"link"`                    // Deezer link, e.g., 'https://www.deezer.com/album/302127'
	Share                 string                  `json:"share"`                   // Share link
	Cover                 string                  `json:"cover"`                   // Cover image URL
	CoverSmall            string                  `json:"cover_small"`             // Small cover image URL
	CoverMedium           string                  `json:"cover_medium"`            // Medium cover image URL
	CoverBig              string                  `json:"cover_big"`               // Big cover image URL
	CoverXL               string                  `json:"cover_xl"`                // Extra-large cover image URL
	MD5Image              string                  `json:"md5_image"`               // MD5 image hash
	GenreID               int                     `json:"genre_id"`                // Genre ID, e.g., 113
	Genres                GenreTypePublicApiList  `json:"genres"`                  // List of genres
	Label                 string                  `json:"label"`                   // Label, e.g., 'Parlophone (France)'
	NbTracks              int                     `json:"nb_tracks"`               // Number of tracks
	Duration              int                     `json:"duration"`                // Duration in seconds
	Fans                  int                     `json:"fans"`                    // Number of fans
	Rating                int                     `json:"rating"`                  // Album rating
	ReleaseDate           string                  `json:"release_date"`            // Release date, e.g., '2001-03-07'
	RecordType            string                  `json:"record_type"`             // Record type, e.g., 'album'
	Available             bool                    `json:"available"`               // Availability status
	Tracklist             string                  `json:"tracklist"`               // Tracklist URL
	ExplicitLyrics        bool                    `json:"explicit_lyrics"`         // Explicit lyrics status
	ExplicitContentLyrics int                     `json:"explicit_content_lyrics"` // Explicit content lyrics status
	ExplicitContentCover  int                     `json:"explicit_content_cover"`  // Explicit content cover status
	Contributors          []ContributorsPublicApi `json:"contributors"`            // List of contributors
	Artist                ContributorsPublicApi   `json:"artist"`                  // Artist details
	Type                  string                  `json:"type"`                    // Type, e.g., 'album'
	Tracks                TrackDataPublicApiList  `json:"tracks"`                  // List of track data
}

AlbumTypePublicApi represents detailed album information from the public API.

type ArtistDataPublic

type ArtistDataPublic struct {
	ID        int    `json:"id"`        // Artist ID, e.g., 27
	Name      string `json:"name"`      // Artist name, e.g., 'Daft Punk'
	Tracklist string `json:"tracklist"` // Artist tracklist link, e.g., 'https://api.deezer.com/artist/27/top?limit=50'
	Type      string `json:"type"`      // Type, e.g., 'artist'
}

ArtistDataPublic represents public information about an artist.

type ArtistInfoType

type ArtistInfoType struct {
	ART_ID          string  `json:"ART_ID"`             // '293585'
	ART_NAME        string  `json:"ART_NAME"`           // 'Avicii'
	ARTIST_IS_DUMMY bool    `json:"ARTIST_IS_DUMMY"`    // Indicates if the artist is a dummy, e.g., false
	ART_PICTURE     string  `json:"ART_PICTURE"`        // '82e214b0cb39316f4a12a082fded54f6'
	FACEBOOK        *string `json:"FACEBOOK,omitempty"` // Optional Facebook URL, e.g., 'https://www.facebook.com/avicii?fref=ts'
	NB_FAN          int     `json:"NB_FAN"`             // Number of fans, e.g., 7140516
	TWITTER         *string `json:"TWITTER,omitempty"`  // Optional Twitter URL, e.g., 'https://twitter.com/Avicii'
	TYPE_INTERNAL   string  `json:"__TYPE__"`           // 'artist'
}

ArtistInfoType represents detailed information about an artist, including social media links.

type ArtistInfoTypeMinimal

type ArtistInfoTypeMinimal struct {
	ART_ID          string      `json:"ART_ID"`          // Artist ID, e.g., '27'
	ART_NAME        string      `json:"ART_NAME"`        // Artist name, e.g., 'Daft Punk'
	ART_PICTURE     string      `json:"ART_PICTURE"`     // Artist picture URL, e.g., 'f2bc007e9133c946ac3c3907ddc5d2ea'
	NB_FAN          int         `json:"NB_FAN"`          // Number of fans, e.g., 7140516
	LOCALES         LocalesType `json:"LOCALES"`         // Locales, can be an empty array or specific locale strings
	ARTIST_IS_DUMMY bool        `json:"ARTIST_IS_DUMMY"` // Indicates if the artist is a dummy, e.g., false
	TYPE_INTERNAL   string      `json:"__TYPE__"`        // Internal type, e.g., 'artist'
}

ArtistInfoTypeMinimal represents minimal information about an artist, including their name and fan count.

type ArtistSearchType

type ArtistSearchType struct {
	SearchTypeCommon
	Data []ArtistInfoTypeMinimal `json:"data"`
}

type ArtistType

type ArtistType struct {
	ART_ID              string      `json:"ART_ID"`              // '27'
	ROLE_ID             string      `json:"ROLE_ID"`             // '0'
	ARTISTS_SONGS_ORDER string      `json:"ARTISTS_SONGS_ORDER"` // '0'
	ART_NAME            string      `json:"ART_NAME"`            // 'Daft Punk'
	ARTIST_IS_DUMMY     bool        `json:"ARTIST_IS_DUMMY"`     // false
	ART_PICTURE         string      `json:"ART_PICTURE"`         // 'f2bc007e9133c946ac3c3907ddc5d2ea'
	RANK                string      `json:"RANK"`                // '836071'
	LOCALES             LocalesType `json:"LOCALES,omitempty"`   // Optional locales with translations
	TYPE_INTERNAL       string      `json:"__TYPE__"`            // 'artist'
}

ArtistType represents detailed information about an artist, including their role and ranking.

type ChannelDataType

type ChannelDataType struct {
	ItemID          string         `json:"item_id"`
	ID              string         `json:"id"`
	Type            string         `json:"type"`
	Data            []DataType     `json:"data"`
	Target          string         `json:"target"`
	Title           string         `json:"title"`
	Pictures        []PicturesType `json:"pictures"`
	Weight          int            `json:"weight"`
	BackgroundColor string         `json:"background_color"`
}

type ChannelSearchType

type ChannelSearchType struct {
	Data  []ChannelDataType `json:"data"`
	Count int               `json:"count"`
	Total int               `json:"total"`
}

type ContributorsPublicAPI

ContributorsPublicAPI represents information about contributors from the public API.

type ContributorsPublicApi

type ContributorsPublicApi struct {
	ID            int    `json:"id"`             // Contributor ID
	Name          string `json:"name"`           // Contributor name
	Link          string `json:"link"`           // Link to contributor profile
	Share         string `json:"share"`          // Shareable link
	Picture       string `json:"picture"`        // Picture URL
	PictureSmall  string `json:"picture_small"`  // Small picture URL
	PictureMedium string `json:"picture_medium"` // Medium picture URL
	PictureBig    string `json:"picture_big"`    // Big picture URL
	PictureXL     string `json:"picture_xl"`     // Extra-large picture URL
	Radio         bool   `json:"radio"`          // Radio availability
	Tracklist     string `json:"tracklist"`      // Tracklist link
	Type          string `json:"type"`           // Type, e.g., 'artist'
}

ContributorsPublicApi represents information about contributors from the public API.

type DataType

type DataType struct {
	Type            string         `json:"type"`
	ID              string         `json:"id"`
	Name            string         `json:"name"`
	Title           string         `json:"title"`
	Description     *string        `json:"description"`
	Slug            string         `json:"slug"`
	BackgroundColor string         `json:"background_color"`
	Pictures        []PicturesType `json:"pictures"`
	TYPE_INTERNAL   string         `json:"__TYPE__"`
}

type DiscographyType

type DiscographyType struct {
	Data          []AlbumType `json:"data"`
	Count         int         `json:"count"`
	Total         int         `json:"total"`
	CacheVersion  int         `json:"cache_version"`
	FilteredCount int         `json:"filtered_count"`
	ArtID         int         `json:"art_id"`
	Start         int         `json:"start"`
	NB            int         `json:"nb"`
}

type ExplicitTrackContent

type ExplicitTrackContent struct {
	ExplicitLyricsStatus int `json:"EXPLICIT_LYRICS_STATUS"` // 0
	ExplicitCoverStatus  int `json:"EXPLICIT_COVER_STATUS"`  // 0
}

ExplicitTrackContent represents explicit content status for lyrics and covers.

type GeneresType

type GeneresType struct {
	GenreID   int    `json:"GENRE_ID"`   // Genre ID, e.g., 232
	GenreName string `json:"GENRE_NAME"` // Genre name, e.g., 'Technology'
}

GeneresType represents genre details, including ID and name.

type GenreTypePublicApi

type GenreTypePublicApi struct {
	ID      int    `json:"id"`      // Genre ID, e.g., 113
	Name    string `json:"name"`    // Genre name, e.g., 'Dance'
	Picture string `json:"picture"` // Genre picture URL
	Type    string `json:"type"`    // Type, e.g., 'genre'
}

GenreTypePublicApi represents genre information from the public API.

type GenreTypePublicApiList

type GenreTypePublicApiList struct {
	Data []GenreTypePublicApi `json:"data"` // Array of genre details
}

GenreTypePublicApiList represents a list of genres from the public API.

type LiveSearchType

type LiveSearchType struct {
	SearchTypeCommon
	Data []interface{} `json:"data"`
}

type LocalesType

type LocalesType map[string]struct {
	Name string `json:"name"` // The localized name, e.g., 'Daft Punk', 'ダフトパンク' in different languages
}

LocalesType represents locales with their names, where the key is the locale code.

func (*LocalesType) UnmarshalJSON

func (lt *LocalesType) UnmarshalJSON(data []byte) error

UnmarshalJSON for LocalesType allows dynamic handling of multiple structures: objects, empty arrays, etc.

type LyricsSync

type LyricsSync struct {
	LrcTimestamp string      `json:"lrc_timestamp"` // '[00:03.58]'
	Milliseconds string      `json:"milliseconds"`  // '3580'
	Duration     StringOrInt `json:"duration"`      // '8660'
	Line         string      `json:"line"`          // "Hey brother! There's an endless road to rediscover"
}

LyricsSync represents the synchronized lyrics with timestamps.

type LyricsType

type LyricsType struct {
	LYRICS_ID         *string      `json:"LYRICS_ID,omitempty"`         // '2310758'
	LYRICS_SYNC_JSON  []LyricsSync `json:"LYRICS_SYNC_JSON,omitempty"`  // Array of synchronized lyrics
	LYRICS_TEXT       string       `json:"LYRICS_TEXT"`                 // Lyrics text
	LYRICS_COPYRIGHTS *string      `json:"LYRICS_COPYRIGHTS,omitempty"` // Optional lyrics copyrights
	LYRICS_WRITERS    *string      `json:"LYRICS_WRITERS,omitempty"`    // Optional lyrics writers
}

LyricsType represents lyrics information, including text and synchronized data.

type MediaType

type MediaType struct {
	TYPE string `json:"TYPE"` // 'preview'
	HREF string `json:"HREF"` // 'https://cdns-preview-d.dzcdn.net/stream/c-deda7fa9316d9e9e880d2c6207e92260-8.mp3'
}

MediaType represents media details, including the type and URL.

type NativeAdsType

type NativeAdsType struct {
	AdvertisingData struct {
		PageIDAndroid       string `json:"page_id_android"`
		PageIDAndroidTablet string `json:"page_id_android_tablet"`
		PageIDIpad          string `json:"page_id_ipad"`
		PageIDIphone        string `json:"page_id_iphone"`
		PageIDWeb           string `json:"page_id_web"`
	} `json:"advertising_data"`
	Data   interface{} `json:"data"`
	ID     string      `json:"id"`
	ItemID string      `json:"item_id"`
	Type   string      `json:"type"`
	Weight int         `json:"weight"`
}

type PicturesType

type PicturesType struct {
	MD5  string `json:"md5"`
	Type string `json:"type"`
}

type PlaylistChannelItemsType

type PlaylistChannelItemsType struct {
	ItemID      string      `json:"item_id"`
	ID          string      `json:"id"`
	Type        itemType    `json:"type"`
	Data        interface{} `json:"data"`
	Target      string      `json:"target"`
	Title       string      `json:"title"`
	Subtitle    string      `json:"subtitle"`
	Description string      `json:"description"`
	Pictures    []struct {
		MD5  string `json:"md5"`
		Type string `json:"type"`
	} `json:"pictures"`
	Weight           int `json:"weight"`
	LayoutParameters struct {
		CTA struct {
			Type  string `json:"type"`
			Label string `json:"label"`
		} `json:"cta"`
	} `json:"layout_parameters"`
}

type PlaylistChannelSectionsType

type PlaylistChannelSectionsType struct {
	Layout    string                     `json:"layout"`
	SectionID string                     `json:"section_id"`
	Items     []PlaylistChannelItemsType `json:"items"`
	Title     string                     `json:"title"`
	Target    string                     `json:"target"`
	Related   struct {
		Target    string `json:"target"`
		Label     string `json:"label"`
		Mandatory bool   `json:"mandatory"`
	} `json:"related"`
	Alignment    string `json:"alignment"`
	GroupID      string `json:"group_id"`
	HasMoreItems bool   `json:"hasMoreItems"`
}

type PlaylistChannelType

type PlaylistChannelType struct {
	Version string `json:"version"`
	PageID  string `json:"page_id"`
	GA      struct {
		ScreenName string `json:"screen_name"`
	} `json:"ga"`
	Title      string                        `json:"title"`
	Persistent bool                          `json:"persistent"`
	Sections   []PlaylistChannelSectionsType `json:"sections"`
	Expire     int                           `json:"expire"`
}

type PlaylistInfo

type PlaylistInfo struct {
	PlaylistID        string      `json:"PLAYLIST_ID"`                   // '4523119944'
	Description       string      `json:"DESCRIPTION,omitempty"`         // Optional description
	ParentUsername    string      `json:"PARENT_USERNAME"`               // 'sayem314'
	ParentUserPicture string      `json:"PARENT_USER_PICTURE,omitempty"` // Optional parent user picture
	ParentUserID      string      `json:"PARENT_USER_ID"`                // '2064440442'
	PictureType       string      `json:"PICTURE_TYPE"`                  // 'cover'
	PlaylistPicture   string      `json:"PLAYLIST_PICTURE"`              // 'e206dafb59a3d378d7ffacc989bc4e35'
	Title             string      `json:"TITLE"`                         // 'wtf playlist'
	Type              string      `json:"TYPE"`                          // '0'
	Status            StringOrInt `json:"STATUS"`                        // '0'
	UserID            string      `json:"USER_ID"`                       // '2064440442'
	DateAdd           string      `json:"DATE_ADD"`                      // '2018-09-08 19:13:57'
	DateMod           string      `json:"DATE_MOD"`                      // '2018-09-08 19:14:11'
	DateCreate        string      `json:"DATE_CREATE"`                   // '2018-05-31 00:01:05'
	NbSong            int         `json:"NB_SONG"`                       // 3
	NbFan             int         `json:"NB_FAN"`                        // 0
	Checksum          string      `json:"CHECKSUM"`                      // 'c185d123834444e3c8869e235dd6f0a6'
	HasArtistLinked   bool        `json:"HAS_ARTIST_LINKED"`             // True if artists are linked
	IsSponsored       bool        `json:"IS_SPONSORED"`                  // True if the playlist is sponsored
	IsEdito           bool        `json:"IS_EDITO"`                      // True if the playlist is editorial
	TYPE_INTERNAL     string      `json:"__TYPE__"`                      // 'playlist'
}

PlaylistInfo represents detailed information about a playlist.

type PlaylistInfoMinimal

type PlaylistInfoMinimal struct {
	PlaylistID        string      `json:"PLAYLIST_ID"`                   // '4523119944'
	ParentPlaylistID  string      `json:"PARENT_PLAYLIST_ID"`            // '0'
	Type              string      `json:"TYPE"`                          // '0'
	Title             string      `json:"TITLE"`                         // 'wtf playlist'
	ParentUserID      string      `json:"PARENT_USER_ID"`                // '2064440442'
	ParentUsername    string      `json:"PARENT_USERNAME"`               // 'sayem314'
	ParentUserPicture string      `json:"PARENT_USER_PICTURE,omitempty"` // Optional parent user picture
	Status            StringOrInt `json:"STATUS"`                        // '0'
	PlaylistPicture   string      `json:"PLAYLIST_PICTURE"`              // 'e206dafb59a3d378d7ffacc989bc4e35'
	PictureType       string      `json:"PICTURE_TYPE"`                  // 'playlist'
	NbSong            int         `json:"NB_SONG"`                       // 180
	HasArtistLinked   bool        `json:"HAS_ARTIST_LINKED"`             // True if artists are linked
	DateAdd           string      `json:"DATE_ADD"`                      // '2021-01-29 20:54:13'
	DateMod           string      `json:"DATE_MOD"`                      // '2021-02-01 05:52:40'
	TYPE_INTERNAL     string      `json:"__TYPE__"`                      // 'playlist'
}

PlaylistInfoMinimal represents basic information about a playlist.

type PlaylistSearchType

type PlaylistSearchType struct {
	SearchTypeCommon
	Data []PlaylistInfoMinimal `json:"data"`
}

type PlaylistTracksType

type PlaylistTracksType struct {
	Data          []TrackType `json:"data"`                     // Array of tracks
	Count         int         `json:"count"`                    // Number of tracks
	Total         int         `json:"total"`                    // Total number of tracks
	FilteredCount int         `json:"filtered_count"`           // Filtered track count
	FilteredItems []int       `json:"filtered_items,omitempty"` // Optional filtered track IDs
	Next          *int        `json:"next,omitempty"`           // Optional next track index
}

PlaylistTracksType represents track information within a playlist.

type ProfileSearchType

type ProfileSearchType struct {
	SearchTypeCommon
	Data []ProfileTypeMinimal `json:"data"`
}

type ProfileType

type ProfileType struct {
	IS_FOLLOW     bool            `json:"IS_FOLLOW"`
	NB_ARTISTS    int             `json:"NB_ARTISTS"`
	NB_FOLLOWERS  int             `json:"NB_FOLLOWERS"`
	NB_FOLLOWINGS int             `json:"NB_FOLLOWINGS"`
	NB_MP3S       int             `json:"NB_MP3S"`
	TOP_TRACK     AlbumTracksType `json:"TOP_TRACK"`
	USER          UserProfileType `json:"USER"`
}

type ProfileTypeMinimal

type ProfileTypeMinimal struct {
	USER_ID       string `json:"USER_ID"`
	FIRSTNAME     string `json:"FIRSTNAME"`
	LASTNAME      string `json:"LASTNAME"`
	BLOG_NAME     string `json:"BLOG_NAME"`
	USER_PICTURE  string `json:"USER_PICTURE,omitempty"`
	IS_FOLLOW     bool   `json:"IS_FOLLOW"`
	TYPE_INTERNAL string `json:"__TYPE__"`
}

type RadioSearchType

type RadioSearchType struct {
	SearchTypeCommon
	Data []RadioType `json:"data"`
}

type RadioType

type RadioType struct {
	RADIO_ID      string   `json:"RADIO_ID"`
	RADIO_PICTURE string   `json:"RADIO_PICTURE"`
	TITLE         string   `json:"TITLE"`
	TAGS          []string `json:"TAGS"`
	TYPE_INTERNAL string   `json:"__TYPE__"`
}

type Rights

type Rights struct {
	StreamAdsAvailable *bool   `json:"STREAM_ADS_AVAILABLE,omitempty"` // Ads available for streaming
	StreamAds          *string `json:"STREAM_ADS,omitempty"`           // Ads details
	StreamSubAvailable *bool   `json:"STREAM_SUB_AVAILABLE,omitempty"` // Subscription available for streaming
	StreamSub          *string `json:"STREAM_SUB,omitempty"`           // Subscription details
}

Rights represents the streaming rights for the song.

type SearchType

type SearchType struct {
	QUERY       string             `json:"QUERY"`
	FUZZINNESS  bool               `json:"FUZZINNESS"`
	AUTOCORRECT bool               `json:"AUTOCORRECT"`
	TOP_RESULT  []interface{}      `json:"TOP_RESULT"`
	ORDER       []string           `json:"ORDER"`
	ALBUM       AlbumSearchType    `json:"ALBUM"`
	ARTIST      ArtistSearchType   `json:"ARTIST"`
	TRACK       TrackSearchType    `json:"TRACK"`
	PLAYLIST    PlaylistSearchType `json:"PLAYLIST"`
	RADIO       RadioSearchType    `json:"RADIO"`
	SHOW        ShowSearchType     `json:"SHOW"`
	USER        ProfileSearchType  `json:"USER"`
	LIVESTREAM  LiveSearchType     `json:"LIVESTREAM"`
	CHANNEL     ChannelSearchType  `json:"CHANNEL"`
}

type SearchTypeCommon

type SearchTypeCommon struct {
	Count         int   `json:"count"`
	Total         int   `json:"total"`
	FilteredCount int   `json:"filtered_count"`
	FilteredItems []int `json:"filtered_items"`
	Next          int   `json:"next"`
}

type ShowEpisodeType

type ShowEpisodeType struct {
	EpisodeID                string `json:"EPISODE_ID"`                  // Episode ID, e.g., '294961882'
	EpisodeStatus            string `json:"EPISODE_STATUS"`              // Episode status, e.g., '1'
	Available                bool   `json:"AVAILABLE"`                   // Availability status
	ShowID                   string `json:"SHOW_ID"`                     // Show ID, e.g., '1235862'
	ShowName                 string `json:"SHOW_NAME"`                   // Show name, e.g., 'Masters of Scale with Reid Hoffman'
	ShowArtMD5               string `json:"SHOW_ART_MD5"`                // Show art MD5 hash, e.g., '52d6e09bccf1369d5758e7a45ee98b7e'
	ShowDescription          string `json:"SHOW_DESCRIPTION"`            // Show description, detailed text about the show
	ShowIsExplicit           string `json:"SHOW_IS_EXPLICIT"`            // Explicit content flag, e.g., '2'
	EpisodeTitle             string `json:"EPISODE_TITLE"`               // Episode title, e.g., '87. Frustration is your friend, w/Houzz founder Adi Tatarko'
	EpisodeDescription       string `json:"EPISODE_DESCRIPTION"`         // Episode description, detailed text about the episode
	MD5Origin                string `json:"MD5_ORIGIN"`                  // MD5 origin hash, e.g., ”
	FilesizeMP332            string `json:"FILESIZE_MP3_32"`             // MP3 file size for 32 kbps, e.g., '0'
	FilesizeMP364            string `json:"FILESIZE_MP3_64"`             // MP3 file size for 64 kbps, e.g., '0'
	EpisodeDirectStreamURL   string `json:"EPISODE_DIRECT_STREAM_URL"`   // Direct stream URL for the episode
	ShowIsDirectStream       string `json:"SHOW_IS_DIRECT_STREAM"`       // Direct stream flag, e.g., '1'
	Duration                 string `json:"DURATION"`                    // Duration of the episode, e.g., '2022'
	EpisodePublishedTime     string `json:"EPISODE_PUBLISHED_TIMESTAMP"` // Published timestamp, e.g., '2021-04-20 09:00:00'
	EpisodeUpdateTime        string `json:"EPISODE_UPDATE_TIMESTAMP"`    // Update timestamp, e.g., '2021-04-20 10:23:21'
	ShowIsAdvertisingAllowed string `json:"SHOW_IS_ADVERTISING_ALLOWED"` // Advertising allowed flag, e.g., '1'
	ShowIsDownloadAllowed    string `json:"SHOW_IS_DOWNLOAD_ALLOWED"`    // Download allowed flag, e.g., '1'
	TrackToken               string `json:"TRACK_TOKEN"`                 // Track token for the episode
	TrackTokenExpire         int    `json:"TRACK_TOKEN_EXPIRE"`          // Track token expiration timestamp, e.g., 1619011217
	Type                     string `json:"__TYPE__"`                    // Type of content, e.g., 'episode'
}

ShowEpisodeType represents information about a show episode.

type ShowSearchType

type ShowSearchType struct {
	SearchTypeCommon
	Data []ShowEpisodeType `json:"data"`
}

type ShowType

type ShowType struct {
	Data struct {
		Available                bool          `json:"AVAILABLE"`                   // Availability status
		ShowIsExplicit           string        `json:"SHOW_IS_EXPLICIT"`            // Explicit content flag, e.g., '2'
		LabelID                  string        `json:"LABEL_ID"`                    // Label ID, e.g., '35611'
		LabelName                string        `json:"LABEL_NAME"`                  // Label name, e.g., 'Art19'
		LanguageCD               string        `json:"LANGUAGE_CD"`                 // Language code, e.g., 'en'
		ShowIsDirectStream       string        `json:"SHOW_IS_DIRECT_STREAM"`       // Direct stream flag, e.g., '1'
		ShowIsAdvertisingAllowed string        `json:"SHOW_IS_ADVERTISING_ALLOWED"` // Advertising allowed flag, e.g., '1'
		ShowIsDownloadAllowed    string        `json:"SHOW_IS_DOWNLOAD_ALLOWED"`    // Download allowed flag, e.g., '1'
		ShowEpisodeDisplayCount  string        `json:"SHOW_EPISODE_DISPLAY_COUNT"`  // Number of displayed episodes, e.g., '0'
		ShowID                   string        `json:"SHOW_ID"`                     // Show ID, e.g., '1235862'
		ShowArtMD5               string        `json:"SHOW_ART_MD5"`                // Show art MD5 hash, e.g., '52d6e09bccf1369d5758e7a45ee98b7e'
		ShowName                 string        `json:"SHOW_NAME"`                   // Show name, e.g., 'Masters of Scale with Reid Hoffman'
		ShowDescription          string        `json:"SHOW_DESCRIPTION"`            // Show description, detailed text about the show
		ShowStatus               string        `json:"SHOW_STATUS"`                 // Show status, e.g., '1'
		ShowType                 string        `json:"SHOW_TYPE"`                   // Show type, e.g., '0'
		Genres                   []GeneresType `json:"GENRES"`                      // List of genres associated with the show
		NBFan                    int           `json:"NB_FAN"`                      // Number of fans, e.g., 658
		NBRate                   int           `json:"NB_RATE"`                     // Number of ratings, e.g., 0
		Rating                   string        `json:"RATING"`                      // Show rating, e.g., '0'
		Type                     string        `json:"__TYPE__"`                    // Type of content, e.g., 'show'
	} `json:"DATA"`
	FavoriteStatus bool `json:"FAVORITE_STATUS"` // Favorite status flag, e.g., false
	Episodes       struct {
		Data          []ShowEpisodeType `json:"data"`           // List of episodes
		Count         int               `json:"count"`          // Number of episodes in the list, e.g., 1
		Total         int               `json:"total"`          // Total number of episodes available, e.g., 174
		FilteredCount int               `json:"filtered_count"` // Number of filtered episodes, e.g., 0
	} `json:"EPISODES"`
}

ShowType represents detailed information about a show, including episodes and metadata.

type SongContributors

type SongContributors struct {
	MainArtist     []string `json:"main_artist,omitempty"`    // Main artist
	Author         []string `json:"author,omitempty"`         // Song authors
	Composer       []string `json:"composer,omitempty"`       // Composers
	MusicPublisher []string `json:"musicpublisher,omitempty"` // Music publishers
	Producer       []string `json:"producer,omitempty"`       // Producers
	Publisher      []string `json:"publisher"`                // Publishers
	Engineer       []string `json:"engineer,omitempty"`       // Engineers
	Writer         []string `json:"writer,omitempty"`         // Writers
	Mixer          []string `json:"mixer,omitempty"`          // Mixers
}

SongContributors represents contributors to the song such as artists, authors, and more.

func (*SongContributors) UnmarshalJSON

func (sc *SongContributors) UnmarshalJSON(data []byte) error

UnmarshalJSON for SongContributors allows dynamic handling of multiple structures.

type SongType

type SongType struct {
	ALB_ID                 string               `json:"ALB_ID"`                     // '302127'
	ALB_TITLE              string               `json:"ALB_TITLE"`                  // 'Discovery'
	ALB_PICTURE            string               `json:"ALB_PICTURE"`                // '2e018122cb56986277102d2041a592c8'
	ARTISTS                []ArtistType         `json:"ARTISTS"`                    // List of artists
	ART_ID                 string               `json:"ART_ID"`                     // '27'
	ART_NAME               string               `json:"ART_NAME"`                   // 'Daft Punk'
	ARTIST_IS_DUMMY        bool                 `json:"ARTIST_IS_DUMMY"`            // false
	ART_PICTURE            string               `json:"ART_PICTURE"`                // 'f2bc007e9133c946ac3c3907ddc5d2ea'
	DATE_START             string               `json:"DATE_START"`                 // '0000-00-00'
	DISK_NUMBER            StringOrInt          `json:"DISK_NUMBER,omitempty"`      // '1'
	DURATION               StringOrInt          `json:"DURATION"`                   // '224'
	EXPLICIT_TRACK_CONTENT ExplicitTrackContent `json:"EXPLICIT_TRACK_CONTENT"`     // Explicit content status
	ISRC                   string               `json:"ISRC"`                       // 'GBDUW0000059'
	LYRICS_ID              int                  `json:"LYRICS_ID"`                  // 2780622
	LYRICS                 *LyricsType          `json:"LYRICS,omitempty"`           // Lyrics information
	EXPLICIT_LYRICS        *StringOrBool        `json:"EXPLICIT_LYRICS,omitempty"`  // Optional explicit lyrics status
	RANK                   string               `json:"RANK"`                       // '787708'
	SMARTRADIO             StringOrInt          `json:"SMARTRADIO"`                 // Can be '0' or 0
	SNG_ID                 string               `json:"SNG_ID"`                     // '3135556'
	SNG_TITLE              string               `json:"SNG_TITLE"`                  // 'Harder, Better, Faster, Stronger'
	SNG_CONTRIBUTORS       *SongContributors    `json:"SNG_CONTRIBUTORS,omitempty"` // Song contributors
	STATUS                 int                  `json:"STATUS"`                     // 3
	S_MOD                  int                  `json:"S_MOD"`                      // 0
	S_PREMIUM              int                  `json:"S_PREMIUM"`                  // 0
	TRACK_NUMBER           StringOrInt          `json:"TRACK_NUMBER"`               // '4'
	URL_REWRITING          string               `json:"URL_REWRITING"`              // 'daft-punk'
	VERSION                *string              `json:"VERSION,omitempty"`          // '(Extended Club Mix Edit)'
	MD5_ORIGIN             string               `json:"MD5_ORIGIN"`                 // '51afcde9f56a132096c0496cc95eb24b'
	FILESIZE_AAC_64        StringOrInt          `json:"FILESIZE_AAC_64"`            // Can be '0' or 0
	FILESIZE_MP3_64        StringOrInt          `json:"FILESIZE_MP3_64"`            // Can be '1798059' or 1798059
	FILESIZE_MP3_128       StringOrInt          `json:"FILESIZE_MP3_128"`           // Can be '3596119' or 3596119
	FILESIZE_MP3_256       StringOrInt          `json:"FILESIZE_MP3_256"`           // Can be '0' or 0
	FILESIZE_MP3_320       StringOrInt          `json:"FILESIZE_MP3_320"`           // Can be '0' or 0
	FILESIZE_MP4_RA1       StringOrInt          `json:"FILESIZE_MP4_RA1"`           // Can be '0' or 0
	FILESIZE_MP4_RA2       StringOrInt          `json:"FILESIZE_MP4_RA2"`           // Can be '0' or 0
	FILESIZE_MP4_RA3       StringOrInt          `json:"FILESIZE_MP4_RA3"`           // Can be '0' or 0
	FILESIZE_FLAC          StringOrInt          `json:"FILESIZE_FLAC"`              // Can be '0' or 0
	FILESIZE               StringOrInt          `json:"FILESIZE"`                   // Can be '3596119' or 3596119
	GAIN                   string               `json:"GAIN"`                       // '-12.4'
	MEDIA_VERSION          string               `json:"MEDIA_VERSION"`              // '8'
	TRACK_TOKEN            string               `json:"TRACK_TOKEN"`                // 'Track Token'
	TRACK_TOKEN_EXPIRE     int                  `json:"TRACK_TOKEN_EXPIRE"`         // 1614065380
	MEDIA                  []MediaType          `json:"MEDIA"`                      // Array of media details
	RIGHTS                 Rights               `json:"RIGHTS"`                     // Rights details
	PROVIDER_ID            string               `json:"PROVIDER_ID"`                // '3'
	Type                   string               `json:"__TYPE__"`                   // 'song'
}

SongType represents detailed information about a song.

type StringOrBool

type StringOrBool bool

func (*StringOrBool) UnmarshalJSON

func (s *StringOrBool) UnmarshalJSON(data []byte) error

type StringOrInt

type StringOrInt int

func (*StringOrInt) UnmarshalJSON

func (s *StringOrInt) UnmarshalJSON(data []byte) error

type TrackDataPublicApi

type TrackDataPublicApi struct {
	ID                    int              `json:"id"`                      // Track ID, e.g., 3135556
	Readable              bool             `json:"readable"`                // Readable status
	Title                 string           `json:"title"`                   // Track title, e.g., 'Harder, Better, Faster, Stronger'
	TitleShort            string           `json:"title_short"`             // Short title, e.g., 'Harder, Better, Faster, Stronger'
	TitleVersion          string           `json:"title_version,omitempty"` // Optional version title
	Link                  string           `json:"link"`                    // Deezer link, e.g., 'https://www.deezer.com/track/3135556'
	Duration              int              `json:"duration"`                // Duration in seconds, e.g., 224
	Rank                  int              `json:"rank"`                    // Track rank, e.g., 956167
	ExplicitLyrics        bool             `json:"explicit_lyrics"`         // Explicit lyrics status
	ExplicitContentLyrics int              `json:"explicit_content_lyrics"` // Explicit content lyrics status
	ExplicitContentCover  int              `json:"explicit_content_cover"`  // Explicit content cover status
	Preview               string           `json:"preview"`                 // Preview link
	MD5Image              string           `json:"md5_image"`               // MD5 hash of the image
	Artist                ArtistDataPublic `json:"artist"`                  // Artist details
	Type                  string           `json:"type"`                    // Type, e.g., 'track'
}

TrackDataPublicApi represents a track's public information from the API.

type TrackDataPublicApiList

type TrackDataPublicApiList struct {
	Data []TrackDataPublicApi `json:"data"` // Array of track data
}

TrackDataPublicApiList represents a list of track data from the public API.

type TrackSearchType

type TrackSearchType struct {
	SearchTypeCommon
	Data []TrackType `json:"data"`
}

type TrackType

type TrackType struct {
	SongType
	FALLBACK       *SongType `json:"FALLBACK,omitempty"`       // Fallback song type
	TRACK_POSITION *int      `json:"TRACK_POSITION,omitempty"` // Track position
}

TrackType represents detailed information about a track including song and fallback data.

type TrackTypePublicAPI

type TrackTypePublicAPI struct {
	ID                    int                     `json:"id"`                      // 3135556
	Readable              bool                    `json:"readable"`                // Readable status
	Title                 string                  `json:"title"`                   // 'Harder, Better, Faster, Stronger'
	TitleShort            string                  `json:"title_short"`             // 'Harder, Better, Faster, Stronger'
	TitleVersion          *string                 `json:"title_version,omitempty"` // Optional version title
	ISRC                  string                  `json:"isrc"`                    // 'GBDUW0000059'
	Link                  string                  `json:"link"`                    // 'https://www.deezer.com/track/3135556'
	Share                 string                  `json:"share"`                   // Share link
	Duration              StringOrInt             `json:"duration"`                // 224
	TrackPosition         int                     `json:"track_position"`          // 4
	DiskNumber            StringOrInt             `json:"disk_number"`             // 1
	Rank                  int                     `json:"rank"`                    // 956167
	ReleaseDate           string                  `json:"release_date"`            // '2001-03-07'
	ExplicitLyrics        *StringOrBool           `json:"explicit_lyrics"`         // Explicit lyrics status
	ExplicitContentLyrics int                     `json:"explicit_content_lyrics"` // Explicit content lyrics status
	ExplicitContentCover  int                     `json:"explicit_content_cover"`  // Explicit content cover status
	Preview               string                  `json:"preview"`                 // Preview link
	BPM                   float64                 `json:"bpm"`                     // 123.4
	Gain                  float64                 `json:"gain"`                    // -12.4
	AvailableCountries    []string                `json:"available_countries"`     // List of available countries
	Contributors          []ContributorsPublicAPI `json:"contributors"`            // List of contributors
	MD5Image              string                  `json:"md5_image"`               // MD5 image hash
	Artist                ContributorsPublicAPI   `json:"artist"`                  // Artist details
	Album                 struct {
		ID          int    `json:"id"`           // 302127
		Title       string `json:"title"`        // 'Discovery'
		Link        string `json:"link"`         // 'https://www.deezer.com/album/302127'
		Cover       string `json:"cover"`        // 'https://api.deezer.com/album/302127/image'
		CoverSmall  string `json:"cover_small"`  // 'https://e-cdns-images.dzcdn.net/images/cover/2e018122cb56986277102d2041a592c8/56x56-000000-80-0-0.jpg'
		CoverMedium string `json:"cover_medium"` // 'https://e-cdns-images.dzcdn.net/images/cover/2e018122cb56986277102d2041a592c8/250x250-000000-80-0-0.jpg'
		CoverBig    string `json:"cover_big"`    // 'https://e-cdns-images.dzcdn.net/images/cover/2e018122cb56986277102d2041a592c8/500x500-000000-80-0-0.jpg'
		CoverXL     string `json:"cover_xl"`     // 'https://e-cdns-images.dzcdn.net/images/cover/2e018122cb56986277102d2041a592c8/1000x1000-000000-80-0-0.jpg'
		MD5Image    string `json:"md5_image"`    // '2e018122cb56986277102d2041a592c8'
		ReleaseDate string `json:"release_date"` // '2001-03-07'
		Tracklist   string `json:"tracklist"`    // 'https://api.deezer.com/album/302127/tracks'
		Type        string `json:"type"`         // 'album'
	} `json:"album"`
	Type string `json:"type"` // 'track'
}

TrackTypePublicAPI represents public API data for a track including details about the album and artist.

type UserProfileType

type UserProfileType struct {
	USER_ID       string `json:"USER_ID"`
	BLOG_NAME     string `json:"BLOG_NAME"`
	SEX           string `json:"SEX,omitempty"`
	COUNTRY       string `json:"COUNTRY"`
	USER_PICTURE  string `json:"USER_PICTURE,omitempty"`
	COUNTRY_NAME  string `json:"COUNTRY_NAME"`
	PRIVATE       bool   `json:"PRIVATE"`
	DISPLAY_NAME  string `json:"DISPLAY_NAME"`
	TYPE_INTERNAL string `json:"__TYPE__"`
}

type UserType

type UserType struct {
	UserID    string  `json:"USER_ID"`
	Email     string  `json:"EMAIL"`
	Firstname string  `json:"FIRSTNAME"`
	Lastname  string  `json:"LASTNAME"`
	Birthday  string  `json:"BIRTHDAY"`
	BlogName  string  `json:"BLOG_NAME"`
	Sex       string  `json:"SEX"`
	Address   *string `json:"ADDRESS,omitempty"`
	City      *string `json:"CITY,omitempty"`
	Zip       *string `json:"ZIP,omitempty"`
	Country   string  `json:"COUNTRY"`
	Lang      string  `json:"LANG"`
	Phone     *string `json:"PHONE,omitempty"`
	Type      string  `json:"__TYPE__"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL