bronyradiogermany-streaming-1.0.0.1: Streaming interface for the BronyRadioGermany API.

Safe HaskellNone
LanguageHaskell2010

Network.Radio.BronyRadioGermany.Streaming

Contents

Synopsis

Simple information requests

getStreamInfo :: MonadIO m => Mountpoint -> m (Maybe StreamInfo) Source #

Get information about the given channel

getTrackInfo :: (HasTrackId t, MonadIO m) => t -> m (Maybe TrackInfo) Source #

Get information about the given track

Track streams

getTrackList Source #

Arguments

:: MonadIO m 
=> Maybe Text

Title mask (use % as a wildcard)

-> Maybe Text

Artist mask (use % as a wildcard)

-> Stream (Of Track) m () 

Get the AutoDJ's track list

getHistory Source #

Arguments

:: MonadIO m 
=> Maybe UTCTime

start time

-> Maybe UTCTime

end time

-> Maybe Text

title mask (use % as a wildcard)

-> Maybe Text

artist mask

-> Stream (Of HistoryItem) m () 

Get the song history of the main channel

Voting

postUpVote :: MonadIO m => UUID -> Mountpoint -> m (Maybe VoteResult) Source #

Post an upvote using the given UUID (caution: even though this is logically a post, the HTTP method is GET)

postUpVoteFresh :: MonadIO m => Mountpoint -> m (Maybe VoteResult) Source #

Post an upvote using a fresh UUID

postDownVote :: MonadIO m => UUID -> Mountpoint -> m (Maybe VoteResult) Source #

Post a downvote using the given UUID (caution: even though this is logically a post, the HTTP method is GET)

postDownVoteFresh :: MonadIO m => Mountpoint -> m (Maybe VoteResult) Source #

Post a downvote using a fresh UUID

AutoDJ requests

postAutoDJRequest Source #

Arguments

:: (MonadIO m, MonadThrow m) 
=> Text

your nickname

-> Text

track title

-> Text

track artist

-> m () 

Request a song from the AutoDJ. Throws AutoDjRequestRejected if the request is rejected by the server, i.e. the quota is violated

postAutoDJTrackRequest Source #

Arguments

:: (MonadIO m, MonadThrow m, HasTrack t) 
=> Text

your nickname

-> t

requested track

-> m () 

Request a song from the AutoDJ

Audio streams

radioStream :: MonadResource m => Mountpoint -> ByteString m () Source #

Raw radio stream. Use an audio library to extract frames, or pipe it into an audio device

Errors