Documentation ¶
Overview ¶
Package librespotmobile contains simplified bindings to use the library with Gomobile, in order to build for Android and iOS.
Index ¶
- type MobileAudioFile
- type MobileMercury
- func (m *MobileMercury) GetAlbum(id string) (string, error)
- func (m *MobileMercury) GetArtist(id string) (string, error)
- func (m *MobileMercury) GetPlaylist(id string) (string, error)
- func (m *MobileMercury) GetRootPlaylist(username string) (string, error)
- func (m *MobileMercury) GetToken(clientId string, scopes string) (string, error)
- func (m *MobileMercury) GetTrack(id string) (string, error)
- type MobilePlayer
- type MobileSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MobileAudioFile ¶
type MobileAudioFile struct {
// contains filtered or unexported fields
}
MobileAudioFile is a gomobile-compliant subset of the AudioFile struct. It is allocated by the MobilePlayer struct and functions.
func (*MobileAudioFile) Seek ¶
func (a *MobileAudioFile) Seek(offset int32, whence int) (int, error)
func (*MobileAudioFile) Size ¶
func (a *MobileAudioFile) Size() int32
type MobileMercury ¶
type MobileMercury struct {
// contains filtered or unexported fields
}
func (*MobileMercury) GetPlaylist ¶
func (m *MobileMercury) GetPlaylist(id string) (string, error)
func (*MobileMercury) GetRootPlaylist ¶
func (m *MobileMercury) GetRootPlaylist(username string) (string, error)
type MobilePlayer ¶
type MobilePlayer struct {
// contains filtered or unexported fields
}
MobilePlayer is a gomobile-compliant subset of the Player struct.
func (*MobilePlayer) LoadTrack ¶
func (p *MobilePlayer) LoadTrack(fileId []byte, format int, trackId []byte) (*MobileAudioFile, error)
type MobileSession ¶
type MobileSession struct {
// contains filtered or unexported fields
}
MobileSession exposes a simplified subset of the core.Session struct that is compatible with the subset of types accepted by gomobile. Most calls are proxied to the underlying core.Session pointer, which we cannot expose directly as it uses types incompatible with gomobile.
func Login ¶
func Login(username string, password string, deviceName string) (*MobileSession, error)
func LoginSaved ¶
func LoginSaved(username string, authData []byte, deviceName string) (*MobileSession, error)
func (*MobileSession) Country ¶
func (s *MobileSession) Country() string
func (*MobileSession) DeviceId ¶
func (s *MobileSession) DeviceId() string
func (*MobileSession) Mercury ¶
func (s *MobileSession) Mercury() *MobileMercury
func (*MobileSession) Player ¶
func (s *MobileSession) Player() *MobilePlayer
func (*MobileSession) ReusableAuthBlob ¶
func (s *MobileSession) ReusableAuthBlob() []byte
func (*MobileSession) Username ¶
func (s *MobileSession) Username() string
Click to show internal directories.
Click to hide internal directories.