| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Radio.BronyRadioGermany.Types
- data Mountpoint
- = MainDJ
- | MainDJMobile
- | MainDJOpus
- | DayDJ
- | NightDJ
- data Response a
- = Successful { }
- | Errorful !Text
- data StreamInfo = StreamInfo {
- siListener :: !Int
- siStatus :: !Text
- siCurrentEvent :: !Text
- siTrackInfo :: !TrackInfo
- data TrackInfo = TrackInfo {}
- data Track = Track {}
- class HasTrackId t where
- class HasTrackId t => HasTrack t where
- class HasTrack t => HasTrackInfo t where
- data HistoryItem = HistoryItem {
- hiTrack :: !Track
- hiPlayedAt :: !UTCTime
- data VoteCheckResult = VoteCheckResult {
- vcVoted :: Bool
- vcDirection :: Text
- data VoteResult = VoteResult {}
Documentation
data Mountpoint Source #
BRG provides three radio channels: the main channel, DayDJ and NightDJ. All channels are broadcasted in MPEG 4, 128kbps. For the main channel there is also an Opus stream with 96kbps and a mobile MPEG 4 stream with 64kbps.
Constructors
| MainDJ | |
| MainDJMobile | |
| MainDJOpus | |
| DayDJ | |
| NightDJ |
Instances
A response may have succeeded or failed, and it may be chunked into several pages.
Constructors
| Successful | |
Fields
| |
| Errorful !Text | |
data StreamInfo Source #
Information on a specific Mountpoint
Constructors
| StreamInfo | |
Fields
| |
Wider information on a specific track.
Constructors
| TrackInfo | |
Core information on a specific track.
Constructors
| Track | |
class HasTrackId t where Source #
Everything that contains a track id.
Minimal complete definition
class HasTrackId t => HasTrack t where Source #
Everything that contains core information about a track
Minimal complete definition
class HasTrack t => HasTrackInfo t where Source #
Everything that contains wider information about a track
Minimal complete definition
Methods
Arguments
| :: t | |
| -> Int | Get the track's upvotes |
Arguments
| :: Int | |
| -> t | |
| -> t | Change the track's upvotes |
Arguments
| :: t | |
| -> Int | Get the track's downvotes |
Arguments
| :: Int | |
| -> t | |
| -> t | Change the track's downvotes |
voteDifference :: t -> Int Source #
Instances
data HistoryItem Source #
An item in the history stream. Contains a track and a timestamp (converted to UTC)
Constructors
| HistoryItem | |
Fields
| |
data VoteCheckResult Source #
The vote status. Have you already voted for this song? Up or down?
Constructors
| VoteCheckResult | |
Fields
| |