Documentation
¶
Overview ¶
Package bridge defines the stable JSON wire types shared by the native bindings. Keep field order and JSON tags stable: native clients depend on this exact shape.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct {
ID string `json:"id"`
Name string `json:"name"`
Artists []Artist `json:"artists"`
ArtworkURL string `json:"artworkUrl"`
}
Album is an album on the native JSON wire.
func FromAlbums ¶
FromAlbums converts Deezer albums to their native wire representation.
type Artist ¶
Artist is a track or album credit on the native JSON wire.
func FromArtist ¶
FromArtist converts a Deezer artist to its native wire representation.
func FromArtists ¶
FromArtists converts Deezer artists to their native wire representation. It deliberately returns a non-nil empty slice for nil input so JSON remains [] rather than null, matching the original binding implementations.
type ArtistInfo ¶
type ArtistInfo struct {
ID string `json:"id"`
Name string `json:"name"`
ArtworkURL string `json:"artworkUrl"`
NbFans int `json:"nbFans"`
}
ArtistInfo is an artist search result or profile on the native JSON wire.
func FromArtistInfo ¶
func FromArtistInfo(artist deezer.ArtistInfo) ArtistInfo
FromArtistInfo converts Deezer artist information to its native wire representation.
func FromArtistInfos ¶
func FromArtistInfos(artists []deezer.ArtistInfo) []ArtistInfo
FromArtistInfos converts Deezer artist information to its native wire representation.
type Episode ¶
type Episode struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
ArtworkURL string `json:"artworkUrl"`
DurationMS int64 `json:"durationMs"`
ReleaseDate string `json:"releaseDate"`
PodcastName string `json:"podcastName"`
}
Episode is a podcast episode on the native JSON wire.
func FromEpisode ¶
FromEpisode converts a Deezer podcast episode to its native wire representation.
func FromEpisodes ¶
FromEpisodes converts Deezer podcast episodes to their native wire representation.
type Playlist ¶
type Playlist struct {
ID string `json:"id"`
Name string `json:"name"`
Owner string `json:"owner"`
TrackCount int `json:"trackCount"`
ArtworkURL string `json:"artworkUrl"`
}
Playlist is a playlist on the native JSON wire.
func FromPlaylist ¶
FromPlaylist converts a Deezer playlist to its native wire representation.
func FromPlaylists ¶
FromPlaylists converts Deezer playlists to their native wire representation.
type Podcast ¶
type Podcast struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ArtworkURL string `json:"artworkUrl"`
EpisodeCount int `json:"episodeCount"`
}
Podcast is a podcast on the native JSON wire.
func FromPodcast ¶
FromPodcast converts a Deezer podcast to its native wire representation.
func FromPodcasts ¶
FromPodcasts converts Deezer podcasts to their native wire representation.
type Track ¶
type Track struct {
ID string `json:"id"`
Name string `json:"name"`
DurationMS int64 `json:"durationMs"`
Artists []Artist `json:"artists"`
ArtistLine string `json:"artistLine"`
ArtistID string `json:"artistId,omitempty"`
AlbumName string `json:"albumName"`
ArtworkURL string `json:"artworkUrl"`
Explicit bool `json:"explicit"`
}
Track is a track on the native JSON wire.
func FromTracks ¶
FromTracks converts Deezer tracks to their native wire representation.