-- | Playlist API module {-# OPTIONS_HADDOCK prune #-} module Network.Lastfm.API.Playlist ( addTrack, create ) where import Control.Monad.Error (runErrorT) import Network.Lastfm -- | Add a track to a Last.fm user's playlist. -- -- More: addTrack :: Playlist -> Artist -> Track -> APIKey -> SessionKey -> Secret -> Lastfm Response addTrack playlist artist track apiKey sessionKey secret = callAPIsigned secret [ (#) (Method "playlist.addTrack") , (#) playlist , (#) artist , (#) track , (#) apiKey , (#) sessionKey ] -- | Create a Last.fm playlist on behalf of a user. -- -- More: create :: Maybe Title -> Maybe Description -> APIKey -> SessionKey -> Secret -> Lastfm Response create title description apiKey sessionKey secret = callAPIsigned secret [ (#) (Method "playlist.create") , (#) title , (#) description , (#) apiKey , (#) sessionKey ]