Documentation
¶
Index ¶
- func NewOAuth2Server(ctx context.Context, log librespot.Logger, callbackPort int) (int, chan string, error)
- type BlobCredentials
- type InteractiveCredentials
- type Options
- type Session
- func (s *Session) Accesspoint() *ap.Accesspoint
- func (s *Session) AudioKey() *audio.KeyProvider
- func (s *Session) Close()
- func (s *Session) Dealer() *dealer.Dealer
- func (s *Session) Events() player.EventManager
- func (s *Session) Mercury() *mercury.Client
- func (s *Session) Spclient() *spclient.Spclient
- func (s *Session) StoredCredentials() []byte
- func (s *Session) Username() string
- func (s *Session) WebApi(ctx context.Context, method string, path string, query url.Values, ...) (*http.Response, error)
- type SpotifyTokenCredentials
- type StoredCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlobCredentials ¶
type InteractiveCredentials ¶
type InteractiveCredentials struct {
CallbackPort int
}
type Options ¶
type Options struct {
// Log is the base logger entry to use.
Log librespot.Logger
// DeviceType is the Spotify showed device type, required.
DeviceType devicespb.DeviceType
// DeviceId is the Spotify device ID, required.
DeviceId string
// Credentials is the credentials to be used for authentication, required.
Credentials any
// ClientToken is the Spotify client token, leave empty to let the server generate one.
ClientToken string
// Resolver is an instance of apresolve.ApResolver, leave nil to use the default one.
Resolver *apresolve.ApResolver
// Client is the HTTP client to use for the session, leave empty for a new one.
Client *http.Client
// AppState is the app state to use.
AppState *librespot.AppState
}
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSessionFromOptions ¶
func (*Session) Accesspoint ¶
func (s *Session) Accesspoint() *ap.Accesspoint
func (*Session) AudioKey ¶
func (s *Session) AudioKey() *audio.KeyProvider
func (*Session) Events ¶ added in v0.3.0
func (s *Session) Events() player.EventManager
func (*Session) StoredCredentials ¶
type SpotifyTokenCredentials ¶
type StoredCredentials ¶
Click to show internal directories.
Click to hide internal directories.