spclient

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextResolver

type ContextResolver struct {
	// contains filtered or unexported fields
}

func NewContextResolver

func NewContextResolver(sp *Spclient, ctx *connectpb.Context) (_ *ContextResolver, err error)

func (*ContextResolver) Metadata

func (r *ContextResolver) Metadata() map[string]string

func (*ContextResolver) Page

func (r *ContextResolver) Page(idx int) ([]*connectpb.ContextTrack, error)

func (*ContextResolver) Restrictions

func (r *ContextResolver) Restrictions() *connectpb.Restrictions

func (*ContextResolver) Type

func (*ContextResolver) Uri

func (r *ContextResolver) Uri() string

type Spclient

type Spclient struct {
	// contains filtered or unexported fields
}

func NewSpclient

func NewSpclient(addr librespot.GetAddressFunc, accessToken librespot.GetLogin5TokenFunc, deviceId, clientToken string) (*Spclient, error)

func (*Spclient) ContextResolve

func (c *Spclient) ContextResolve(uri string) (*connectpb.Context, error)

func (*Spclient) ContextResolveAutoplay

func (c *Spclient) ContextResolveAutoplay(reqProto *playerpb.AutoplayContextRequest) (*connectpb.Context, error)

func (*Spclient) MetadataForEpisode

func (c *Spclient) MetadataForEpisode(episode librespot.SpotifyId) (*metadatapb.Episode, error)

func (*Spclient) MetadataForTrack

func (c *Spclient) MetadataForTrack(track librespot.SpotifyId) (*metadatapb.Track, error)

func (*Spclient) PutConnectState

func (c *Spclient) PutConnectState(spotConnId string, reqProto *connectpb.PutStateRequest) error

func (*Spclient) PutConnectStateInactive

func (c *Spclient) PutConnectStateInactive(spotConnId string, notify bool) error

func (*Spclient) ResolveStorageInteractive

func (c *Spclient) ResolveStorageInteractive(fileId []byte, prefetch bool) (*storagepb.StorageResolveResponse, error)

func (*Spclient) WebApiRequest

func (c *Spclient) WebApiRequest(method string, path string, query url.Values, header http.Header, body []byte) (*http.Response, error)

Jump to

Keyboard shortcuts

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