Documentation
¶
Index ¶
- type APIResponse
- type DTOArtist
- type DTOFavTracksSnapshot
- type DTOPlaylist
- type DTOPlaylistSnapshot
- type DTOTrack
- type ErrorViewData
- type FavTracksSnapshot
- type PlaylistSnapshot
- type PlaylistsSnapshot
- type SpAPIError
- type SpAddedBy
- type SpAddedTrack
- type SpAlbum
- type SpArtist
- type SpError
- type SpExplicitContentOptions
- type SpExternalIds
- type SpExternalUrls
- type SpGetCurrentPlaylistsResp
- type SpGetPlaylistTracksResp
- type SpGetSavedTracksResp
- type SpImage
- type SpLoginError
- type SpPlaylist
- type SpPlaylistTrack
- type SpResponse
- type SpTrack
- type SpTracks
- type SpURL
- type SpUser
- type SpUserFollowers
- type SpVideoThumbnail
- type SpotifyAuthOptions
- type User
- type ViewData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type DTOArtist ¶
type DTOArtist struct {
Name string `json:"name"`
Type string `json:"type"`
Href string `json:"href"`
}
func SpArtist2dtoArtist ¶
func SpArtists2dtoArtists ¶
type DTOFavTracksSnapshot ¶
type DTOPlaylist ¶
type DTOPlaylist struct {
URI string `json:"uri"`
ID string `json:"id"`
Name string `json:"name"`
TracksHref string `json:"tracksHref"`
Tracks []DTOTrack `json:"tracks"`
}
func SpPlaylist2dtoPlaylist ¶
func SpPlaylist2dtoPlaylist(spPlaylist SpPlaylist, tracks []SpPlaylistTrack) DTOPlaylist
type DTOPlaylistSnapshot ¶
type DTOPlaylistSnapshot struct {
Timestamp int64 `json:"timestamp"`
Playlists []DTOPlaylist `json:"playlists"`
}
type DTOTrack ¶
type DTOTrack struct {
AddedAt int64 `json:"added_at"`
AddedBy string `json:"added_by"`
Artists []DTOArtist `json:"artists"`
Album string `json:"album"`
URI string `json:"uri"`
ID string `json:"id"`
TrackNumber int `json:"track_number"`
DurationMs int `json:"duration_ms"`
Name string `json:"name"`
}
func SpAddedTrack2dtoTrack ¶
func SpAddedTrack2dtoTrack(spAddedTrack SpAddedTrack) DTOTrack
func SpPlaylistTrack2dtoPlaylistTrack ¶
func SpPlaylistTrack2dtoPlaylistTrack(spPlTrack SpPlaylistTrack) DTOTrack
func SpTrack2dtoTrack ¶
type ErrorViewData ¶
type FavTracksSnapshot ¶
type FavTracksSnapshot struct {
Username string `json:"username"`
Timestamp time.Time `json:"timestamp"`
Tracks []SpAddedTrack `json:"tracks"`
}
FavTracksSnapshot is an object representing the list of favorite saved tracks of a user
type PlaylistSnapshot ¶
type PlaylistSnapshot struct {
Playlist SpPlaylist `json:"playlist"`
Tracks []SpPlaylistTrack `json:"tracks"`
}
type PlaylistsSnapshot ¶
type PlaylistsSnapshot struct {
Username string `json:"username"`
Timestamp time.Time `json:"timestamp"`
Playlists []PlaylistSnapshot `json:"playlists"`
}
PlaylistsSnapshot is an object representing the playlist snapshot in time
type SpAPIError ¶
type SpAPIError struct {
Error SpError `json:"error"`
}
type SpAddedBy ¶
type SpAddedBy struct {
ExternalUrls SpExternalUrls `json:"external_urls"`
Href string `json:"href"`
ID string `json:"id"`
Type string `json:"type"`
URI string `json:"uri"`
}
type SpAddedTrack ¶
type SpAlbum ¶
type SpAlbum struct {
AlbumType string `json:"album_type"`
Artists []SpArtist `json:"artists"`
AvailableMarkets []string `json:"available_markets"`
ExternalUrls SpURL `json:"external_urls"`
Href string `json:"href"`
ID string `json:"id"`
Images []SpImage `json:"images"`
Name string `json:"name"`
ReleaseDate string `json:"release_date"`
ReleaseDatePrecision string `json:"release_date_precision"`
TotalTracks int `json:"total_tracks"`
Type string `json:"type"`
URI string `json:"uri"`
}
type SpExternalIds ¶
type SpExternalIds struct {
Isrc string `json:"isrc"`
}
type SpExternalUrls ¶
type SpExternalUrls struct {
Spotify string `json:"spotify"`
}
type SpGetCurrentPlaylistsResp ¶
type SpGetCurrentPlaylistsResp struct {
SpResponse
Items []SpPlaylist `json:"items"`
}
type SpGetPlaylistTracksResp ¶
type SpGetPlaylistTracksResp struct {
SpResponse
Items []SpPlaylistTrack `json:"items"`
}
type SpGetSavedTracksResp ¶
type SpGetSavedTracksResp struct {
SpResponse
Items []SpAddedTrack `json:"items"`
}
type SpLoginError ¶
type SpPlaylist ¶
type SpPlaylist struct {
Collaborative bool `json:"collaborative"`
ExternalUrls SpURL `json:"external_urls"`
Href string `json:"href"`
ID string `json:"id"`
Images []SpImage `json:"images"`
Name string `json:"name"`
Owner SpUser `json:"owner"`
PrimaryColor interface{} `json:"primary_color"`
Public bool `json:"public"`
SnapshotID string `json:"snapshot_id"`
Tracks SpTracks `json:"tracks"`
Type string `json:"type"`
URI string `json:"uri"`
}
type SpPlaylistTrack ¶
type SpResponse ¶
type SpTrack ¶
type SpTrack struct {
Album SpAlbum `json:"album"`
Artists []SpArtist `json:"artists"`
AvailableMarkets []string `json:"available_markets"`
DiscNumber int `json:"disc_number"`
DurationMs int `json:"duration_ms"`
Explicit bool `json:"explicit"`
ExternalIds SpExternalIds `json:"external_ids"`
ExternalUrls SpURL `json:"external_urls"`
Href string `json:"href"`
ID string `json:"id"`
IsLocal bool `json:"is_local"`
Name string `json:"name"`
Popularity int `json:"popularity"`
PreviewURL string `json:"preview_url"`
TrackNumber int `json:"track_number"`
Type string `json:"type"`
URI string `json:"uri"`
}
type SpUser ¶
type SpUser struct {
Birthdate string `json:"birthdate"`
Country string `json:"country"`
DisplayName string `json:"display_name"`
Email string `json:"email"`
ExplicitContent SpExplicitContentOptions `json:"explicit_content"`
ExternalUrls SpURL `json:"external_urls"`
Followers SpUserFollowers `json:"followers"`
Href string `json:"href"`
ID string `json:"id"`
Images []SpImage `json:"images"`
Product string `json:"product"`
Type string `json:"type"`
URI string `json:"uri"`
}
type SpUserFollowers ¶
type SpVideoThumbnail ¶
type SpVideoThumbnail struct {
URL interface{} `json:"url"`
}
type SpotifyAuthOptions ¶
type SpotifyAuthOptions struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
Scope string `json:"scope"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
}
SpotifyAuthOptions is: https://developer.spotify.com/documentation/general/guides/authorization-guide/
func (SpotifyAuthOptions) String ¶
func (ao SpotifyAuthOptions) String() string
type User ¶
type User struct {
Username string
Auth *SpotifyAuthOptions
}
User is an object representing the user of this service, not Spotify
Click to show internal directories.
Click to hide internal directories.