Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DeviceCommand = &cobra.Command{ Use: "device", Short: "Get all connected devices", Run: func(cmd *cobra.Command, args []string) { Device() }, }
View Source
var NextCommand = &cobra.Command{ Use: "next", Short: "Next spotify song", Run: func(cmd *cobra.Command, args []string) { token := server.ReadUserModifyTokenOrFetchFromServer() Next(token, true) }, }
View Source
var PauseCommand = &cobra.Command{ Use: "pause", Short: "Pause spotify song", Run: func(cmd *cobra.Command, args []string) { token := server.ReadUserModifyTokenOrFetchFromServer() pause(token) }, }
View Source
var PlayCommand = &cobra.Command{ Use: "play", Short: "Play spotify song", Run: func(cmd *cobra.Command, args []string) { token := server.ReadUserModifyTokenOrFetchFromServer() Play(token, "") }, }
View Source
var PreviousCommand = &cobra.Command{ Use: "previous", Short: "Previous spotify song", Run: func(cmd *cobra.Command, args []string) { token := server.ReadUserModifyTokenOrFetchFromServer() previous(token) }, }
View Source
var SavedCommand = &cobra.Command{ Use: "saved", Short: "Saved spotify tracks", PreRun: func(cmd *cobra.Command, args []string) { loader.Stop() }, Run: func(cmd *cobra.Command, args []string) { token := server.ReadUserLibraryReadTokenOrFetchFromServer() result := saved(token, "") if len(result.PlayUrl) > 0 { token := server.ReadUserModifyTokenOrFetchFromServer() AddToQueue(token, result.PlayUrl) Next(token, false) } }, }
View Source
var VolumeCommand = &cobra.Command{ Use: "volume [value]", Short: "Set volume", PreRunE: func(cmd *cobra.Command, args []string) error { if VolumeValue == "" { return fmt.Errorf("volume value is required") } return nil }, Run: func(cmd *cobra.Command, args []string) { token := server.ReadUserModifyTokenOrFetchFromServer() volume(token) }, }
View Source
var VolumeValue string
Functions ¶
func ActivateDevice ¶
func ActivateDevice(deviceIds string)
func AddToQueue ¶
Types ¶
type DeviceResponse ¶
type DeviceResponse struct {
Devices []types.DeviceType `json:"devices"`
}
Click to show internal directories.
Click to hide internal directories.