Documentation ¶
Index ¶
- Variables
- type OAuth
- type Session
- func Login(username string, password string, deviceName string) (*Session, error)
- func LoginDiscovery(cacheBlobPath string, deviceName string) (*Session, error)
- func LoginDiscoveryBlob(username string, blob string, deviceName string) (*Session, error)
- func LoginDiscoveryBlobFile(cacheBlobPath, deviceName string) (*Session, error)
- func LoginOAuth(deviceName string, clientId string, clientSecret string) (*Session, error)
- func LoginSaved(username string, authData []byte, deviceName string) (*Session, error)
- func (s *Session) Country() string
- func (s *Session) DeviceId() string
- func (s *Session) Discovery() *discovery.Discovery
- func (s *Session) Mercury() *mercury.Client
- func (s *Session) Player() *player.Player
- func (s *Session) ReusableAuthBlob() []byte
- func (s *Session) Stream() connection.PacketStream
- func (s *Session) Username() string
Constants ¶
This section is empty.
Variables ¶
var BuildID = "dev"
var Version = "master"
Functions ¶
This section is empty.
Types ¶
type OAuth ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents an active Spotify connection
func LoginDiscovery ¶
Registers librespot as a Spotify Connect device via mdns. When user connects, logs on to Spotify and saves credentials in file at cacheBlobPath. Once saved, the blob credentials allow the program to connect to other Spotify Connect devices and control them.
func LoginDiscoveryBlob ¶
Login using an authentication blob through Spotify Connect discovery system, reading an existing blob data. To read from a file, see LoginDiscoveryBlobFile.
func LoginDiscoveryBlobFile ¶
Login from credentials at cacheBlobPath previously saved by LoginDiscovery. Similar to LoginDiscoveryBlob, except it reads it directly from a file.
func LoginOAuth ¶
Login to Spotify using the OAuth method
func LoginSaved ¶
Login to Spotify using an existing authData blob
func (*Session) ReusableAuthBlob ¶
func (*Session) Stream ¶
func (s *Session) Stream() connection.PacketStream