Versions in this module Expand all Collapse all v1 v1.0.2 Mar 12, 2024 v1.0.1 Mar 11, 2024 v1.0.0 Mar 11, 2024 v0 v0.0.1 Mar 11, 2024 Changes in this version + type Actions struct + InterruptingPlayback bool + Pausing bool + Resuming bool + Seeking bool + SkippingNext bool + SkippingPrev bool + TogglingRepeatContext bool + TogglingRepeatTrack bool + TogglingShuffle bool + TransferingPlayback bool + type AudioAnalysis struct + Bars []Interval + Beats []Interval + Meta Meta + Sections []Sections + Segments []Segments + Tatums []Interval + Track TrackAnalysis + type AudioFeature struct + Accousticness float32 + AnalysisUrl string + Danceability float32 + DurationMs int + Energy float32 + Id string + Instrumentalness float32 + Key int + Liveness float32 + Loudness float32 + Mode int + Speechiness float32 + Tempo float32 + TimeSignature int + TrackHref string + Type string + URI string + Valence float32 + type AudioRecording struct + DurationMs int + Explicit bool + ExternalURLs ExternalURL + Href string + Id string + IsPlayable bool + Name string + Restrictions Restriction + type AudioResumePoint struct + FullyPlayed bool + ResumePositionMs int + type Author struct + Name string + type BaseAudioAnalysis struct + Key int + KeyConfidence float32 + Loudness float32 + Mode int + ModeConfidence float32 + Tempo float32 + TempoConfidence float32 + TimeSignature int + TimeSignatureConfidence float32 + type Category struct + Href string + Icons []Image + Id string + Name string + type CategoryChunk struct + Items []Category + type Chunk struct + Href string + Limit int + Next string + Offset int + Previous string + Total int + type Context struct + ExternalURLs ExternalURL + Href string + Type string + URI string + type Copyright struct + Text string + Type string + type Cursors struct + After string + Before string + type DescribedPlaylist struct + Message string + Playlists SimplifiedPlaylistChunk + type Device struct + Id string + IsActive bool + IsPrivateSession bool + IsRestricted bool + Name string + SupportsVolume bool + Type string + VolumePercent int + type Error struct + Message string + Status int + type ExplicitContent struct + FilterEnabled bool + FilterLocked bool + type ExternalId struct + Ean string + Isrc string + Upc string + type ExternalURL struct + Spotify string + type Follower struct + Href string + Total float64 + type FullAlbum struct + Copyrights []Copyright + ExternalIds ExternalId + Genres []string + Label string + Popularity int + Tracks SimplifiedTrackChunk + type FullArtist struct + Followers Follower + Genres []string + Images []Image + Popularity float64 + type FullArtistChunk struct + Items []FullArtist + type FullAudiobook struct + Chapters SimplifiedChapterChunk + type FullChapter struct + Audiobook SimplifiedAudiobook + type FullEpisode struct + Show SimplifiedShow + type FullPlaylist struct + Followers Follower + type FullShow struct + Episodes SimplifiedEpisodeChunk + type FullTrack struct + Album SimplifiedAlbum + ExternalIds ExternalId + type FullTrackChunk struct + Items []FullTrack + type Image struct + Height float64 + URL string + Width float64 + type Interval struct + Confidence float32 + Duration float32 + Start float32 + type Item struct + Artist FullArtist + Episode FullEpisode + Track FullTrack + Type string + func (i *Item) UnmarshalJSON(data []byte) error + type ItemType int + const Artist + const Episode + const Track + func (it ItemType) String() string + type Linked struct + ExternalURLs ExternalURL + Href string + Id string + Type string + URI string + type Meta struct + AnalysisTime float32 + AnalyzerVersion string + DetailedStatus string + InputProcess string + Platform string + StatusCode int + Timestamp int + type Narrator struct + Name string + type Param func(v *url.Values) + func AdditionalTypes(types string) Param + func After(num int) Param + func Before(num int) Param + func DeviceId(id string) Param + func Fields(names string) Param + func IncludeExternal(external string) Param + func IncludeGroups(keywords string) Param + func Limit(num int) Param + func Locale(name string) Param + func Market(name string) Param + func MaxAcousticness(num float64) Param + func MaxDanceability(num float64) Param + func MaxDurationMs(num int) Param + func MaxEnergy(num float64) Param + func MaxInstrumentalness(num float64) Param + func MaxKey(num int) Param + func MaxLiveness(num float64) Param + func MaxLoudness(num float64) Param + func MaxMode(num int) Param + func MaxPopularity(num int) Param + func MaxSpeechiness(num float64) Param + func MaxTempo(num float64) Param + func MaxTimeSignature(num int) Param + func MaxValence(num float64) Param + func MinAcousticness(num float64) Param + func MinDanceability(num float64) Param + func MinDurationMs(num int) Param + func MinEnergy(num float64) Param + func MinInstrumentalness(num float64) Param + func MinKey(num int) Param + func MinLiveness(num float64) Param + func MinLoudness(num float64) Param + func MinMode(num int) Param + func MinPopularity(num int) Param + func MinSpeechiness(num float64) Param + func MinTempo(num float64) Param + func MinTimeSignature(num int) Param + func MinValence(num float64) Param + func Offset(num int) Param + func Position(num int) Param + func SeedArtists(ids string) Param + func SeedGenres(names string) Param + func SeedTracks(ids string) Param + func TargetAcousticness(num float64) Param + func TargetDanceability(num float64) Param + func TargetDurationMs(num int) Param + func TargetEnergy(num float64) Param + func TargetInstrumentalness(num float64) Param + func TargetKey(num int) Param + func TargetLiveness(num float64) Param + func TargetLoudness(num float64) Param + func TargetMode(num int) Param + func TargetPopularity(num int) Param + func TargetSpeechiness(num float64) Param + func TargetTempo(num float64) Param + func TargetTimeSignature(num int) Param + func TargetValence(num float64) Param + func URIs(ids string) Param + type PlayHistory struct + Context Context + PlayedAt string + Track FullTrack + type Playback struct + Actions Actions + Context Context + CurrentlyPlayingType string + Device Device + IsPlaying bool + Item Item + ProgressMs int + RepeatState string + ShuffleState bool + Timestamp int + type PlaylistOwner struct + DisplayName string + ExternalURLs ExternalURL + Followers Follower + Href string + Id string + Type string + URI string + type PlaylistTrack struct + AddedAt string + AddedBy PlaylistOwner + IsLocal bool + Track Item + type PlaylistTrackChunk struct + Items []PlaylistTrack + type Property func(b map[string]interface{}) + func Collaborative(state bool) Property + func ContextURI(uri string) Property + func Description(description string) Property + func DeviceIds(ids []string) Property + func InsertBefore(num int) Property + func Name(name string) Property + func Play(state bool) Property + func PositionMs(num int) Property + func PropertyOffset(v interface{}) Property + func PropertyPosition(num int) Property + func PropertyURIs(uris []string) Property + func Public(state bool) Property + func RangeLength(num int) Property + func RangeStart(num int) Property + func SnapshotId(id string) Property + func Tracks(v []interface{}) Property + type RecentlyPlayedTracks struct + Cursors Cursors + Href string + Items []PlayHistory + Limit int + Next string + Total int + type Recommendation struct + Seeds []RecommendationSeed + Tracks []FullTrack + type RecommendationSeed struct + AfterFilteringSize int + AfterRelinkingSize int + Href string + Id string + InitialPoolSize int + Type string + type Restriction struct + Reason string + type SavedAlbum struct + AddedAt string + Album FullAlbum + type SavedAlbumChunk struct + Items []SavedAlbum + type SavedEpisode struct + AddedAt string + Episode FullEpisode + type SavedEpisodeChunk struct + Items []SavedEpisode + type SavedTrack struct + AddedAt string + Track FullTrack + type SavedTrackChunk struct + Items []SavedTrack + type SearchResult struct + Albums SimplifiedAlbumChunk + Artists FullArtistChunk + Audiobooks SimplifiedAudiobookChunk + Episodes SimplifiedEpisodeChunk + Playlists SimplifiedPlaylistChunk + Shows SimplifiedShowChunk + Tracks FullTrackChunk + type Sections struct + type Segments struct + LoudnessEnd float32 + LoudnessMax float32 + LoudnessMaxTime float32 + LoudnessStart float32 + Pitches []float32 + Timbre []float32 + type SimplifiedAlbum struct + AlbumType string + Artists []SimplifiedArtist + AvailableMarkets []string + ExternalURLs ExternalURL + Href string + Id string + Images []Image + Name string + ReleaseDate string + ReleaseDatePrecision string + Restrictions Restriction + TotalTracks int + Type string + Uri string + type SimplifiedAlbumChunk struct + Items []SimplifiedAlbum + type SimplifiedArtist struct + ExternalURLs ExternalURL + Href string + Id string + Name string + Type string + Uri string + type SimplifiedAudiobook struct + Authors []Author + AvailableMarkets []string + Copyrights []Copyright + Description string + Edition string + Explicit bool + ExternalURLs ExternalURL + Href string + HtmlDescription string + Id string + Images []Image + Languages []string + MediaType string + Name string + Narrators []Narrator + Publisher string + TotalChapters int + Type string + URI string + type SimplifiedAudiobookChunk struct + Items []SimplifiedAudiobook + type SimplifiedChapter struct + AudioPreviewUrl string + AvailableMarkets []string + ChapterNubmer int + Description string + HtmlDescription string + Images []Image + Languages []string + ReleaseDate string + ReleaseDatePrecision string + ResumePoint AudioResumePoint + Type string + URI string + type SimplifiedChapterChunk struct + Items []SimplifiedChapterChunk + type SimplifiedEpisode struct + AudioPreviewUrl string + Description string + HtmlDescription string + Images []Image + IsExternallyHosted bool + Languages []string + ReleaseDate string + ReleaseDatePrecision string + ResumePoint AudioResumePoint + Type string + URI string + type SimplifiedEpisodeChunk struct + Items []SimplifiedEpisode + type SimplifiedPlaylist struct + Collaborative bool + Description string + ExternalURLs ExternalURL + Href string + Id string + Images []Image + Name string + Owner PlaylistOwner + Public bool + SnapshotId string + Tracks PlaylistTrackChunk + Type string + URI string + type SimplifiedPlaylistChunk struct + Items []SimplifiedPlaylist + type SimplifiedShow struct + AvailableMarkets []string + Copyrights []Copyright + Description string + Explicit bool + ExternalURLs ExternalURL + Href string + HtmlDescription string + Id string + Images []Image + IsExternallyHosted bool + Languages []string + MediaType string + Name string + Publisher string + TotalEpisodes int + Type string + URI string + type SimplifiedShowChunk struct + Items []SimplifiedShow + type SimplifiedTrack struct + Artists []SimplifiedArtist + AvailableMarkets []string + DiscNumber int + IsLocal bool + LinkedFrom Linked + Popularity int + PreviewURL string + TrackNumber int + Type string + URI string + type SimplifiedTrackChunk struct + Items []SimplifiedTrack + type Snapshot struct + SnapshotId string + type Spotify struct + func NewSpotifyClient(ctx context.Context, token *oauth2.Token) Spotify + func (s *Spotify) AddCustomPlaylistCoverImage(id, data string) error + func (s *Spotify) AddItemToPlaybackQueue(URI string, params ...Param) error + func (s *Spotify) AddItemsToPlaylist(id string, properties []Property, params ...Param) (*Snapshot, error) + func (s *Spotify) ChangePlaylistDetails(id string, properties []Property) error + func (s *Spotify) CheckIfUserFollowsArtistsOrUsers(idType string, ids []string) ([]bool, error) + func (s *Spotify) CheckIfUsersFollowPlaylist(playlistId string, ids []string) ([]bool, error) + func (s *Spotify) CheckUserSavedAlbums(ids []string) ([]bool, error) + func (s *Spotify) CheckUserSavedAudiobooks(ids []string) ([]bool, error) + func (s *Spotify) CheckUserSavedEpisodes(ids []string) ([]bool, error) + func (s *Spotify) CheckUserSavedShows(ids []string) ([]bool, error) + func (s *Spotify) CheckUserSavedTracks(ids []string) ([]bool, error) + func (s *Spotify) CreatePlaylist(userId string, name Property, properties []Property) error + func (s *Spotify) Delete(response interface{}, endpoint string, body []byte, params ...Param) error + func (s *Spotify) FollowArtistsOrUsers(idType string, ids []string) error + func (s *Spotify) FollowPlaylist(playlistId string, properties []Property) error + func (s *Spotify) Get(response interface{}, endpoint string, params ...Param) error + func (s *Spotify) GetAlbum(id string, params ...Param) (*FullAlbum, error) + func (s *Spotify) GetAlbumTracks(id string, params ...Param) (*SimplifiedTrackChunk, error) + func (s *Spotify) GetAlbums(ids []string, params ...Param) ([]*FullAlbum, error) + func (s *Spotify) GetArtist(id string) (*FullArtist, error) + func (s *Spotify) GetArtistAlbums(id string, params ...Param) (*SimplifiedAlbumChunk, error) + func (s *Spotify) GetArtistRelatedArtists(id string) ([]*FullArtist, error) + func (s *Spotify) GetArtistTopTracks(id string, params ...Param) ([]*FullTrack, error) + func (s *Spotify) GetArtists(ids []string) ([]*FullArtist, error) + func (s *Spotify) GetAudiobook(id string, params ...Param) (*FullAudiobook, error) + func (s *Spotify) GetAudiobookChapters(id string, params ...Param) (*SimplifiedChapterChunk, error) + func (s *Spotify) GetAudiobooks(ids []string, params ...Param) ([]*FullAudiobook, error) + func (s *Spotify) GetAvailableDevices() ([]*Device, error) + func (s *Spotify) GetAvailableGenreSeeds() (*[]string, error) + func (s *Spotify) GetAvailableMarkets() (*[]string, error) + func (s *Spotify) GetBrowseCategories(params ...Param) (*CategoryChunk, error) + func (s *Spotify) GetBrowseCategory(id string, params ...Param) (*Category, error) + func (s *Spotify) GetCategoryPlaylists(categoryId string, params ...Param) (*DescribedPlaylist, error) + func (s *Spotify) GetChapter(id string, params ...Param) (*FullChapter, error) + func (s *Spotify) GetChapters(ids []string, params ...Param) ([]*FullChapter, error) + func (s *Spotify) GetCurrentUserPlaylists(params ...Param) (*SimplifiedPlaylistChunk, error) + func (s *Spotify) GetCurrentUserProfile() (*User, error) + func (s *Spotify) GetCurrentlyPlayingTrack(params ...Param) (*Playback, error) + func (s *Spotify) GetEpisode(id string, params ...Param) (*FullEpisode, error) + func (s *Spotify) GetEpisodes(ids []string, params ...Param) ([]*FullEpisode, error) + func (s *Spotify) GetFeaturedPlaylists(params ...Param) (*DescribedPlaylist, error) + func (s *Spotify) GetFollowedArtists(idType string, params ...Param) (*FullArtistChunk, error) + func (s *Spotify) GetNewReleases(params ...Param) (*SimplifiedAlbumChunk, error) + func (s *Spotify) GetPlaybackState(params ...Param) (*Playback, error) + func (s *Spotify) GetPlaylist(id string, params ...Param) (*FullPlaylist, error) + func (s *Spotify) GetPlaylistCoverImage(id string) ([]*Image, error) + func (s *Spotify) GetPlaylistItems(id string, params ...Param) (*PlaylistTrackChunk, error) + func (s *Spotify) GetRecentlyPlayedTracks(params ...Param) (*RecentlyPlayedTracks, error) + func (s *Spotify) GetRecommendations(params ...Param) (*Recommendation, error) + func (s *Spotify) GetShow(id string, params ...Param) (*FullShow, error) + func (s *Spotify) GetShowEpisodes(id string, params ...Param) (*SimplifiedEpisodeChunk, error) + func (s *Spotify) GetShows(ids []string, params ...Param) ([]*FullShow, error) + func (s *Spotify) GetTrack(id string, params ...Param) (*FullTrack, error) + func (s *Spotify) GetTrackAudioAnalysis(id string) (*AudioAnalysis, error) + func (s *Spotify) GetTrackAudioFeatures(id string) (*AudioFeature, error) + func (s *Spotify) GetTracks(ids []string, params ...Param) ([]*FullTrack, error) + func (s *Spotify) GetTracksAudioFeatures(ids []string) ([]*AudioFeature, error) + func (s *Spotify) GetUserPlaylists(userId string, params ...Param) (*SimplifiedPlaylistChunk, error) + func (s *Spotify) GetUserProfile(id string) (*User, error) + func (s *Spotify) GetUserQueue() (*UserQueue, error) + func (s *Spotify) GetUserSavedAlbums(params ...Param) (*SavedAlbumChunk, error) + func (s *Spotify) GetUserSavedAudiobooks(params ...Param) (*SimplifiedAudiobookChunk, error) + func (s *Spotify) GetUserSavedEpisodes(params ...Param) (*SavedEpisodeChunk, error) + func (s *Spotify) GetUserSavedShows(params ...Param) (*SimplifiedShowChunk, error) + func (s *Spotify) GetUserSavedTracks(params ...Param) (*SavedTrackChunk, error) + func (s *Spotify) GetUserTopItems(itemsType string, params ...Param) (*UserItemChunk, error) + func (s *Spotify) PausePlayback(params ...Param) error + func (s *Spotify) Post(response interface{}, endpoint string, body []byte, params ...Param) error + func (s *Spotify) Put(response interface{}, endpoint string, body []byte, params ...Param) error + func (s *Spotify) PutImage(response interface{}, endpoint, body string, params ...Param) error + func (s *Spotify) RemovePlaylistItem(id string, properties []Property) (*Snapshot, error) + func (s *Spotify) RemoveUserSavedAlbums(ids []string) error + func (s *Spotify) RemoveUserSavedAudiobooks(ids []string) error + func (s *Spotify) RemoveUserSavedEpisodes(ids []string) error + func (s *Spotify) RemoveUserSavedShows(ids []string, params ...Param) error + func (s *Spotify) RemoveUserSavedTracks(ids []string) error + func (s *Spotify) SaveAlbumsForCurrentUser(ids []string) error + func (s *Spotify) SaveAudiobooksForCurrentUser(ids []string) error + func (s *Spotify) SaveEpisodesForCurrentUser(ids []string) error + func (s *Spotify) SaveShowsForCurrentUser(ids []string) error + func (s *Spotify) SaveTracksForCurrentUser(ids []string) error + func (s *Spotify) Search(q string, types []string, params ...Param) (*SearchResult, error) + func (s *Spotify) SeekToPosition(positionMs int, params ...Param) error + func (s *Spotify) SetPlaybackVolume(volumePercent int, params ...Param) error + func (s *Spotify) SetRepeatMode(state string, params ...Param) error + func (s *Spotify) SkipToNext(params ...Param) error + func (s *Spotify) SkipToPrevious(params ...Param) error + func (s *Spotify) StartResumePlayback(properties []Property, params ...Param) error + func (s *Spotify) TogglePlaybackShuffle(state bool, params ...Param) error + func (s *Spotify) TransferPlayback(deviceIds Property, properties []Property) error + func (s *Spotify) UnfollowArtistsOrUsers(idType string, ids []string) error + func (s *Spotify) UnfollowPlaylist(playlistId string) error + func (s *Spotify) UpdatePlaylistItems(id string, properties []Property, params ...Param) (*Snapshot, error) + type TrackAnalysis struct + AnalysisChannels int + AnalysisSampleRate int + CodeVersion float32 + Codestring string + Duration float32 + EchoprintVersion float32 + Echoprintstring string + EndOfFadeIn float32 + NumSamples int + OffsetSeconds int + RhythmVersion float32 + Rhythmstring string + SampleMd5 string + StartOfFadeOut float32 + SynchVersion float32 + Synchstring string + WindowSeconds int + type User struct + Country string + DisplayName string + Email string + ExplicitContent ExplicitContent + ExternalURLs ExternalURL + Followers Follower + Href string + Id string + Images []Image + Product string + Type string + URI string + type UserItemChunk struct + Items []Item + type UserQueue struct + CurrentlyPlaying Item + Queue []Item