Documentation ¶
Index ¶
- Constants
- Variables
- func CachedClient(options ...func(*cachedClientConfig)) (c spotify.Client, err error)
- func LoadToken(r io.Reader) (t oauth2.Token, err error)
- func NewCallbackHandler(state string, ch chan<- string) http.HandlerFunc
- func SaveToken(i interface{}, w io.Writer) (err error)
- func SetCacheFileName(fn string) func(*cachedClientConfig)
Constants ¶
View Source
const (
RedirectURL = "http://localhost:8080/callback"
)
Variables ¶
View Source
var ( Scopes = []string{ spotify.ScopeUserReadPrivate, spotify.ScopeUserLibraryRead, } )
Functions ¶
func CachedClient ¶
CachedClient is used to create a client from the token cached by the auth command. This cache location can be overridden by passing functional options
func NewCallbackHandler ¶
func NewCallbackHandler(state string, ch chan<- string) http.HandlerFunc
func SetCacheFileName ¶
func SetCacheFileName(fn string) func(*cachedClientConfig)
SetCacheFileName can be passed to the CachedClient function to override the default cache filename location
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.