librespotmobile

package
v0.0.0-...-8904ad9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package librespotmobile contains simplified bindings to use the library with Gomobile, in order to build for Android and iOS.

Index

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) Read

func (a *MobileAudioFile) Read(buf []byte) (int, error)

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) GetAlbum

func (m *MobileMercury) GetAlbum(id string) (string, error)

func (*MobileMercury) GetArtist

func (m *MobileMercury) GetArtist(id string) (string, error)

func (*MobileMercury) GetPlaylist

func (m *MobileMercury) GetPlaylist(id string) (string, error)

func (*MobileMercury) GetRootPlaylist

func (m *MobileMercury) GetRootPlaylist(username string) (string, error)

func (*MobileMercury) GetToken

func (m *MobileMercury) GetToken(clientId string, scopes string) (string, error)

func (*MobileMercury) GetTrack

func (m *MobileMercury) GetTrack(id 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL