Documentation
¶
Index ¶
- func EndpointAddTracksToPlaylist(uid, pid string) string
- func EndpointBrowseCategories() string
- func EndpointBrowseFeaturedPlaylists() string
- func EndpointBrowseNewReleases() string
- func EndpointChangePlaylistDetails(uid, pid string) string
- func EndpointContainsAlbums(ids []string) string
- func EndpointCreatePlaylist(uid string) string
- func EndpointDeleteAlbums(ids []string) string
- func EndpointDeleteTracksFromPlaylist(uid, pid string) string
- func EndpointFollowArtists(ids []string, typ string) string
- func EndpointFollowPlaylist(uid, pid string) string
- func EndpointFollowsArtists(ids []string, typ string) string
- func EndpointGetAlbum(id string) string
- func EndpointGetAlbumTracks(id string) string
- func EndpointGetAlbums(ids []string) string
- func EndpointGetArtist(id string) string
- func EndpointGetArtistAlbums(id string) string
- func EndpointGetArtistTopTracks(id string) string
- func EndpointGetArtists(ids []string) string
- func EndpointGetAudioAnalysis(sid string) string
- func EndpointGetAudioFeature(sid string) string
- func EndpointGetAudioFeatures(sids []string) string
- func EndpointGetCategory(id string) string
- func EndpointGetCategoryPlaylists(id string) string
- func EndpointGetFollowedArtists() string
- func EndpointGetPlaylistTracks(uid, pid string) string
- func EndpointGetRecommendations(args ...string) string
- func EndpointGetRelatedArtists(id string) string
- func EndpointGetSavedAlbums() string
- func EndpointGetSavedTracks() string
- func EndpointGetTopArtistOrTrack(typ string) string
- func EndpointGetTrack(sid string) string
- func EndpointGetTracks(sids []string) string
- func EndpointGetUser(uid string) string
- func EndpointGetUserPlaylist(uid, pid string) string
- func EndpointHasTracksSaved(ids []string) string
- func EndpointMe() string
- func EndpointRemoveSavedTracks(ids []string) string
- func EndpointReorderTracksInPlaylist(uid, pid string) string
- func EndpointReplaceTracksInPlaylist(uid, pid string) string
- func EndpointSaveAlbums(ids []string) string
- func EndpointSaveTracks(ids []string) string
- func EndpointSearch(query, typ string) string
- func EndpointUnfollowArtists(ids []string, typ string) string
- func EndpointUnfollowPlaylist(oid, pid string) string
- func EndpointUsersFollowsPlaylist(oid, pid string, ids []string) string
- type Album
- type Artist
- type AudioAnalysis
- type AudioFeatures
- type Category
- type Client
- func (c *Client) GetAudioAnalysis(id string) (*AudioAnalysis, error)
- func (c *Client) GetAudioFeature(id string) (*AudioFeatures, error)
- func (c *Client) GetAudioFeatures(ids []string) ([]*AudioFeatures, error)
- func (c *Client) GetCategories(country, locale string, offset, limit int) (*Paging, error)
- func (c *Client) GetCategory(name, country, locale string) (*Category, error)
- func (c *Client) GetCategoryPlaylists(name, country string, limit, offset int) (*Paging, error)
- func (c *Client) GetFeaturedPlaylists(locale, country, timestamp string, limit, offset int) (*Paging, error)
- func (c *Client) GetNewReleases(country string, limit, offset int) (*Paging, error)
- func (c *Client) GetRecommendations(args ...string) (*Recommendations, error)
- func (c *Client) SearchAlbum(query string, offset int) ([]*Album, error)
- func (c *Client) SearchArtist(query string, offset int) ([]*Artist, error)
- func (c *Client) SearchTrack(query string, offset int) ([]*Track, error)
- func (c *Client) UserFollowPlaylist(oid, pid string) error
- func (c *Client) UserUnfollowPlaylist(oid, pid string) error
- func (c *Client) UsersFollowsPlaylist(oid, pid string, uid []string) ([]bool, error)
- type Copyright
- type Cursor
- type CursorBasedPaging
- type ExternalIDs
- type ExternalURLs
- type Follower
- type Image
- type LinkedTrack
- type Paging
- type Playlist
- type PlaylistTrack
- type RecommendationSeed
- type Recommendations
- type SavedAlbum
- type SavedTrack
- type SpotifyError
- type Track
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndpointBrowseCategories ¶
func EndpointBrowseCategories() string
func EndpointBrowseFeaturedPlaylists ¶
func EndpointBrowseFeaturedPlaylists() string
func EndpointBrowseNewReleases ¶
func EndpointBrowseNewReleases() string
func EndpointContainsAlbums ¶
func EndpointCreatePlaylist ¶
func EndpointDeleteAlbums ¶
func EndpointFollowArtists ¶
func EndpointFollowPlaylist ¶
func EndpointFollowsArtists ¶
func EndpointGetAlbum ¶
func EndpointGetAlbumTracks ¶
func EndpointGetAlbums ¶
func EndpointGetArtist ¶
func EndpointGetArtistAlbums ¶
func EndpointGetArtists ¶
func EndpointGetAudioFeature ¶
func EndpointGetCategory ¶
func EndpointGetFollowedArtists ¶
func EndpointGetFollowedArtists() string
func EndpointGetSavedAlbums ¶
func EndpointGetSavedAlbums() string
func EndpointGetSavedTracks ¶
func EndpointGetSavedTracks() string
func EndpointGetTrack ¶
func EndpointGetTracks ¶
func EndpointGetUser ¶
func EndpointGetUserPlaylist ¶
func EndpointHasTracksSaved ¶
func EndpointMe ¶
func EndpointMe() string
func EndpointSaveAlbums ¶
func EndpointSaveTracks ¶
func EndpointSearch ¶
func EndpointUnfollowArtists ¶
Types ¶
type Album ¶
type Album struct { AlbumType string `json:"album_type"` Artists []*Artist `json:"artists"` AvailableMarkest []string `json:"available_markets"` Copyrights []*Copyright `json:"copyrights"` ExternalIDs *ExternalIDs `json:"external_ids"` ExternalURLs *ExternalURLs `json:"external_urls"` Genres []string `json:"genres"` Href string `json:"href"` ID string `json:"id"` Images []*Image `json:"images"` Label string `json:"label"` Name string `json:"name"` Popularity int `json:"popularity"` ReleaseDate string `json:"release_date"` ReleaseDatePrecision string `json:"release_date_precision"` Tracks *Paging `json:"tracks"` Type string `json:"type"` URI string `json:"uri"` }
type Artist ¶
type Artist struct { ExternalURLs *ExternalURLs `json:"external_url"` Followers *Follower `json:"followers"` Genres []string `json:"genres"` Href string `json:"href"` ID string `json:"id"` Images []*Image `json:"images"` Name string `json:"name"` Popularity int `json:"popularity"` Type string `json:"type"` URI string `json:"uri"` }
func GetArtists ¶
func GetRelatedArtists ¶
type AudioAnalysis ¶
type AudioAnalysis struct { Bars []*struct { Start float32 `json:"start"` Duration float32 `json:"duration"` Confidence float32 `json:"confidence"` } `json:"bars"` Beats []*struct { Start float32 `json:"start"` Duration float32 `json:"duration"` Confidence float32 `json:"confidence"` } `json:"beats"` Meta *struct { AnalyzerVersion string `json:"analyzer_version"` Platform string `json:"platform"` DetailedStatus string `json:"detailed_status"` StatusCode int `json:"status_code"` Timestamp int `json:"timestamp"` AnalysisTime float32 `json:"analysis_time"` InputProcess string `json:"input_process"` } `json:"meta"` Sections []*struct { Start float32 `json:"start"` Duration float32 `json:"duration"` Confidence float32 `json:"float32"` Loudness float32 `json:"loudness"` Tempo float32 `json:"tempo"` TempoConfidence float32 `json:"tempo_confidence"` Key int `json:"key"` KeyConfidence float32 `json:"key_confidence"` Mode int `json:"mode"` ModeConfidence float32 `json:"mode_confidence"` TimeSignature int `json:"time_signature"` TimeSignatureConfidence float32 `json:"time_signature_confidence"` } `json:"sections"` Segments []*struct { Start float32 `json:"start"` Duration float32 `json:"duration"` Confidence float32 `json:"confidence"` LoudnessStart float32 `json:"loudenss_start"` LoudnessMaxTime float32 `json:"loudness_max_time"` LoudnessMax float32 `json:"loudness_max"` LoudnessEnd float32 `json:"loudness_end"` Pitches []float32 `json:"pitches"` Timbre []float32 `json:"timbre"` } `json:"segments"` Tatums []*struct { Start float32 `json:"start"` Duration float32 `json:"duration"` Confidence float32 `json:"confidence"` } `json:"tatums"` Track *Track `json:"track"` }
type AudioFeatures ¶
type AudioFeatures struct { Acousticness float32 `json:"acousticness"` AnalysisURL string `json:"analysis_url"` Danceabilitu float32 `json:"danceability"` DurationMs int `json:"duration_ms"` Energy float32 `json:"energy"` ID string `json:"id"` Instrumentalness float32 `json:"instrumentalness"` Key int `json:"key"` Liveness float32 `json:"liveness"` Loudness float32 `json:"loudness"` Mode int `json:"mode"` Speechiness float32 `json:"speechiness"` Tempo float32 `json:"tempo"` TimeSignature int `json:"time_signature"` TrackHref string `json:"track_href"` Type string `json:"type"` URI string `json:"uri"` Valence float32 `json:"valence"` }
type Client ¶
type Client struct { ClientID string ClientSecret string // contains filtered or unexported fields }
func (*Client) GetAudioAnalysis ¶
func (c *Client) GetAudioAnalysis(id string) (*AudioAnalysis, error)
func (*Client) GetAudioFeature ¶
func (c *Client) GetAudioFeature(id string) (*AudioFeatures, error)
func (*Client) GetAudioFeatures ¶
func (c *Client) GetAudioFeatures(ids []string) ([]*AudioFeatures, error)
func (*Client) GetCategories ¶
func (*Client) GetCategory ¶
func (*Client) GetCategoryPlaylists ¶
func (*Client) GetFeaturedPlaylists ¶
func (c *Client) GetFeaturedPlaylists(locale, country, timestamp string, limit, offset int) (*Paging, error)
GetFeaturedPlaylists gets the featured playlists The optional parameters can switch it up Locale: a lowercase ISO 639 language code and an uppercase ISO 3166-1 alpha-2 country code e.g: "es_MX" (Spanish (Mexico)) Country: ISO 3166-1 alpha-2 country code, e.g: "MX" (Mexico) Timestamp: ISO 8601 format, 'yyyy-MM-ddTHH:mm:ss', e.g: "2014-10-02T09:00:00" Limit: Max amount of items, Default is 20, minimum is 1 and maximum is 50 Offset: The index of the first object, default is 0
func (*Client) GetNewReleases ¶
func (*Client) GetRecommendations ¶
func (c *Client) GetRecommendations(args ...string) (*Recommendations, error)
func (*Client) SearchAlbum ¶
func (*Client) SearchArtist ¶
func (*Client) SearchTrack ¶
func (*Client) UserFollowPlaylist ¶
func (*Client) UserUnfollowPlaylist ¶
type CursorBasedPaging ¶
type ExternalIDs ¶
type ExternalURLs ¶
type LinkedTrack ¶
type LinkedTrack struct { ExternalURLs *ExternalURLs `json:"external_urls"` Href string `json:"href"` ID string `json:"id"` Type string `json:"type"` URI string `json:"uri"` }
type Paging ¶
type Paging struct { Href string `json:"href"` Items json.RawMessage `json:"items"` Limit int `json:"limit"` Next string `json:"next"` Offset int `json:"offset"` Previous string `json:"previous"` Total int `json:"total"` }
func GetAlbumTracks ¶
func GetArtistAlbums ¶
type Playlist ¶
type Playlist struct { Collaborative bool `json:"collaborative"` Description string `json:"description"` ExternalURLs *ExternalURLs `json:"external_urls"` Followers *Follower `json:"followers"` Href string `json:"href"` ID string `json:"id"` Images []*Image `json:"images"` Name string `json:"name"` Owner *User `json:"owner"` Public bool `json:"public,omitempty"` SnapshotID string `json:"snapshot_id"` Tracks *Paging `json:"tracks"` Type string `json:"type"` URI string `json:"uri"` }
type PlaylistTrack ¶
type RecommendationSeed ¶
type Recommendations ¶
type Recommendations struct { Seeds []*RecommendationSeed `json:"seeds"` Tracks []*Track `json:"tracks"` }
type SavedAlbum ¶
type SavedTrack ¶
type SpotifyError ¶
type Track ¶
type Track struct { Album *Album `json:"album"` Artists []*Artist `json:"artists"` AvailableMarkets []string `json:"available_markets"` DiscNumber int `json:"disc_number"` DurationMs int `json:"duration_ms"` Explicit bool `json:"explicit"` ExternalIDs *ExternalIDs `json:"external_ids"` ExternalURLs *ExternalURLs `json:"external_urls"` Href string `json:"href"` ID string `json:"id"` IsPlayable bool `json:"is_playable"` LinkedFrom *LinkedTrack `json:"linked_from"` 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"` }
func GetArtistTopTracks ¶
type User ¶
type User struct { Birthdate string `json:"birthdate"` Country string `json:"country"` DisplayName string `json:"display_name"` Email string `json:"email"` ExternalURLs *ExternalURLs `json:"external_urls"` Followers *Follower `json:"followers"` Href string `json:"href"` ID string `json:"id"` Images []*Image `json:"images"` Product string `json:"product"` Type string `json:"type"` URI string `json:"uri"` }
Click to show internal directories.
Click to hide internal directories.