Documentation
¶
Index ¶
- Constants
- Variables
- func ContextTrackToProvidedTrack(typ SpotifyIdType, track *connectpb.ContextTrack) *connectpb.ProvidedTrack
- func GetCpuFamily() spotifypb.CpuFamily
- func GetOS() spotifypb.Os
- func GetPlatform() spotifypb.Platform
- func GetPlatformSpecificData() *clienttokenpb.PlatformSpecificData
- func GidToBase62(id []byte) string
- func ObfuscateUsername(username string) string
- func SpotifyLikeClientVersion() string
- func SystemInfoString() string
- func UserAgent() string
- func VersionNumberString() string
- func VersionString() string
- type AppState
- type AudioSource
- type Float32Reader
- type GetAddressFunc
- type GetLogin5TokenFunc
- type Logger
- type Media
- func (te Media) Duration() int32
- func (te Media) Episode() *metadatapb.Episode
- func (te Media) Id() SpotifyId
- func (te Media) IsEpisode() bool
- func (te Media) IsTrack() bool
- func (te Media) Name() string
- func (te Media) Restriction() []*metadatapb.Restriction
- func (te Media) Track() *metadatapb.Track
- type NullLogger
- func (l *NullLogger) Debug(...interface{})
- func (l *NullLogger) Debugf(string, ...interface{})
- func (l *NullLogger) Error(...interface{})
- func (l *NullLogger) Errorf(string, ...interface{})
- func (l *NullLogger) Info(...interface{})
- func (l *NullLogger) Infof(string, ...interface{})
- func (l *NullLogger) Trace(...interface{})
- func (l *NullLogger) Tracef(string, ...interface{})
- func (l *NullLogger) Warn(...interface{})
- func (l *NullLogger) Warnf(string, ...interface{})
- func (l *NullLogger) WithError(error) Logger
- func (l *NullLogger) WithField(string, interface{}) Logger
- type PageResolver
- type SizedReadAtSeeker
- type SpotifyId
- type SpotifyIdType
Constants ¶
View Source
const SpotifyVersionCode = 127700358
Variables ¶
View Source
var ( ErrMediaRestricted = errors.New("media is restricted") ErrNoSupportedFormats = errors.New("no supported formats") )
View Source
var ClientId = []byte{0x65, 0xb7, 0x8, 0x7, 0x3f, 0xc0, 0x48, 0xe, 0xa9, 0x2a, 0x7, 0x72, 0x33, 0xca, 0x87, 0xbd}
View Source
var ClientIdHex = hex.EncodeToString(ClientId)
View Source
var UriRegexp = regexp.MustCompile("^spotify:([a-z]+):([0-9a-zA-Z]{21,22})$")
Functions ¶
func ContextTrackToProvidedTrack ¶
func ContextTrackToProvidedTrack(typ SpotifyIdType, track *connectpb.ContextTrack) *connectpb.ProvidedTrack
func GetCpuFamily ¶
func GetPlatform ¶
func GetPlatformSpecificData ¶
func GetPlatformSpecificData() *clienttokenpb.PlatformSpecificData
func GidToBase62 ¶
func ObfuscateUsername ¶ added in v0.3.0
func SpotifyLikeClientVersion ¶
func SpotifyLikeClientVersion() string
func SystemInfoString ¶
func SystemInfoString() string
func VersionNumberString ¶
func VersionNumberString() string
func VersionString ¶
func VersionString() string
Types ¶
type AppState ¶ added in v0.3.0
type AppState struct {
sync.Mutex
DeviceId string `json:"device_id"`
EventManager json.RawMessage `json:"event_manager"`
Credentials struct {
Username string `json:"username"`
Data []byte `json:"data"`
} `json:"credentials"`
LastVolume *uint32 `json:"last_volume"`
// contains filtered or unexported fields
}
type AudioSource ¶
type Float32Reader ¶
type GetAddressFunc ¶
GetAddressFunc is a function that everytime it is called returns a different address for that type of endpoint.
type GetLogin5TokenFunc ¶
GetLogin5TokenFunc is a function that everytime it is called returns a valid login5 access token.
type Logger ¶ added in v0.2.0
type Logger interface {
Tracef(format string, args ...interface{})
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Trace(args ...interface{})
Debug(args ...interface{})
Info(args ...interface{})
Warn(args ...interface{})
Error(args ...interface{})
WithField(key string, value interface{}) Logger
WithError(err error) Logger
}
type Media ¶
type Media struct {
// contains filtered or unexported fields
}
func NewMediaFromEpisode ¶
func NewMediaFromEpisode(episode *metadatapb.Episode) *Media
func NewMediaFromTrack ¶
func NewMediaFromTrack(track *metadatapb.Track) *Media
func (Media) Episode ¶
func (te Media) Episode() *metadatapb.Episode
func (Media) Restriction ¶
func (te Media) Restriction() []*metadatapb.Restriction
func (Media) Track ¶
func (te Media) Track() *metadatapb.Track
type NullLogger ¶ added in v0.5.0
type NullLogger struct{}
func (*NullLogger) Debug ¶ added in v0.5.0
func (l *NullLogger) Debug(...interface{})
func (*NullLogger) Debugf ¶ added in v0.5.0
func (l *NullLogger) Debugf(string, ...interface{})
func (*NullLogger) Error ¶ added in v0.5.0
func (l *NullLogger) Error(...interface{})
func (*NullLogger) Errorf ¶ added in v0.5.0
func (l *NullLogger) Errorf(string, ...interface{})
func (*NullLogger) Info ¶ added in v0.5.0
func (l *NullLogger) Info(...interface{})
func (*NullLogger) Infof ¶ added in v0.5.0
func (l *NullLogger) Infof(string, ...interface{})
func (*NullLogger) Trace ¶ added in v0.5.0
func (l *NullLogger) Trace(...interface{})
func (*NullLogger) Tracef ¶ added in v0.5.0
func (l *NullLogger) Tracef(string, ...interface{})
func (*NullLogger) Warn ¶ added in v0.5.0
func (l *NullLogger) Warn(...interface{})
func (*NullLogger) Warnf ¶ added in v0.5.0
func (l *NullLogger) Warnf(string, ...interface{})
func (*NullLogger) WithError ¶ added in v0.5.0
func (l *NullLogger) WithError(error) Logger
func (*NullLogger) WithField ¶ added in v0.5.0
func (l *NullLogger) WithField(string, interface{}) Logger
type PageResolver ¶
type SizedReadAtSeeker ¶
type SizedReadAtSeeker interface {
io.ReadSeeker
io.ReaderAt
Size() int64
}
type SpotifyId ¶
type SpotifyId struct {
// contains filtered or unexported fields
}
func SpotifyIdFromBase62 ¶ added in v0.1.3
func SpotifyIdFromBase62(typ SpotifyIdType, id string) (*SpotifyId, error)
func SpotifyIdFromGid ¶
func SpotifyIdFromGid(typ SpotifyIdType, id []byte) SpotifyId
func SpotifyIdFromUri ¶
func (SpotifyId) Type ¶
func (id SpotifyId) Type() SpotifyIdType
type SpotifyIdType ¶
type SpotifyIdType string
const ( SpotifyIdTypeTrack SpotifyIdType = "track" SpotifyIdTypeEpisode SpotifyIdType = "episode" SpotifyIdTypePlaylist SpotifyIdType = "playlist" )
func InferSpotifyIdTypeFromContextUri ¶
func InferSpotifyIdTypeFromContextUri(uri string) SpotifyIdType
Source Files
¶
Click to show internal directories.
Click to hide internal directories.