Documentation ¶
Index ¶
- func Authenticate(username, password string) (token string)
- func GetCurrentlyPlaying(ctx *context.AppContext) (currentlyPlaying components.CurrentlyPlaying)
- func GetStreamURL(data []byte, ctx *context.AppContext) (streamURL string, ok bool)
- func ListChannels(ctx *context.AppContext) (channels []components.ChannelItem)
- func ListFavorites(ctx *context.AppContext) (favorites []components.FavoriteItem)
- func Stream(url string, ctx *context.AppContext)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
Authenticate authenticates to the di.fm API with username and password, returning the listen token
func GetCurrentlyPlaying ¶
func GetCurrentlyPlaying(ctx *context.AppContext) (currentlyPlaying components.CurrentlyPlaying)
GetCurrentlyPlaying fetches the list of all currently playing tracks site-side
func GetStreamURL ¶
func GetStreamURL(data []byte, ctx *context.AppContext) (streamURL string, ok bool)
GetStreamURL extracts a playlist's stream URL from raw INI bytes (pls file)
func ListChannels ¶
func ListChannels(ctx *context.AppContext) (channels []components.ChannelItem)
ListChannels lists all premium MP3 channels
func ListFavorites ¶
func ListFavorites(ctx *context.AppContext) (favorites []components.FavoriteItem)
ListFavorites lists a user's favorite channels
func Stream ¶
func Stream(url string, ctx *context.AppContext)
Stream streams the provided URL using the given di.fm premium token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.