module Network.Lastfm.API.Radio
( getPlaylist, search, tune
) where
import Control.Monad.Error (runErrorT)
import Network.Lastfm
getPlaylist :: Maybe Discovery
-> Maybe RTP
-> Maybe BuyLinks
-> Multiplier
-> Bitrate
-> APIKey
-> SessionKey
-> Secret
-> Lastfm Response
getPlaylist discovery rtp buylinks multiplier bitrate apiKey sessionKey secret = callAPIsigned secret
[ (#) (Method "radio.getPlaylist")
, (#) discovery
, (#) rtp
, (#) buylinks
, (#) multiplier
, (#) bitrate
, (#) apiKey
, (#) sessionKey
]
search :: Name -> APIKey -> Lastfm Response
search name apiKey = callAPI
[ (#) (Method "radio.search")
, (#) name
, (#) apiKey
]
tune :: Maybe Language -> Station -> APIKey -> SessionKey -> Secret -> Lastfm Response
tune language station apiKey sessionKey secret = callAPIsigned secret
[ (#) (Method "radio.tune")
, (#) language
, (#) station
, (#) apiKey
, (#) sessionKey
]