Documentation
¶
Index ¶
- Variables
- type Image
- type Spoty
- func (s *Spoty) AuthURL() string
- func (s *Spoty) Check() health.Check
- func (s *Spoty) IsAuth() bool
- func (s *Spoty) IsPlaying() bool
- func (s *Spoty) SetupNewClient(r *http.Request) error
- func (s *Spoty) TrackCurrentlyPlaying(ctx context.Context) (*spotify.FullTrack, error)
- func (s *Spoty) TrackImages(ctx context.Context, track *spotify.FullTrack) ([]Image, error)
Constants ¶
This section is empty.
Variables ¶
Module exported for initialising a new Spoty service.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { URL string `json:"url"` Height int `json:"height"` Width int `json:"width"` RGBA color.RGBA `json:"rgba,omitempty"` Hex string `json:"hex,omitempty"` Error string `json:"error,omitempty"` RawError error `json:"-"` }
Image represents an image with its dominant color.
type Spoty ¶
type Spoty struct {
// contains filtered or unexported fields
}
Spoty represents the spoty service.
func New ¶
func New( cfg *config.Config, logger *logger.Logger, tracer *tracer.Tracer, cache *cache.Cache, health *health.Checks, ) (*Spoty, error)
New creates a new spoty service.
func (*Spoty) SetupNewClient ¶
SetupNewClient sets up a new spotify client.
func (*Spoty) TrackCurrentlyPlaying ¶
TrackCurrentlyPlaying returns the currently playing track.
Click to show internal directories.
Click to hide internal directories.