api

package module
v0.0.0-...-740e161 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Genres []Genre

Genres holds cached list of available genres

Functions

func GetM3uPlaylist

func GetM3uPlaylist(urlPrefix string) []byte

GetM3uPlaylist returns playlist of random track genres. Hostname is specified with urlPrefix value.

func UpdateGenres

func UpdateGenres() error

Types

type Genre

type Genre struct {
	Name string
	Code string
}

Genre represents genre information

type TrackInfo

type TrackInfo struct {
	Title       string
	Artist      string
	Genres      []string
	DownloadUrl string
}

TrackInfo represents track information

func RandomTrackInfoByGenre

func RandomTrackInfoByGenre(genre string) (*TrackInfo, error)

RandomTrackInfoByGenre returns information about random track with specified genre

func Search(query string) (result []*TrackInfo, err error)

Search returns tracks information by specified search query

Jump to

Keyboard shortcuts

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