Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultAPIBaseURL = "https://api.spotify.com/v1" RefreshTokenURL = "https://accounts.spotify.com/api/token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { AlbumType string `json:"album_type"` Artists []Artist `json:"artists"` ExternalUrls ExternalUrl `json:"external_urls"` Href string `json:"href"` Id string `json:"id"` Images []Image `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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnqueueSong ¶
func (*Client) GetSongInfo ¶
func (c *Client) GetSongInfo(id string) (resp *SongInfoResponse, err error)
func (*Client) RefreshUserAccessToken ¶
func (c *Client) RefreshUserAccessToken(refreshToken string) (resp *RefreshTokenResponse, err error)
func (*Client) SetUserAccessToken ¶
type ExternalID ¶
type ExternalID struct {
Isrc string `json:"isrc"`
}
type ExternalUrl ¶
type ExternalUrl struct {
Spotify string `json:"spotify"`
}
type RefreshTokenResponse ¶
type SongInfoResponse ¶
type SongInfoResponse struct { Album Album `json:"album"` Artists []Artist `json:"artists"` DiscNumber int `json:"disc_number"` DurationMs int `json:"duration_ms"` Explicit bool `json:"explicit"` ExternalIds ExternalID `json:"external_ids"` ExternalUrls ExternalUrl `json:"external_urls"` Href string `json:"href"` Id string `json:"id"` IsLocal bool `json:"is_local"` Name string `json:"name"` Popularity int `json:"popularity"` TrackNumber int `json:"track_number"` Type string `json:"type"` Uri string `json:"uri"` }
Click to show internal directories.
Click to hide internal directories.