Safe Haskell | None |
---|---|
Language | Haskell2010 |
- getStreamInfo :: MonadIO m => Mountpoint -> m (Maybe StreamInfo)
- getTrackInfo :: (HasTrackId t, MonadIO m) => t -> m (Maybe TrackInfo)
- getTrackList :: MonadIO m => Maybe Text -> Maybe Text -> Stream (Of Track) m ()
- getHistory :: MonadIO m => Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Text -> Stream (Of HistoryItem) m ()
- postUpVote :: MonadIO m => UUID -> Mountpoint -> m (Maybe VoteResult)
- postUpVoteFresh :: MonadIO m => Mountpoint -> m (Maybe VoteResult)
- postDownVote :: MonadIO m => UUID -> Mountpoint -> m (Maybe VoteResult)
- postDownVoteFresh :: MonadIO m => Mountpoint -> m (Maybe VoteResult)
- postAutoDJRequest :: (MonadIO m, MonadThrow m) => Text -> Text -> Text -> m ()
- postAutoDJTrackRequest :: (MonadIO m, MonadThrow m, HasTrack t) => Text -> t -> m ()
- radioStream :: MonadResource m => Mountpoint -> ByteString m ()
- data AutoDjRequestError = AutoDjRequestRejected
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
:: 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
:: 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
:: (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 #
:: (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
data AutoDjRequestError Source #
Thrown if the AutoDJ song request has been rejected, i.e. due to quota violation