Documentation
¶
Index ¶
- func OpenURL(url string) error
- type Client
- type Playlist
- func (p *Playlist) DeleteEntry(index int)
- func (p *Playlist) InsertTrack(track *Track, index int)
- func (p *Playlist) MoveEntryDown(index int) int
- func (p *Playlist) MoveEntryUp(index int) int
- func (p *Playlist) Render() (string, error)
- func (p *Playlist) SaveToFile(filename string) error
- func (p *Playlist) ToJSON() []byte
- type Result
- type SearchRequest
- type SearchResponse
- type SearchType
- type Track
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is a simple HTTP client.
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, query string, filter SearchType) (*SearchResponse, error)
type Playlist ¶
type Playlist struct { Title string `json:"title"` Description string `json:"description"` Tracks []*Track `json:"tracks"` // contains filtered or unexported fields }
func LoadFromFile ¶
func (*Playlist) DeleteEntry ¶
func (*Playlist) InsertTrack ¶
func (*Playlist) MoveEntryDown ¶
func (*Playlist) MoveEntryUp ¶
MoveEntryUp moves an entry up in the playlist and returns the new index
func (*Playlist) SaveToFile ¶
type Result ¶
type Result struct { AlbumID int64 `json:"album_id"` AlbumName string `json:"album_name"` ArtID int64 `json:"art_id"` BandID int64 `json:"band_id"` BandName string `json:"band_name"` ID int64 `json:"id"` Img string `json:"img"` ImgID int64 `json:"img_id"` ItemURLPath string `json:"item_url_path"` ItemURLRoot string `json:"item_url_root"` Name string `json:"name"` StatParams string `json:"stat_params"` Type string `json:"type"` }
type SearchRequest ¶
type SearchRequest struct { FanID *int `json:"fan_id"` FullPage bool `json:"full_page"` SearchFilter SearchType `json:"search_filter"` SearchText string `json:"search_text"` }
type SearchResponse ¶
type SearchResponse struct { Auto struct { Results []*Result `json:"results"` StatParams string `json:"stat_params_for_tag"` ResponseTime int `json:"time_ms"` } `json:"auto"` Genre struct{} `json:"genre"` Tag struct { Count int `json:"count"` Matches []struct{} ResponseTime int `json:"time_ms"` } `json:"tag"` }
type SearchType ¶
type SearchType string
const ( FilterAlbum SearchType = "a" FilterBand SearchType = "b" FilterTrack SearchType = "t" FilterAll SearchType = "" )
Click to show internal directories.
Click to hide internal directories.