Versions in this module Expand all Collapse all v0 v0.0.2 Jul 21, 2020 Changes in this version + const AuthURL + const CountryArgentina + const CountryAustralia + const CountryAustria + const CountryBelarus + const CountryBelgium + const CountryBrazil + const CountryCanada + const CountryChile + const CountryChina + const CountryFinland + const CountryFrance + const CountryGermany + const CountryHongKong + const CountryIndia + const CountryIreland + const CountryItaly + const CountryJapan + const CountryMexico + const CountryNewZealand + const CountryRussia + const CountrySpain + const CountrySwitzerland + const CountryUSA + const CountryUnitedArabEmirates + const CountryUnitedKingdom + const DateLayout + const MarketFromToken + const MaxNumberOfSeeds + const ScopeImageUpload + const ScopePlaylistModifyPrivate + const ScopePlaylistModifyPublic + const ScopePlaylistReadCollaborative + const ScopePlaylistReadPrivate + const ScopeStreaming + const ScopeUserFollowModify + const ScopeUserFollowRead + const ScopeUserLibraryModify + const ScopeUserLibraryRead + const ScopeUserModifyPlaybackState + const ScopeUserReadCurrentlyPlaying + const ScopeUserReadEmail + const ScopeUserReadPlaybackState + const ScopeUserReadPrivate + const ScopeUserReadRecentlyPlayed + const ScopeUserTopRead + const SearchTypeAlbum + const SearchTypeArtist + const SearchTypePlaylist + const SearchTypeTrack + const TimestampLayout + const TokenURL + const Version + var ErrNoMorePages = errors.New("spotify: no more pages") + type AlbumType int + const AlbumTypeAlbum + const AlbumTypeAppearsOn + const AlbumTypeCompilation + const AlbumTypeSingle + type AnalysisMeta struct + AnalysisTime float64 + AnalyzerVersion string + DetailedStatus string + InputProcess string + Platform string + StatusCode int + Timestamp int64 + type AnalysisTrack struct + AnalysisChannels int + AnalysisSampleRate int64 + CodeString string + CodeVersion float64 + Duration float64 + EchoprintString string + EchoprintVersion float64 + EndOfFadeIn float64 + Key Key + KeyConfidence float64 + Loudness float64 + Mode Mode + ModeConfidence float64 + NumSamples int64 + OffsetSeconds int + RhythmString string + RhythmVersion float64 + SampleMD5 string + StartOfFadeOut float64 + SynchString string + SynchVersion float64 + Tempo float64 + TempoConfidence float64 + TimeSignature int + TimeSignatureConfidence float64 + WindowSeconds int + type AudioAnalysis struct + Bars []Marker + Beats []Marker + Meta AnalysisMeta + Sections []Section + Segments []Segment + Tatums []Marker + Track AnalysisTrack + type AudioFeatures struct + Acousticness float32 + AnalysisURL string + Danceability float32 + Duration int + Energy float32 + ID ID + Instrumentalness float32 + Key int + Liveness float32 + Loudness float32 + Mode int + Speechiness float32 + Tempo float32 + TimeSignature int + TrackURL string + URI URI + Valence float32 + type Authenticator struct + func NewAuthenticator(redirectURL string, scopes ...string) Authenticator + func (a *Authenticator) SetAuthInfo(clientID, secretKey string) + func (a Authenticator) AuthURL(state string) string + func (a Authenticator) AuthURLWithDialog(state string) string + func (a Authenticator) Exchange(code string) (*oauth2.Token, error) + func (a Authenticator) NewClient(token *oauth2.Token) Client + func (a Authenticator) Token(state string, r *http.Request) (*oauth2.Token, error) + type Category struct + Endpoint string + ID string + Icons []Image + Name string + type CategoryPage struct + Categories []Category + type Client struct + AutoRetry bool + func NewClient(client *http.Client) Client + func (c *Client) AddTracksToLibrary(ids ...ID) error + func (c *Client) AddTracksToPlaylist(playlistID ID, trackIDs ...ID) (snapshotID string, err error) + func (c *Client) ChangePlaylistAccess(playlistID ID, public bool) error + func (c *Client) ChangePlaylistDescription(playlistID ID, newDescription string) error + func (c *Client) ChangePlaylistName(playlistID ID, newName string) error + func (c *Client) ChangePlaylistNameAccessAndDescription(playlistID ID, newName, newDescription string, public bool) error + func (c *Client) ChangePlaylistNameAndAccess(playlistID ID, newName string, public bool) error + func (c *Client) CreatePlaylistForUser(userID, playlistName, description string, public bool) (*FullPlaylist, error) + func (c *Client) CurrentUser() (*PrivateUser, error) + func (c *Client) CurrentUserFollows(t string, ids ...ID) ([]bool, error) + func (c *Client) CurrentUsersAlbums() (*SavedAlbumPage, error) + func (c *Client) CurrentUsersAlbumsOpt(opt *Options) (*SavedAlbumPage, error) + func (c *Client) CurrentUsersFollowedArtists() (*FullArtistCursorPage, error) + func (c *Client) CurrentUsersFollowedArtistsOpt(limit int, after string) (*FullArtistCursorPage, error) + func (c *Client) CurrentUsersPlaylists() (*SimplePlaylistPage, error) + func (c *Client) CurrentUsersPlaylistsOpt(opt *Options) (*SimplePlaylistPage, error) + func (c *Client) CurrentUsersShows() (*SavedShowPage, error) + func (c *Client) CurrentUsersShowsOpt(opt *Options) (*SavedShowPage, error) + func (c *Client) CurrentUsersTopArtists() (*FullArtistPage, error) + func (c *Client) CurrentUsersTopArtistsOpt(opt *Options) (*FullArtistPage, error) + func (c *Client) CurrentUsersTopTracks() (*FullTrackPage, error) + func (c *Client) CurrentUsersTopTracksOpt(opt *Options) (*FullTrackPage, error) + func (c *Client) CurrentUsersTracks() (*SavedTrackPage, error) + func (c *Client) CurrentUsersTracksOpt(opt *Options) (*SavedTrackPage, error) + func (c *Client) FeaturedPlaylists() (message string, playlists *SimplePlaylistPage, e error) + func (c *Client) FeaturedPlaylistsOpt(opt *PlaylistOptions) (message string, playlists *SimplePlaylistPage, e error) + func (c *Client) FollowArtist(ids ...ID) error + func (c *Client) FollowPlaylist(owner ID, playlist ID, public bool) error + func (c *Client) FollowUser(ids ...ID) error + func (c *Client) GetAlbum(id ID) (*FullAlbum, error) + func (c *Client) GetAlbumTracks(id ID) (*SimpleTrackPage, error) + func (c *Client) GetAlbumTracksOpt(id ID, limit, offset int) (*SimpleTrackPage, error) + func (c *Client) GetAlbums(ids ...ID) ([]*FullAlbum, error) + func (c *Client) GetArtist(id ID) (*FullArtist, error) + func (c *Client) GetArtistAlbums(artistID ID) (*SimpleAlbumPage, error) + func (c *Client) GetArtistAlbumsOpt(artistID ID, options *Options, ts ...AlbumType) (*SimpleAlbumPage, error) + func (c *Client) GetArtists(ids ...ID) ([]*FullArtist, error) + func (c *Client) GetArtistsTopTracks(artistID ID, country string) ([]FullTrack, error) + func (c *Client) GetAudioAnalysis(id ID) (*AudioAnalysis, error) + func (c *Client) GetAudioFeatures(ids ...ID) ([]*AudioFeatures, error) + func (c *Client) GetAvailableGenreSeeds() ([]string, error) + func (c *Client) GetCategories() (*CategoryPage, error) + func (c *Client) GetCategoriesOpt(opt *Options, locale string) (*CategoryPage, error) + func (c *Client) GetCategory(id string) (Category, error) + func (c *Client) GetCategoryOpt(id, country, locale string) (Category, error) + func (c *Client) GetCategoryPlaylists(catID string) (*SimplePlaylistPage, error) + func (c *Client) GetCategoryPlaylistsOpt(catID string, opt *Options) (*SimplePlaylistPage, error) + func (c *Client) GetPlaylist(playlistID ID) (*FullPlaylist, error) + func (c *Client) GetPlaylistOpt(playlistID ID, fields string) (*FullPlaylist, error) + func (c *Client) GetPlaylistTracks(playlistID ID) (*PlaylistTrackPage, error) + func (c *Client) GetPlaylistTracksOpt(playlistID ID, opt *Options, fields string) (*PlaylistTrackPage, error) + func (c *Client) GetPlaylistsForUser(userID string) (*SimplePlaylistPage, error) + func (c *Client) GetPlaylistsForUserOpt(userID string, opt *Options) (*SimplePlaylistPage, error) + func (c *Client) GetRecommendations(seeds Seeds, trackAttributes *TrackAttributes, opt *Options) (*Recommendations, error) + func (c *Client) GetRelatedArtists(id ID) ([]FullArtist, error) + func (c *Client) GetTrack(id ID) (*FullTrack, error) + func (c *Client) GetTracks(ids ...ID) ([]*FullTrack, error) + func (c *Client) GetUsersPublicProfile(userID ID) (*User, error) + func (c *Client) NewReleases() (albums *SimpleAlbumPage, err error) + func (c *Client) NewReleasesOpt(opt *Options) (albums *SimpleAlbumPage, err error) + func (c *Client) Next() error + func (c *Client) NextAlbumResults(s *SearchResult) error + func (c *Client) NextArtistResults(s *SearchResult) error + func (c *Client) NextOpt(opt *PlayOptions) error + func (c *Client) NextPage(p pageable) error + func (c *Client) NextPlaylistResults(s *SearchResult) error + func (c *Client) NextTrackResults(s *SearchResult) error + func (c *Client) Pause() error + func (c *Client) PauseOpt(opt *PlayOptions) error + func (c *Client) Play() error + func (c *Client) PlayOpt(opt *PlayOptions) error + func (c *Client) PlayerCurrentlyPlaying() (*CurrentlyPlaying, error) + func (c *Client) PlayerCurrentlyPlayingOpt(opt *Options) (*CurrentlyPlaying, error) + func (c *Client) PlayerDevices() ([]PlayerDevice, error) + func (c *Client) PlayerRecentlyPlayed() ([]RecentlyPlayedItem, error) + func (c *Client) PlayerRecentlyPlayedOpt(opt *RecentlyPlayedOptions) ([]RecentlyPlayedItem, error) + func (c *Client) PlayerState() (*PlayerState, error) + func (c *Client) PlayerStateOpt(opt *Options) (*PlayerState, error) + func (c *Client) Previous() error + func (c *Client) PreviousAlbumResults(s *SearchResult) error + func (c *Client) PreviousArtistResults(s *SearchResult) error + func (c *Client) PreviousOpt(opt *PlayOptions) error + func (c *Client) PreviousPage(p pageable) error + func (c *Client) PreviousPlaylistResults(s *SearchResult) error + func (c *Client) PreviousTrackResults(s *SearchResult) error + func (c *Client) QueueSong(trackID ID) error + func (c *Client) QueueSongOpt(trackID ID, opt *PlayOptions) error + func (c *Client) RemoveTracksFromLibrary(ids ...ID) error + func (c *Client) RemoveTracksFromPlaylist(playlistID ID, trackIDs ...ID) (newSnapshotID string, err error) + func (c *Client) RemoveTracksFromPlaylistOpt(playlistID ID, tracks []TrackToRemove, snapshotID string) (newSnapshotID string, err error) + func (c *Client) ReorderPlaylistTracks(playlistID ID, opt PlaylistReorderOptions) (snapshotID string, err error) + func (c *Client) Repeat(state string) error + func (c *Client) RepeatOpt(state string, opt *PlayOptions) error + func (c *Client) ReplacePlaylistTracks(playlistID ID, trackIDs ...ID) error + func (c *Client) Search(query string, t SearchType) (*SearchResult, error) + func (c *Client) SearchOpt(query string, t SearchType, opt *Options) (*SearchResult, error) + func (c *Client) Seek(position int) error + func (c *Client) SeekOpt(position int, opt *PlayOptions) error + func (c *Client) SetPlaylistImage(playlistID ID, img io.Reader) error + func (c *Client) Shuffle(shuffle bool) error + func (c *Client) ShuffleOpt(shuffle bool, opt *PlayOptions) error + func (c *Client) Token() (*oauth2.Token, error) + func (c *Client) TransferPlayback(deviceID ID, play bool) error + func (c *Client) UnfollowArtist(ids ...ID) error + func (c *Client) UnfollowPlaylist(owner, playlist ID) error + func (c *Client) UnfollowUser(ids ...ID) error + func (c *Client) UserFollowsPlaylist(playlistID ID, userIDs ...string) ([]bool, error) + func (c *Client) UserHasTracks(ids ...ID) ([]bool, error) + func (c *Client) Volume(percent int) error + func (c *Client) VolumeOpt(percent int, opt *PlayOptions) error + type Copyright struct + Text string + Type string + type CurrentlyPlaying struct + Item *FullTrack + PlaybackContext PlaybackContext + Playing bool + Progress int + Timestamp int64 + type Cursor struct + After string + type EpisodePage struct + AudioPreviewURL string + Description string + Duration_ms int + Explicit bool + ExternalURLs map[string]string + Href string + ID ID + Images []Image + IsExternallyHosted bool + IsPlayable bool + Languages []string + Name string + ReleaseDate string + ReleaseDatePrecision string + ResumePoint ResumePointObject + Show SimpleShow + Type string + URI URI + func (e *EpisodePage) ReleaseDateTime() time.Time + type Error struct + Message string + Status int + func (e Error) Error() string + type Followers struct + Count uint + Endpoint string + type FullAlbum struct + Copyrights []Copyright + ExternalIDs map[string]string + Genres []string + Popularity int + Tracks SimpleTrackPage + type FullArtist struct + Followers Followers + Genres []string + Images []Image + Popularity int + type FullArtistCursorPage struct + Artists []FullArtist + type FullArtistPage struct + Artists []FullArtist + type FullPlaylist struct + Description string + Followers Followers + Tracks PlaylistTrackPage + type FullShow struct + Episodes EpisodePage + type FullTrack struct + Album SimpleAlbum + ExternalIDs map[string]string + Popularity int + type FullTrackPage struct + Tracks []FullTrack + type ID string + func (id *ID) String() string + type Image struct + Height int + URL string + Width int + func (i Image) Download(dst io.Writer) error + type Key int + const A + const AFlat + const ASharp + const B + const BFlat + const C + const CSharp + const D + const DFlat + const DSharp + const E + const EFlat + const F + const FSharp + const G + const GFlat + const GSharp + type Marker struct + Confidence float64 + Duration float64 + Start float64 + type Mode int + const Major + const Minor + type Options struct + Country *string + Limit *int + Offset *int + Timerange *string + type PlayOptions struct + DeviceID *ID + PlaybackContext *URI + PlaybackOffset *PlaybackOffset + PositionMs int + URIs []URI + type PlaybackContext struct + Endpoint string + ExternalURLs map[string]string + Type string + URI URI + type PlaybackOffset struct + Position int + URI URI + type PlayerDevice struct + Active bool + ID ID + Name string + Restricted bool + Type string + Volume int + type PlayerState struct + Device PlayerDevice + RepeatState string + ShuffleState bool + type PlaylistOptions struct + Locale *string + Timestamp *string + type PlaylistReorderOptions struct + InsertBefore int + RangeLength int + RangeStart int + SnapshotID string + type PlaylistTrack struct + AddedAt string + AddedBy User + IsLocal bool + Track FullTrack + type PlaylistTrackPage struct + Tracks []PlaylistTrack + type PlaylistTracks struct + Endpoint string + Total uint + type PrivateUser struct + Birthdate string + Country string + Email string + Product string + type RecentlyPlayedItem struct + PlaybackContext PlaybackContext + PlayedAt time.Time + Track SimpleTrack + type RecentlyPlayedOptions struct + AfterEpochMs int64 + BeforeEpochMs int64 + Limit int + type RecentlyPlayedResult struct + Items []RecentlyPlayedItem + type RecommendationSeed struct + AfterFilteringSize int + AfterRelinkingSize int + Endpoint string + ID ID + InitialPoolSize int + Type string + type Recommendations struct + Seeds []RecommendationSeed + Tracks []SimpleTrack + type ResumePointObject struct + FullyPlayed bool + ResumePositionMs int + type SavedAlbum struct + AddedAt string + type SavedAlbumPage struct + Albums []SavedAlbum + type SavedShow struct + AddedAt string + type SavedShowPage struct + Shows []SavedShow + type SavedTrack struct + AddedAt string + type SavedTrackPage struct + Tracks []SavedTrack + type SearchResult struct + Albums *SimpleAlbumPage + Artists *FullArtistPage + Playlists *SimplePlaylistPage + Tracks *FullTrackPage + type SearchType int + type Section struct + Key Key + KeyConfidence float64 + Loudness float64 + Mode Mode + ModeConfidence float64 + Tempo float64 + TempoConfidence float64 + TimeSignature int + TimeSignatureConfidence float64 + type Seeds struct + Artists []ID + Genres []string + Tracks []ID + type Segment struct + LoudnessEnd float64 + LoudnessMax float64 + LoudnessMaxTime float64 + LoudnessStart float64 + Pitches []float64 + Timbre []float64 + type SimpleAlbum struct + AlbumGroup string + AlbumType string + Artists []SimpleArtist + AvailableMarkets []string + Endpoint string + ExternalURLs map[string]string + ID ID + Images []Image + Name string + ReleaseDate string + ReleaseDatePrecision string + URI URI + func (s *SimpleAlbum) ReleaseDateTime() time.Time + type SimpleAlbumPage struct + Albums []SimpleAlbum + type SimpleArtist struct + Endpoint string + ExternalURLs map[string]string + ID ID + Name string + URI URI + type SimplePlaylist struct + Collaborative bool + Endpoint string + ExternalURLs map[string]string + ID ID + Images []Image + IsPublic bool + Name string + Owner User + SnapshotID string + Tracks PlaylistTracks + URI URI + type SimplePlaylistPage struct + Playlists []SimplePlaylist + type SimpleShow struct + AvailableMarkets []string + Copyrights []Copyright + Description string + Explicit bool + ExternalURLs map[string]string + Href string + ID ID + Images []Image + IsExternallyHosted *bool + Languages []string + MediaType string + Name string + Publisher string + Type string + URI URI + type SimpleTrack struct + Artists []SimpleArtist + AvailableMarkets []string + DiscNumber int + Duration int + Endpoint string + Explicit bool + ExternalURLs map[string]string + ID ID + Name string + PreviewURL string + TrackNumber int + URI URI + func (st SimpleTrack) String() string + func (t *SimpleTrack) TimeDuration() time.Duration + type SimpleTrackPage struct + Tracks []SimpleTrack + type TrackAttributes struct + func NewTrackAttributes() *TrackAttributes + func (ta *TrackAttributes) MaxAcousticness(acousticness float64) *TrackAttributes + func (ta *TrackAttributes) MaxDanceability(danceability float64) *TrackAttributes + func (ta *TrackAttributes) MaxDuration(duration int) *TrackAttributes + func (ta *TrackAttributes) MaxEnergy(energy float64) *TrackAttributes + func (ta *TrackAttributes) MaxInstrumentalness(instrumentalness float64) *TrackAttributes + func (ta *TrackAttributes) MaxKey(key int) *TrackAttributes + func (ta *TrackAttributes) MaxLiveness(liveness float64) *TrackAttributes + func (ta *TrackAttributes) MaxLoudness(loudness float64) *TrackAttributes + func (ta *TrackAttributes) MaxMode(mode int) *TrackAttributes + func (ta *TrackAttributes) MaxPopularity(popularity int) *TrackAttributes + func (ta *TrackAttributes) MaxSpeechiness(speechiness float64) *TrackAttributes + func (ta *TrackAttributes) MaxTempo(tempo float64) *TrackAttributes + func (ta *TrackAttributes) MaxTimeSignature(timeSignature int) *TrackAttributes + func (ta *TrackAttributes) MaxValence(valence float64) *TrackAttributes + func (ta *TrackAttributes) MinAcousticness(acousticness float64) *TrackAttributes + func (ta *TrackAttributes) MinDanceability(danceability float64) *TrackAttributes + func (ta *TrackAttributes) MinDuration(duration int) *TrackAttributes + func (ta *TrackAttributes) MinEnergy(energy float64) *TrackAttributes + func (ta *TrackAttributes) MinInstrumentalness(instrumentalness float64) *TrackAttributes + func (ta *TrackAttributes) MinKey(key int) *TrackAttributes + func (ta *TrackAttributes) MinLiveness(liveness float64) *TrackAttributes + func (ta *TrackAttributes) MinLoudness(loudness float64) *TrackAttributes + func (ta *TrackAttributes) MinMode(mode int) *TrackAttributes + func (ta *TrackAttributes) MinPopularity(popularity int) *TrackAttributes + func (ta *TrackAttributes) MinSpeechiness(speechiness float64) *TrackAttributes + func (ta *TrackAttributes) MinTempo(tempo float64) *TrackAttributes + func (ta *TrackAttributes) MinTimeSignature(timeSignature int) *TrackAttributes + func (ta *TrackAttributes) MinValence(valence float64) *TrackAttributes + func (ta *TrackAttributes) TargetAcousticness(acousticness float64) *TrackAttributes + func (ta *TrackAttributes) TargetDanceability(danceability float64) *TrackAttributes + func (ta *TrackAttributes) TargetDuration(duration int) *TrackAttributes + func (ta *TrackAttributes) TargetEnergy(energy float64) *TrackAttributes + func (ta *TrackAttributes) TargetInstrumentalness(instrumentalness float64) *TrackAttributes + func (ta *TrackAttributes) TargetKey(key int) *TrackAttributes + func (ta *TrackAttributes) TargetLiveness(liveness float64) *TrackAttributes + func (ta *TrackAttributes) TargetLoudness(loudness float64) *TrackAttributes + func (ta *TrackAttributes) TargetMode(mode int) *TrackAttributes + func (ta *TrackAttributes) TargetPopularity(popularity int) *TrackAttributes + func (ta *TrackAttributes) TargetSpeechiness(speechiness float64) *TrackAttributes + func (ta *TrackAttributes) TargetTempo(tempo float64) *TrackAttributes + func (ta *TrackAttributes) TargetTimeSignature(timeSignature int) *TrackAttributes + func (ta *TrackAttributes) TargetValence(valence float64) *TrackAttributes + type TrackToRemove struct + Positions []int + URI string + func NewTrackToRemove(trackID string, positions []int) TrackToRemove + type URI string + type User struct + DisplayName string + Endpoint string + ExternalURLs map[string]string + Followers Followers + ID string + Images []Image + URI URI