Documentation
¶
Index ¶
- func ClientFromSession(c *gin.Context, auth spotify.Authenticator) (*spotify.Client, error)
- func DefaultClient(def clientcredentials.Config, auth spotify.Authenticator) (*spotify.Client, error)
- func DefaultToken(auth clientcredentials.Config) (*oauth2.Token, error)
- func Playlist(username string, playlistID string, client spotify.Client) (models.CachedPlaylist, error)
- func Playlists(username string, client spotify.Client) ([]models.Playlist, error)
- func SetCache(c cache.Store)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFromSession ¶
ClientFromSession gets a Spotify client from the session's user
func DefaultClient ¶
func DefaultClient(def clientcredentials.Config, auth spotify.Authenticator) (*spotify.Client, error)
DefaultClient gets a Spotify client from the default token The default token is provided via Spotify's Client Credentials auth flow
func DefaultToken ¶
func DefaultToken(auth clientcredentials.Config) (*oauth2.Token, error)
DefaultToken gets a Spotify access token via Spotify's client credentials OAuth flow
func Playlist ¶
func Playlist(username string, playlistID string, client spotify.Client) (models.CachedPlaylist, error)
Playlist gets a Spotify user's playlist given its username and playlist ID
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.