Documentation
ΒΆ
Index ΒΆ
- type Actions
- type Album
- type AlbumParams
- type AlbumService
- type Albums
- type AlbumsResult
- type AnalysisMeta
- type AnalysisTrack
- type Artist
- type ArtistAlbumsParams
- type ArtistParams
- type ArtistService
- func (s *ArtistService) Get(ID string) (*Artist, error)
- func (s *ArtistService) GetAlbums(ID, includeGroups, market string, limit, offset int) (*Albums, error)
- func (s *ArtistService) GetTopTracks(ID, country string) (*TracksResult, error)
- func (s *ArtistService) List(IDs string) (*ArtistsResult, error)
- func (s *ArtistService) RelatedArtists(ID string) (*ArtistsResult, error)
- type Artists
- type ArtistsResult
- type AudioAnalysis
- type AudioFeatures
- type AudioFeaturesResult
- type CategoryService
- type Client
- type Context
- type Copyright
- type CountryParams
- type CreatePlaylist
- type Error
- type ExternalIDs
- type ExternalURLs
- type Followers
- type ID
- type Image
- type Key
- type LibraryParams
- type LibraryService
- func (s *LibraryService) CheckCurrentUserSavedAlbums(IDs string) (*[]bool, error)
- func (s *LibraryService) CheckCurrentUserSavedTracks(IDs string) (*[]bool, error)
- func (s *LibraryService) GetCurrentUserSavedAlbums(limit, offset int) (*SavedAlbums, error)
- func (s *LibraryService) GetCurrentUserSavedTracks(limit, offset int) (*SavedTracks, error)
- type Marker
- type MeService
- type Mode
- type PaginationParams
- type PlayerService
- type PlayingTrack
- type Playlist
- type PlaylistAddTracks
- type PlaylistService
- func (s *PlaylistService) AddTracksToPlaylists(playlistID string, tracksIDS string) (*PlaylistAddTracks, error)
- func (s *PlaylistService) CreatePlaylist(userID string, name string, description string, public bool) (*CreatePlaylist, error)
- func (s *PlaylistService) Get(ID string) (*Playlist, error)
- func (s *PlaylistService) GetCoverImages(ID string) (*[]Image, error)
- func (s *PlaylistService) GetCurrentUserPlaylists(limit, offset int) (*Playlists, error)
- func (s *PlaylistService) GetTracks(ID string, limit, offset int) (*PlaylistTracks, error)
- func (s *PlaylistService) GetUserPlaylists(userID string, limit, offset int) (*Playlists, error)
- type PlaylistTracks
- type Playlists
- type Profile
- type RecentlyPlayedTracks
- type RecentlyPlayedTracksParams
- type SavedAlbums
- type SavedTracks
- type SearchParams
- type SearchResult
- type SearchService
- type Section
- type Segment
- type SpfError
- type Track
- type TrackParams
- type TrackService
- func (s *TrackService) AudioAnalysis(ID string) (*AudioAnalysis, error)
- func (s *TrackService) AudioFeatures(IDs string) (*AudioFeaturesResult, error)
- func (s *TrackService) AudioFeaturesByTrackID(ID string) (*AudioFeatures, error)
- func (s *TrackService) Get(ID string) (*Track, error)
- func (s *TrackService) List(IDs string) (*TracksResult, error)
- type Tracks
- type TracksResult
- type URI
- type UserService
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type Actions ΒΆ
type Actions struct { Disallows *struct { Resuming bool `json:"resuming,omitempty"` } `json:"disallows,omitempty"` }
type Album ΒΆ
type Album struct { AlbumType string `json:"album_type,omitempty"` Artists []Artist `json:"artists,omitempty"` AvailableMarkets []string `json:"available_markets,omitempty"` Copyrights []Copyright `json:"copyrights,omitempty"` ExternalIDs *ExternalIDs `json:"external_ids,omitempty"` ExternalURLs *ExternalURLs `json:"external_urls,omitempty"` Genres []string `json:"genres,omitempty"` Href string `json:"href,omitempty"` ID string `json:"id,omitempty"` Images []Image `json:"images,omitempty"` Label string `json:"label,omitempty"` Name string `json:"name,omitempty"` Popularity int `json:"popularity,omitempty"` ReleaseDate string `json:"release_date,omitempty"` ReleaseDatePrecision string `json:"release_date_precision,omitempty"` TotalTracks int `json:"total_tracks,omitempty"` Tracks *Tracks `json:"tracks,omitempty"` Type string `json:"type,omitempty"` URI string `json:"uri,omitempty"` }
type AlbumParams ΒΆ
type AlbumParams struct {
IDs string `url:"ids,omitempty"`
}
type AlbumService ΒΆ
type AlbumService service
func (*AlbumService) GetTracks ΒΆ
func (s *AlbumService) GetTracks(ID string, limit, offset int) (*Tracks, error)
func (*AlbumService) List ΒΆ
func (s *AlbumService) List(IDs string) (*AlbumsResult, error)
type AlbumsResult ΒΆ
type AlbumsResult struct {
Albums []Album `json:"albums,omitempty"`
}
type AnalysisMeta ΒΆ
type AnalysisMeta struct { AnalyzerVersion string `json:"analyzer_version,omitempty"` Platform string `json:"platform,omitempty"` DetailedStatus string `json:"detailed_status,omitempty"` StatusCode int `json:"status,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` AnalysisTime float64 `json:"analysis_time,omitempty"` InputProcess string `json:"input_process,omitempty"` }
AnalysisMeta describes details about Spotify's audio analysis of the track
type AnalysisTrack ΒΆ
type AnalysisTrack struct { NumSamples int64 `json:"num_samples,omitempty"` Duration float64 `json:"duration,omitempty"` SampleMD5 string `json:"sample_md5,omitempty"` OffsetSeconds int `json:"offset_seconds,omitempty"` WindowSeconds int `json:"window_seconds,omitempty"` AnalysisSampleRate int64 `json:"analysis_sample_rate,omitempty"` AnalysisChannels int `json:"analysis_channels,omitempty"` EndOfFadeIn float64 `json:"end_of_fade_in,omitempty"` StartOfFadeOut float64 `json:"start_of_fade_out,omitempty"` Loudness float64 `json:"loudness,omitempty"` Tempo float64 `json:"tempo,omitempty"` TempoConfidence float64 `json:"tempo_confidence,omitempty"` TimeSignature int `json:"time_signature,omitempty"` TimeSignatureConfidence float64 `json:"time_signature_confidence,omitempty"` Key Key `json:"key,omitempty"` KeyConfidence float64 `json:"key_confidence,omitempty"` Mode Mode `json:"mode,omitempty"` ModeConfidence float64 `json:"mode_confidence,omitempty"` CodeString string `json:"codestring,omitempty"` CodeVersion float64 `json:"code_version,omitempty"` EchoprintString string `json:"echoprintstring,omitempty"` EchoprintVersion float64 `json:"echoprint_version,omitempty"` SynchString string `json:"synchstring,omitempty"` SynchVersion float64 `json:"synch_version,omitempty"` RhythmString string `json:"rhythmstring,omitempty"` RhythmVersion float64 `json:"rhythm_version,omitempty"` }
AnalysisTrack contains audio analysis data about the track as a whole
type Artist ΒΆ
type Artist struct { Name string `json:"name,omitempty"` ID ID `json:"id,omitempty"` URI URI `json:"uri,omitempty"` Href string `json:"href,omitempty"` ExternalURLs ExternalURLs `json:"external_urls,omitempty"` Type string `json:"type,omitempty"` Followers *Followers `json:"followers,omitempty"` Genres []string `json:"genres,omitempty"` Images []Image `json:"images,omitempty"` Popularity int `json:"popularity,omitempty"` }
type ArtistAlbumsParams ΒΆ
type ArtistParams ΒΆ
type ArtistParams struct {
IDs string `url:"ids,omitempty"`
}
type ArtistService ΒΆ
type ArtistService service
func (*ArtistService) GetAlbums ΒΆ
func (s *ArtistService) GetAlbums(ID, includeGroups, market string, limit, offset int) (*Albums, error)
func (*ArtistService) GetTopTracks ΒΆ
func (s *ArtistService) GetTopTracks(ID, country string) (*TracksResult, error)
func (*ArtistService) List ΒΆ
func (s *ArtistService) List(IDs string) (*ArtistsResult, error)
func (*ArtistService) RelatedArtists ΒΆ
func (s *ArtistService) RelatedArtists(ID string) (*ArtistsResult, error)
type ArtistsResult ΒΆ
type ArtistsResult struct {
Artists []Artist `json:"artists,omitempty"`
}
type AudioAnalysis ΒΆ
type AudioAnalysis struct { Bars []Marker `json:"bars,omitempty"` Beats []Marker `json:"beats,omitempty"` Meta AnalysisMeta `json:"meta,omitempty"` Sections []Section `json:"sections,omitempty"` Segments []Segment `json:"segments,omitempty"` Tatums []Marker `json:"tatums,omitempty"` Track AnalysisTrack `json:"track,omitempty"` }
type AudioFeatures ΒΆ
type AudioFeatures struct { Danceability float32 `json:"danceablity,omitempty"` Energy float32 `json:"energy,omitempty"` Key int `json:"key,omitempty"` Loudness float32 `json:"loudness,omitempty"` Mode int `json:"mode,omitempty"` Speechiness float32 `json:"speechiness,omitempty"` Acousticness float32 `json:"acousticness,omitempty"` Instrumentalness float32 `json:"instrumentalness,omitempty"` Liveness float32 `json:"liveness,omitempty"` Valence float32 `json:"valence,omitempty"` Tempo float32 `json:"tempo,omitempty"` Type string `json:"type,omitempty"` ID ID `json:"id,omitempty"` URI URI `json:"uri,omitempty"` TrackHref string `json:"track_href,omitempty"` AnalysisURL string `json:"analysis_url,omitempty"` DurationMS int `json:"duration_ms,omitempty"` TimeSignature int `json:"time_signature,omitempty"` }
type AudioFeaturesResult ΒΆ
type AudioFeaturesResult struct {
AudioFeatures []AudioFeatures `json:"audio_features,omitempty"`
}
type CategoryService ΒΆ
type CategoryService service
type Client ΒΆ
type Client struct { Album *AlbumService Artist *ArtistService Category *CategoryService Library *LibraryService Me *MeService Playlist *PlaylistService Player *PlayerService Search *SearchService Track *TrackService User *UserService // contains filtered or unexported fields }
type Context ΒΆ
type Context struct { ExternalURLs ExternalURLs `json:"external_urls,omitempty"` Href string `json:"href,omitempty"` Type string `json:"type,omitempty"` URI URI `json:"uri,omitempty"` }
type CountryParams ΒΆ
type CountryParams struct {
Country string `url:"country,omitempty"`
}
type CreatePlaylist ΒΆ
type ExternalIDs ΒΆ
type ExternalIDs struct {
UPC string `json:"upc,omitempty"`
}
type ExternalURLs ΒΆ
type ExternalURLs struct {
Spotify string `json:"spotify,omitempty"`
}
type ID ΒΆ
type ID string
ID is a base-62 identifier for an artist, track, album, etc. It can be found at the end of a spotify.URI.
type LibraryParams ΒΆ
type LibraryParams struct {
IDs string `url:"ids"`
}
type LibraryService ΒΆ
type LibraryService service
func (*LibraryService) CheckCurrentUserSavedAlbums ΒΆ
func (s *LibraryService) CheckCurrentUserSavedAlbums(IDs string) (*[]bool, error)
func (*LibraryService) CheckCurrentUserSavedTracks ΒΆ
func (s *LibraryService) CheckCurrentUserSavedTracks(IDs string) (*[]bool, error)
func (*LibraryService) GetCurrentUserSavedAlbums ΒΆ
func (s *LibraryService) GetCurrentUserSavedAlbums(limit, offset int) (*SavedAlbums, error)
func (*LibraryService) GetCurrentUserSavedTracks ΒΆ
func (s *LibraryService) GetCurrentUserSavedTracks(limit, offset int) (*SavedTracks, error)
type Marker ΒΆ
type Marker struct { Start float64 `json:"start,omitempty"` Duration float64 `json:"duration,omitempty"` Confidence float64 `json:"confidence,omitempty"` }
Marker represents beats, bars, tatums and are used in segment and section descriptions.
type PaginationParams ΒΆ
type PlayerService ΒΆ
type PlayerService service
func (*PlayerService) GetCurrentlyPlaying ΒΆ
func (s *PlayerService) GetCurrentlyPlaying() (*PlayingTrack, error)
func (*PlayerService) GetRecentlyPlayed ΒΆ
func (s *PlayerService) GetRecentlyPlayed(filter string, limit, after int) (*RecentlyPlayedTracks, error)
type PlayingTrack ΒΆ
type PlayingTrack struct { Timestamp int `json:"timestamp,omitempty"` Context *Context `json:"context,omitempty"` ProgressMS int `json:"progress_ms,omitempty"` Item *Track `json:"item,omitempty"` CurrentlyPlayingType string `json:"currently_playing_type,omitempty"` Actions *Actions `json:"actions,omitempty"` IsPlaying bool `json:"is_playing,omitempty"` }
type Playlist ΒΆ
type Playlist struct { Collaborative bool `json:"collaborative,omitempty"` Description string `json:"description,omitempty"` ExternalURLs *ExternalURLs `json:"external_urls,omitempty"` Followers *Followers `json:"followers,omitempty"` Href string `json:"href,omitempty"` ID ID `json:"id,omitempty"` Images []Image `json:"images,omitempty"` Name string `json:"name,omitempty"` Owner *Profile `json:"profile,omitempty"` PrimaryColor string `json:"primary_color,omitempty"` Public bool `json:"public,omitempty"` SnapshotID string `json:"snapshot_id,omitempty"` Tracks *PlaylistTracks `json:"tracks,omitempty"` }
type PlaylistAddTracks ΒΆ
type PlaylistAddTracks struct {
SnapshotID string `json:"snapshot_id"`
}
type PlaylistService ΒΆ
type PlaylistService service
func (*PlaylistService) AddTracksToPlaylists ΒΆ
func (s *PlaylistService) AddTracksToPlaylists(playlistID string, tracksIDS string) (*PlaylistAddTracks, error)
func (*PlaylistService) CreatePlaylist ΒΆ
func (s *PlaylistService) CreatePlaylist(userID string, name string, description string, public bool) (*CreatePlaylist, error)
func (*PlaylistService) GetCoverImages ΒΆ
func (s *PlaylistService) GetCoverImages(ID string) (*[]Image, error)
func (*PlaylistService) GetCurrentUserPlaylists ΒΆ
func (s *PlaylistService) GetCurrentUserPlaylists(limit, offset int) (*Playlists, error)
func (*PlaylistService) GetTracks ΒΆ
func (s *PlaylistService) GetTracks(ID string, limit, offset int) (*PlaylistTracks, error)
func (*PlaylistService) GetUserPlaylists ΒΆ
func (s *PlaylistService) GetUserPlaylists(userID string, limit, offset int) (*Playlists, error)
type PlaylistTracks ΒΆ
type PlaylistTracks struct { Href string `json:"href,omitempty"` Items []struct { AddedAt string `json:"added_at,omitempty"` AddedBy *Profile `json:"added_by,omitempty"` IsLocal bool `json:"is_local,omitempty"` PrimaryColor string `json:"primary_color,omitempty"` Track *Track `json:"track,omitempty"` VideoThumbnail *struct { URL string `json:"url,omitempty"` } `json:"video_thumbnail,omitempty"` } `json:"items,omitempty"` }
type Profile ΒΆ
type Profile struct { DisplayName string `json:"display_name,omitempty"` ExternalURLs *ExternalURLs `json:"external_urls,omitempty"` Followers *Followers `json:"followers,omitempty"` Href string `json:"href,omitempty"` ID ID `json:"id,omitempty"` Images []Image `json:"images,omitempty"` Type string `json:"type,omitempty"` URI URI `json:"uri,omitempty"` }
type RecentlyPlayedTracks ΒΆ
type RecentlyPlayedTracks struct { Items []struct { Track *Track `json:"track,omitempty"` PlayedAt string `json:"played_at,omitempty"` Context *Context `json:"context,omitempty"` } `json:"items,omitempty"` Next string `json:"next,omitempty"` Cursors *struct { After string `json:"after,omitempty"` Before string `json:"before,omitempty"` } `json:"cursors,omitempty"` Limit int `json:"limit,omitempty"` Href string `json:"href,omitmepty"` }
type SavedAlbums ΒΆ
type SavedAlbums struct { Href string `json:"href,omitempty"` Items []struct { AddedAt string `json:"added_at,omitempty"` Album *Album `json:"album,omitempty"` } `json:"items,omitempty"` Limit int `json:"limit,omitempty"` Next string `json:"next,omitempty"` Offset int `json:"offset,omitempty"` Previous string `json:"previous,omitempty"` Total int `json:"total,omitempty"` }
type SavedTracks ΒΆ
type SavedTracks struct { Href string `json:"href,omitempty"` Items []struct { AddedAt string `json:"added_at,omitempty"` Track *Track `json:"track,omitempty"` } `json:"items,omitempty"` Limit int `json:"limit,omitempty"` Next string `json:"next,omitempty"` Offset int `json:"offset,omitempty"` Previous string `json:"previous,omitempty"` Total int `json:"total,omitempty"` }
type SearchParams ΒΆ
type SearchResult ΒΆ
type SearchService ΒΆ
type SearchService service
func (*SearchService) Get ΒΆ
func (s *SearchService) Get(query, filter string, limit, offset int) (*SearchResult, error)
type Section ΒΆ
type Section struct { Marker Loudness float64 `json:"loudness,omitempty"` Tempo float64 `json:"tempo,omitempty"` TempoConfidence float64 `json:"tempo_confidence,omitempty"` Key Key `json:"key,omitempty"` KeyConfidence float64 `json:"key_confidence,omitempty"` Mode Mode `json:"mode,omitempty"` ModeConfidence float64 `json:"mode_confidence,omitempty"` TimeSignature int `json:"time_signature,omitempty"` TimeSignatureConfidence float64 `json:"time_signature_confidence,omitempty"` }
Section represents a large variation in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.
type Segment ΒΆ
type Segment struct { Marker LoudnessStart float64 `json:"loudness_start,omitempty"` LoudnessMaxTime float64 `json:"loudness_max_time,omitempty"` LoudnessMax float64 `json:"loudness_max,omitempty"` LoudnessEnd float64 `json:"loudness_end,omitempty"` Pitches []float64 `json:"pitches,omitempty"` Timbre []float64 `json:"timbre,omitempty"` }
Segment is characterized by it's perceptual onset and duration in seconds, loudness (dB), pitch and timbral content.
type Track ΒΆ
type Track struct { Artists []Artist `json:"artists,omitempty"` Album *Album `json:"album,omitempty"` ExternalIDs *ExternalIDs `json:"external_ids,omitempty"` Popularity int `json:"popularity,omitempty"` DiscNumber int `json:"disc_number,omitempty"` DurationMS int `json:"duration_ms,omitempty"` ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` IsLocal bool `json:"is_local,omitempty"` IsPlayable bool `json:"is_playable,omitempty"` Name string `json:"name,omitempty"` PreviewURL string `json:"preview_url,omitempty"` TrackNumber int `json:"track_number,omitempty"` Type string `json:"type,omitempty"` URI string `json:"uri,omitempty"` }
type TrackParams ΒΆ
type TrackParams struct {
IDs string `url:"ids,omitempty"`
}
type TrackService ΒΆ
type TrackService service
func (*TrackService) AudioAnalysis ΒΆ
func (s *TrackService) AudioAnalysis(ID string) (*AudioAnalysis, error)
func (*TrackService) AudioFeatures ΒΆ
func (s *TrackService) AudioFeatures(IDs string) (*AudioFeaturesResult, error)
func (*TrackService) AudioFeaturesByTrackID ΒΆ
func (s *TrackService) AudioFeaturesByTrackID(ID string) (*AudioFeatures, error)
func (*TrackService) List ΒΆ
func (s *TrackService) List(IDs string) (*TracksResult, error)
type TracksResult ΒΆ
type TracksResult struct {
Tracks []Track `json:"tracks,omitempty"`
}
type URI ΒΆ
type URI string
URI identifies an artist, album, track, or category. For example, spotify:track:6rqhFgbbKwnb9MLmUQDhG6
type UserService ΒΆ
type UserService service
func (*UserService) GetProfile ΒΆ
func (s *UserService) GetProfile(ID string) (*Profile, error)