Documentation ¶
Index ¶
- func Auth(cmd *cobra.Command, viper *viper.Viper, cfgFile string, conf *Config)
- func CreateConfig(cfgFile string)
- func Pause(conf *Config)
- func Play(conf *Config)
- func RefreshToken(client string, secret string, refreshToken string) *oauth2.Token
- func SetClient(conf *Config)
- func SetupConfig() string
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfig ¶ added in v0.5.1
func CreateConfig(cfgFile string)
CreateConfig initializes a skeleton config
func Pause ¶
func Pause(conf *Config)
Pause wraps the spotify.Client.Pause() method for easy error checking
func Play ¶
func Play(conf *Config)
Play wraps the spotify.Client.Play() method for easy error checking
func RefreshToken ¶
RefreshToken refreshes the auth token from Spotify TODO: #4 Replace implementation with vanilla oauth2 use
func SetClient ¶
func SetClient(conf *Config)
SetClient sets the Client field of Config struct to a valid Spotify client The Token field in the Config struct must be set
func SetupConfig ¶ added in v0.5.1
func SetupConfig() string
SetupConfig sets up the path and type of the config for Viper and also returns the full path to the config
Types ¶
Click to show internal directories.
Click to hide internal directories.