Documentation
¶
Index ¶
- Variables
- func LogoutFromDisk(configCacheFilePath string)
- type App
- func (a *App) AuthStatus(ctx context.Context) error
- func (a *App) GetPlaylist(ctx context.Context, playlistID string) error
- func (a *App) GetShow(ctx context.Context, showID string) error
- func (a *App) Login(ctx context.Context) error
- func (a *App) Logout(ctx context.Context)
- func (a *App) PlaylistFilter(ctx context.Context, config *spotify.PlaylistFilterConfig) error
- type AppConfig
- type ExitCodeError
Constants ¶
This section is empty.
Variables ¶
var DefaultConfigCacheFilePath = spotifydefault.DefaultConfigCacheFilePath
DefaultConfigCacheFilePath is the default path where auth tokens are cached on disk.
Functions ¶
func LogoutFromDisk ¶ added in v1.1.0
func LogoutFromDisk(configCacheFilePath string)
LogoutFromDisk removes the cached Spotify auth tokens from disk without requiring an initialized App instance. Useful for logout when credentials may not be available. It never fails even if the user is not logged in.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) AuthStatus ¶ added in v1.1.0
AuthStatus prints the current authentication status to stdout and returns nil on success. Returns an *ExitCodeError with Code=2 if the user is not authenticated or tokens are invalid.
func (*App) PlaylistFilter ¶
type ExitCodeError ¶ added in v1.1.0
type ExitCodeError struct {
Code int
// contains filtered or unexported fields
}
ExitCodeError is an error that requests a specific process exit code. The error message was already printed to stdout before this error is returned, so callers should exit with Code without printing anything further.
func (*ExitCodeError) Error ¶ added in v1.1.0
func (e *ExitCodeError) Error() string