Documentation ¶
Index ¶
Constants ¶
View Source
const (
APIEndPoint = "https://api.deezer.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ajax ¶ added in v0.18.0
type Ajax struct { Error []interface{} `json:"error"` Results struct { Count int `json:"count"` Data []struct { Duration string `json:"DURATION"` DiskNumber string `json:"DISK_NUMBER"` DigitalReleaseDate string `json:"DIGITAL_RELEASE_DATE"` PhysicalReleaseDate string `json:"PHYSICAL_RELEASE_DATE"` ArtistName string `json:"ART_NAME"` AlbumID string `json:"ALB_ID"` AlbumPicture string `json:"ALB_PICTURE"` AlbumTitle string `json:"ALB_TITLE"` Md5 string `json:"MD5_ORIGIN"` SongID string `json:"SNG_ID"` SongTitle string `json:"SNG_TITLE"` Version string `json:"VERSION"` SongContributors SongContributors `json:"SNG_CONTRIBUTORS,omitempty"` Status int `json:"STATUS"` TrackNumber string `json:"TRACK_NUMBER"` FlacSize string `json:"FILESIZE_FLAC"` Type int `json:"TYPE"` UserID int `json:"USER_ID"` MediaVersion string `json:"MEDIA_VERSION"` TYPE2 string `json:"__TYPE__"` ISRC string `json:"ISRC"` } `json:"data"` FilteredCount int `json:"filtered_count"` Total int `json:"total"` } `json:"results"` }
type Deezer ¶
type Deezer struct { SidCookie string Client *http.Client // contains filtered or unexported fields }
Deezer structure for querying its API
func (*Deezer) GetAjaxAlbumInfo ¶ added in v0.21.0
func (*Deezer) GetRelease ¶ added in v0.18.0
GetRelease from the API. Returns the complete response.
type Release ¶ added in v0.18.0
type Release struct { Artist struct { ID int `json:"id"` Name string `json:"name"` Picture string `json:"picture"` PictureBig string `json:"picture_big"` PictureMedium string `json:"picture_medium"` PictureSmall string `json:"picture_small"` PictureXl string `json:"picture_xl"` Tracklist string `json:"tracklist"` Type string `json:"type"` } `json:"artist"` Available bool `json:"available"` Contributors []struct { ID int `json:"id"` Link string `json:"link"` Name string `json:"name"` Picture string `json:"picture"` PictureBig string `json:"picture_big"` PictureMedium string `json:"picture_medium"` PictureSmall string `json:"picture_small"` PictureXl string `json:"picture_xl"` Radio bool `json:"radio"` Role string `json:"role"` Share string `json:"share"` Tracklist string `json:"tracklist"` Type string `json:"type"` } `json:"contributors"` Cover string `json:"cover"` CoverBig string `json:"cover_big"` CoverMedium string `json:"cover_medium"` CoverSmall string `json:"cover_small"` CoverXl string `json:"cover_xl"` Duration int `json:"duration"` ExplicitContentCover int `json:"explicit_content_cover"` ExplicitContentLyrics int `json:"explicit_content_lyrics"` ExplicitLyrics bool `json:"explicit_lyrics"` Fans int `json:"fans"` GenreID int `json:"genre_id"` Genres struct { Data []struct { ID int `json:"id"` Name string `json:"name"` Picture string `json:"picture"` Type string `json:"type"` } `json:"data"` } `json:"genres"` ID int `json:"id"` Label string `json:"label"` Link string `json:"link"` NbTracks int `json:"nb_tracks"` Rating int `json:"rating"` RecordType string `json:"record_type"` ReleaseDate string `json:"release_date"` Title string `json:"title"` Tracklist string `json:"tracklist"` Tracks struct { Data []struct { Artist struct { ID int `json:"id"` Name string `json:"name"` Tracklist string `json:"tracklist"` Type string `json:"type"` } `json:"artist"` Duration int `json:"duration"` ExplicitContentCover int `json:"explicit_content_cover"` ExplicitContentLyrics int `json:"explicit_content_lyrics"` ExplicitLyrics bool `json:"explicit_lyrics"` ID int `json:"id"` Link string `json:"link"` Preview string `json:"preview"` Rank int `json:"rank"` Readable bool `json:"readable"` Title string `json:"title"` TitleShort string `json:"title_short"` TitleVersion string `json:"title_version"` Type string `json:"type"` } `json:"data"` } `json:"tracks"` Type string `json:"type"` Upc string `json:"upc"` }
func (*Release) ReleaseYear ¶ added in v0.18.0
type SongContributors ¶ added in v0.21.4
SongContributors is defined because the response is either a map, or an empty slice.
func (*SongContributors) UnmarshalJSON ¶ added in v0.21.4
func (w *SongContributors) UnmarshalJSON(data []byte) error
UnmarshalJSON allows to unmarshall JSON with an empty slice as contributors, without throwing errors. Instead, the song contributors return an empty map.
Click to show internal directories.
Click to hide internal directories.