Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AlbumTracks(ctx context.Context, albumID string) ([]library.Track, error)
- func (c *Client) ArtistAlbums(ctx context.Context, artistID string) ([]library.Album, error)
- func (c *Client) ArtistIndex(ctx context.Context) ([]library.Letter, error)
- func (c *Client) Artists(ctx context.Context, offset, limit int) ([]library.Artist, int, error)
- func (c *Client) CreatePlaylist(ctx context.Context, name string, tracks []library.Track) (library.Playlist, error)
- func (c *Client) MusicSection(ctx context.Context) (string, error)
- func (c *Client) PlaylistTracks(ctx context.Context, id string) ([]library.Track, error)
- func (c *Client) Playlists(ctx context.Context) ([]library.Playlist, error)
- func (c *Client) RecentAlbums(ctx context.Context, offset, limit int) ([]library.Album, error)
- func (c *Client) Search(ctx context.Context, query string) (library.SearchResult, error)
- func (c *Client) SetConnection(local, relay bool, relayCap int)
- func (c *Client) SetRemoteBitrate(kbps int)
- func (c *Client) SetSection(id string)
- func (c *Client) SetServer(id, name string)
- func (c *Client) Stream(ctx context.Context, t library.Track) (library.Stream, error)
- func (c *Client) StreamHeaders() map[string]string
Constants ¶
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AlbumTracks ¶
func (*Client) ArtistAlbums ¶
func (*Client) ArtistIndex ¶
func (*Client) CreatePlaylist ¶ added in v0.9.0
func (c *Client) CreatePlaylist(ctx context.Context, name string, tracks []library.Track) (library.Playlist, error)
CreatePlaylist makes a playlist of tracks, in order. The first batch of keys creates it; further batches are appended with PUT.
func (*Client) PlaylistTracks ¶ added in v0.9.0
func (*Client) RecentAlbums ¶
func (*Client) SetConnection ¶
SetConnection records how the server was reached. A relay carries at most relayCap kbps, so files above it are transcoded.
func (*Client) SetRemoteBitrate ¶
SetRemoteBitrate forces transcoding to kbps on any non-local connection.
func (*Client) SetSection ¶
func (*Client) Stream ¶
Stream never puts the token in the URL: it rides in StreamHeaders, so a logged or displayed URL cannot leak it.
func (*Client) StreamHeaders ¶
StreamHeaders are the headers the audio layer must send on a stream URL.