-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Lastfm API interface -- @package liblastfm @version 0.5.1 -- | liblastfm internals -- -- You shouldn't need to import this module unless you are doing -- something interesting. module Network.Lastfm.Internal -- | Lastfm API request data type -- -- a is the authentication state. Can be Ready, which -- means this Request is ready to be sent, or Sign, if the -- request signature hasn't been computed yet -- -- f is the response format (liblastfm supports both JSON -- and XML) newtype Request f a Request :: Const (Dual (Endo (R f))) a -> Request f a unRequest :: Request f a -> Const (Dual (Endo (R f))) a -- | Response format: either JSON or XML data Format JSON :: Format XML :: Format -- | Request that is ready to be sent data Ready -- | Request that requires signing procedure data Sign -- | Lastfm API request data type -- -- low-level representation data R (f :: Format) R :: {-# UNPACK #-} !Text -> {-# UNPACK #-} !ByteString -> !(Map Text Text) -> R _host :: R -> {-# UNPACK #-} !Text _method :: R -> {-# UNPACK #-} !ByteString _query :: R -> !(Map Text Text) -- | Wrapping to interesting Monoid (R -> R) -- instance wrap :: (R f -> R f) -> Request f a -- | Unwrapping from interesting Monoid (R -> R) -- instance unwrap :: Request f a -> R f -> R f -- | Construct String from request for networking render :: R f -> String coerce :: Request f a -> Request f b -- | Absorbing a bunch of queries, useful in batch operations absorbQuery :: Foldable t => t (Request f b) -> Request f a -- | Transforming Request to the "array notation" indexedWith :: Int -> Request f a -> Request f a -- | Request _host host :: Functor f => (Text -> f Text) -> R h -> f (R h) -- | Request HTTP _method method :: Functor f => (ByteString -> f ByteString) -> R h -> f (R h) -- | Request _query string query :: Functor f => (Map Text Text -> f (Map Text Text)) -> R h -> f (R h) instance Typeable 'JSON instance Typeable 'XML instance Typeable Format instance Typeable R instance Typeable Ready instance Typeable Sign instance Typeable Request instance Serialize (R f) instance Traversable (Request f) instance Foldable (Request f) instance Applicative (Request f) instance Functor (Request f) -- | Request sending and Response parsing module Network.Lastfm.Response -- | Application secret newtype Secret Secret :: Text -> Secret -- | Sign the Request with the Secret so it's ready to be -- sent sign :: Secret -> Request f Sign -> Request f Ready -- | Lastfm connection manager data Connection -- | Creating an HTTPS connection manager is expensive; it's advised to use -- a single Connection for all communications with last.fm withConnection :: (Connection -> IO a) -> IO a -- | Create a Connection newConnection :: IO Connection -- | Close a Connection closeConnection :: Connection -> IO () -- | Perform the Request and parse the response lastfm :: Supported f r => Connection -> Request f Ready -> IO (Either LastfmError r) -- | Perform the Request ignoring any responses lastfm_ :: Supported f r => Connection -> Request f Ready -> IO (Either LastfmError ()) -- | Supported provides parsing for the chosen Format -- -- JSON is parsed to Value type from aeson, while -- XML is parsed to Document from xml-conduit class Supported f r | f -> r, r -> f -- | Response format: either JSON or XML data Format JSON :: Format XML :: Format -- | Different ways last.fm response can be unusable data LastfmError -- | last.fm thinks it responded with something legible, but it really -- isn't LastfmBadResponse :: ByteString -> LastfmError -- | last.fm error code and message string LastfmEncodedError :: Int -> Text -> LastfmError -- | wrapped http-conduit exception LastfmHttpError :: HttpException -> LastfmError -- | This is a Prism' LastfmError ByteString in -- disguise _LastfmBadResponse :: (Choice p, Applicative m, AsLastfmError e) => p ByteString (m ByteString) -> p e (m e) -- | This is a Prism' LastfmError (Int, String) -- in disguise _LastfmEncodedError :: (Choice p, Applicative m, AsLastfmError e) => p (Int, Text) (m (Int, Text)) -> p e (m e) -- | This is a Prism' LastfmError HttpException in -- disguise _LastfmHttpError :: (Choice p, Applicative m, AsLastfmError e) => p HttpException (m HttpException) -> p e (m e) instance Typeable LastfmError instance Typeable Secret instance Show LastfmError instance Show Secret instance Eq Secret instance IsString Secret instance AsLastfmError SomeException instance AsLastfmError LastfmError instance Exception LastfmError instance Eq LastfmError instance Supported 'XML Document instance Supported 'JSON Value -- | Request construction module Network.Lastfm.Request -- | Lastfm API request data type -- -- a is the authentication state. Can be Ready, which -- means this Request is ready to be sent, or Sign, if the -- request signature hasn't been computed yet -- -- f is the response format (liblastfm supports both JSON -- and XML) data Request f a -- | Lastfm API request data type -- -- low-level representation data R (f :: Format) -- | Request that is ready to be sent data Ready -- | Request that requires signing procedure data Sign -- | Response format: either JSON or XML data Format JSON :: Format XML :: Format -- | Change request API method -- -- Primarily used in API call wrappers, not intended for usage by library -- user api :: Text -> Request f a -- | Change html _method to POST -- -- Primarily used in API call wrappers, not intended for usage by library -- user post :: Request f a -- | Change html _method to GET -- -- Primarily used in API call wrappers, not intended for usage by library -- user get :: Request f a -- | Change API response format to JSON -- -- This is a little helper. It's actually enough to specialize Format -- manually json :: Request JSON a -- | Change API response format to XML -- -- This is a little helper. It's actually enough to specialize Format -- manually xml :: Request XML a data APIKey -- | Change request API key apiKey :: Text -> Request f APIKey data SessionKey -- | Change request session key sessionKey :: Text -> Request f SessionKey data Token -- | Add token parameter token :: Text -> Request f Token data Callback -- | Add callback link parameter callback :: Text -> Request f Callback data Artist -- | Add artist parameter artist :: Text -> Request f Artist -- | Add artists parameter artists :: [Text] -> Request f [Artist] data Album -- | Add album parameter album :: Text -> Request f Album data MBID -- | Add MBID parameter mbid :: Text -> Request f MBID data Country -- | Add country parameter country :: Text -> Request f Country data Autocorrect -- | Add autocorrect parameter autocorrect :: Bool -> Request f Autocorrect data Event -- | Add event parameter event :: Int64 -> Request f Event data Status Attending :: Status Maybe :: Status NotAttending :: Status -- | Add status parameter status :: Status -> Request f Status data From -- | Add from parameter from :: Int64 -> Request f From data To -- | Add to parameter to :: Int64 -> Request f To data Group -- | Add group parameter group :: Text -> Request f Group data Language -- | Add language parameter language :: Text -> Request f Language data Distance -- | Add distance parameter distance :: Int64 -> Request f Distance data Longitude -- | Add longitude parameter longitude :: Text -> Request f Longitude data Latitude -- | Add latitude parameter latitude :: Text -> Request f Latitude data Location -- | Add location parameter location :: Text -> Request f Location data Start -- | Add start parameter start :: Int64 -> Request f Start data End -- | Add end parameter end :: Int64 -> Request f End data Festivals -- | Add festivalsonly parameter festivalsonly :: Bool -> Request f Festivals data StartTimestamp -- | Add startTimestamp parameter startTimestamp :: Int64 -> Request f StartTimestamp data EndTimestamp -- | Add endTimestamp parameter endTimestamp :: Int64 -> Request f EndTimestamp data Metro -- | Add metro parameter metro :: Text -> Request f Metro data Tag -- | Add tags parameter tags :: [Text] -> Request f [Tag] -- | Add tag parameter tag :: Text -> Request f Tag data Track -- | Add track parameter track :: Text -> Request f Track data Timestamp -- | Add timestamp parameter timestamp :: Int64 -> Request f Timestamp data Fingerprint -- | Add fingerprint parameter fingerprint :: Int64 -> Request f Fingerprint data AlbumArtist -- | Add albumArtist parameter albumArtist :: Text -> Request f AlbumArtist data Duration -- | Add duration parameter duration :: Int64 -> Request f Duration data TrackNumber -- | Add trackNumber parameter trackNumber :: Int64 -> Request f TrackNumber data Playlist -- | Add playlistID parameter playlist :: Int64 -> Request f Playlist data Title -- | Add title parameter title :: Text -> Request f Title data Description -- | Add description parameter description :: Text -> Request f Description data ChosenByUser -- | Add chosenByUser parameter chosenByUser :: Bool -> Request f ChosenByUser data Context -- | Add context parameter context :: Text -> Request f Context data StreamId -- | Add streamId parameter streamId :: Int64 -> Request f StreamId data RecentTracks -- | Add recentTracks parameter recentTracks :: Bool -> Request f RecentTracks data Recipient -- | Add recipient parameter recipient :: Text -> Request f Recipient data Username -- | Add username parameter username :: Text -> Request f Username data User -- | Add user parameter user :: Text -> Request f User data Password -- | Add password parameter password :: Text -> Request f Password data Public -- | Add public parameter public :: Bool -> Request f Public data Message -- | Add message parameter message :: Text -> Request f Message data Page -- | Add page parameter page :: Int64 -> Request f Page data Limit -- | Add limit parameter limit :: Int64 -> Request f Limit data TaggingType -- | Add taggingType parameter taggingType :: Text -> Request f TaggingType data UseRecs -- | Add useRecs parameter useRecs :: Bool -> Request f UseRecs data Venue -- | Add venue parameter venue :: Int64 -> Request f Venue data VenueName -- | Add venue parameter venueName :: Text -> Request f VenueName data Discovery -- | Add group parameter discovery :: Bool -> Request f Discovery data RTP -- | Add rtp parameter rtp :: Bool -> Request f RTP data BuyLinks -- | Add buyLinks parameter buyLinks :: Bool -> Request f BuyLinks data Multiplier M1 :: Multiplier M2 :: Multiplier -- | Add multiplier parameter multiplier :: Multiplier -> Request f Multiplier data Bitrate B64 :: Bitrate B128 :: Bitrate -- | Add bitrate parameter bitrate :: Bitrate -> Request f Bitrate data Name -- | Add name parameter name :: Text -> Request f Name data Station -- | Add station parameter station :: Text -> Request f Station class Targeted a -- | Add comparison parameter comparison :: Targeted a => Int64 -> Request f a -> Request f a data Scrobble data LibraryAlbum data LibraryArtist instance Targeted User instance Targeted [Artist] instance Argument a => Argument [a] instance Argument Int64 instance Argument Bool instance Argument Text -- | Lastfm album API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Album as Album
--   
module Network.Lastfm.Album -- | Unify (Artist -> Album -> …) and (MBID -- -> …) class ArtistAlbumOrMBID r a | a -> r -- | Tag an album using a list of user supplied tags. -- -- http://www.last.fm/api/show/album.addTags addTags :: Request f (Artist -> Album -> [Tag] -> APIKey -> SessionKey -> Sign) -- | Get a list of Buy Links for a particular Album. It is required that -- you supply either the artist and track params or the mbid parameter. -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/album.getBuylinks getBuyLinks :: ArtistAlbumOrMBID Ready a => Request f (Country -> a) -- | Get the metadata for an album on Last.fm using the album name or a -- musicbrainz id. See playlist.fetch on how to get the album playlist. -- -- Optional: autocorrect, username, language -- -- http://www.last.fm/api/show/album.getInfo getInfo :: ArtistAlbumOrMBID Ready a => Request f a -- | Get shouts for this album. -- -- Optional: autocorrect, limit, page -- -- http://www.last.fm/api/show/album.getShouts getShouts :: ArtistAlbumOrMBID Ready a => Request f a -- | Get the tags applied by an individual user to an album on Last.fm. -- -- Optional: autocorrect, user -- -- http://www.last.fm/api/show/album.getTags getTags :: ArtistAlbumOrMBID r a => Request f a -- | Get the top tags for an album on Last.fm, ordered by popularity. -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/album.getTopTags getTopTags :: ArtistAlbumOrMBID Ready a => Request f a -- | Remove a user's tag from an album. -- -- http://www.last.fm/api/show/album.removeTag removeTag :: Request f (Artist -> Album -> Tag -> APIKey -> SessionKey -> Sign) -- | Search for an album by name. Returns album matches sorted by -- relevance. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/album.search search :: Request f (Album -> APIKey -> Ready) -- | Share an album with one or more Last.fm users or other friends. -- -- Optional: public, message, recipient -- -- http://www.last.fm/api/show/album.share share :: Request f (Album -> Artist -> Recipient -> APIKey -> SessionKey -> Sign) instance ArtistAlbumOrMBID r (Artist -> Album -> APIKey -> r) instance ArtistAlbumOrMBID r (MBID -> APIKey -> r) -- | Lastfm artist API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Artist as Artist
--   
module Network.Lastfm.Artist -- | Unify (Artist -> …) and (MBID -> …) class ArtistOrMBID r a -- | Tag an artist with one or more user supplied tags. -- -- http://www.last.fm/api/show/artist.addTags addTags :: Request f (Artist -> [Tag] -> APIKey -> SessionKey -> Sign) -- | Use the last.fm corrections data to check whether the supplied artist -- has a correction to a canonical artist -- -- http://www.last.fm/api/show/artist.getCorrection getCorrection :: Request f (Artist -> APIKey -> Ready) -- | Get a list of upcoming events for this artist. Easily integratable -- into calendars, using the ical standard (see feeds section below). -- -- Optional: autocorrect, limit, pages, -- festivalsonly -- -- http://www.last.fm/api/show/artist.getEvents getEvents :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get the metadata for an artist. Includes biography. -- -- Optional: language, autocorrect, username -- -- http://www.last.fm/api/show/artist.getInfo getInfo :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get a paginated list of all the events this artist has played at in -- the past. -- -- Optional: page, autocorrect, limit -- -- http://www.last.fm/api/show/artist.getPastEvents getPastEvents :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get a podcast of free mp3s based on an artist -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/artist.getPodcast getPodcast :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get shouts for this artist. Also available as an rss feed. -- -- Optional:autocorrect, limit, page -- -- http://www.last.fm/api/show/artist.getShouts getShouts :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get all the artists similar to this artist -- -- Optional: limit, autocorrect -- -- http://www.last.fm/api/show/artist.getSimilar getSimilar :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get the tags applied by an individual user to an artist on Last.fm. If -- accessed as an authenticated service and you don't supply a -- user parameter then this service will return tags for the -- authenticated user. To retrieve the list of top tags applied to an -- artist by all users use getTopTags. -- -- Optional: user, autocorrect -- -- http://www.last.fm/api/show/artist.getTags getTags :: ArtistOrMBID r a => Request f (a -> APIKey -> r) -- | Get the top albums for an artist on Last.fm, ordered by popularity. -- -- Optional: autocorrect, page, limit -- -- http://www.last.fm/api/show/artist.getTopAlbums getTopAlbums :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get the top fans for an artist on Last.fm, based on listening data. -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/artist.getTopFans getTopFans :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get the top tags for an artist on Last.fm, ordered by popularity. -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/artist.getTopTags getTopTags :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Get the top tracks by an artist on Last.fm, ordered by popularity -- -- Optional: autocorrect, page, limit -- -- http://www.last.fm/api/show/artist.getTopTracks getTopTracks :: ArtistOrMBID Ready a => Request f (a -> APIKey -> Ready) -- | Remove a user's tag from an artist. -- -- http://www.last.fm/api/show/artist.removeTag removeTag :: Request f (Artist -> Tag -> APIKey -> SessionKey -> Sign) -- | Search for an artist by name. Returns artist matches sorted by -- relevance. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/artist.search search :: Request f (Artist -> APIKey -> Ready) -- | Share an artist with Last.fm users or other friends. -- -- Optional: message, public -- -- http://www.last.fm/api/show/artist.share share :: Request f (Artist -> Recipient -> APIKey -> SessionKey -> Sign) -- | Shout in this artist's shoutbox -- -- http://www.last.fm/api/show/artist.shout shout :: Request f (Artist -> Message -> APIKey -> SessionKey -> Sign) instance ArtistOrMBID r Artist instance ArtistOrMBID r MBID -- | Lastfm authentication procedure helpers -- -- Basically, lastfm provides 3 ways to authenticate user: -- -- -- -- Note that you can use any of them in your application despite their -- names -- -- How to get session key for yourself for debug with GHCi: -- --
--   >>> import Network.Lastfm
--   
--   >>> import Network.Lastfm.Authentication
--   
--   >>> :set -XOverloadedStrings
--   
--   >>> con <- newConnection
--   
--   >>> lastfm con $ getToken <*> apiKey "__API_KEY__" <* json
--   Right (Object (fromList [("token",String "__TOKEN__")]))
--   
--   >>> putStrLn . link $ apiKey "__API_KEY__" <* token "__TOKEN__"
--   http://www.last.fm/api/auth/?api_key=__API_KEY__&token=__TOKEN__
--   
--   >>> -- Click that link ^^^
--   
--   >>> lastfm con $ sign "__SECRET__" $ getSession <*> token "__TOKEN__" <*> apiKey "__API_KEY__"  <* json
--   Right (Object (fromList [("session",Object (fromList [("subscriber",String "0"),("key",String "__SESSION_KEY__"),("name",String "__USER__")]))]))
--   
module Network.Lastfm.Authentication -- | Get authorization token getToken :: Request f (APIKey -> Ready) -- | Get session key getSession :: Request f (Token -> APIKey -> Sign) -- | Get session key getMobileSession :: Request f (Username -> Password -> APIKey -> Sign) -- | Construct link user should follow to approve application link :: Request f a -> String -- | Lastfm chart API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Chart as Chart
--   
module Network.Lastfm.Chart -- | Get the hyped artists chart -- -- Optional: page, limit -- -- http://www.last.fm/api/show/chart.getHypedArtists getHypedArtists :: Request f (APIKey -> Ready) -- | Get the top artists chart -- -- Optional: page, limit -- -- http://www.last.fm/api/show/chart.getHypedTracks getHypedTracks :: Request f (APIKey -> Ready) -- | Get the most loved tracks chart -- -- Optional: page, limit -- -- http://www.last.fm/api/show/chart.getLovedTracks getLovedTracks :: Request f (APIKey -> Ready) -- | Get the top artists chart -- -- Optional: page, limit -- -- http://www.last.fm/api/show/chart.getTopArtists getTopArtists :: Request f (APIKey -> Ready) -- | Get the top artists chart -- -- Optional: page, limit -- -- http://www.last.fm/api/show/chart.getTopTags getTopTags :: Request f (APIKey -> Ready) -- | Get the top tracks chart -- -- Optional: page, limit -- -- http://www.last.fm/api/show/chart.getTopTracks getTopTracks :: Request f (APIKey -> Ready) -- | Lastfm event API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Event as Event
--   
module Network.Lastfm.Event -- | Set a user's attendance status for an event. -- -- http://www.last.fm/api/show/event.attend attend :: Request f (Event -> Status -> APIKey -> SessionKey -> Sign) -- | Get a list of attendees for an event. -- -- Optional: page, limit -- -- http://www.last.fm/api/show/event.getAttendees getAttendees :: Request f (Event -> APIKey -> Ready) -- | Get the metadata for an event on Last.fm. Includes attendance and -- lineup information. -- -- http://www.last.fm/api/show/event.getInfo getInfo :: Request f (Event -> APIKey -> Ready) -- | Get shouts for this event. Also available as an rss feed. -- -- Optional: page, limit -- -- http://www.last.fm/api/show/event.getShouts getShouts :: Request f (Event -> APIKey -> Ready) -- | Share an event with one or more Last.fm users or other friends. -- -- Optional: public, message -- -- http://www.last.fm/api/show/event.share share :: Request f (Event -> Recipient -> APIKey -> SessionKey -> Sign) -- | Shout in this event's shoutbox -- -- http://www.last.fm/api/show/event.shout shout :: Request f (Event -> Message -> APIKey -> SessionKey -> Sign) -- | Lastfm geo API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Geo as Geo
--   
module Network.Lastfm.Geo -- | Get all events in a specific location by country or city name. -- -- Optional: longitude, latitude, location, -- distance, page, tag, festivalsonly, -- limit -- -- http://www.last.fm/api/show/geo.getEvents getEvents :: Request f (APIKey -> Ready) -- | Get a chart of artists for a metro -- -- Optional: start, end, page, limit -- -- http://www.last.fm/api/show/geo.getMetroArtistChart getMetroArtistChart :: Request f (Metro -> Country -> APIKey -> Ready) -- | Get a chart of hyped (up and coming) artists for a metro -- -- Optional: start, end, page, limit -- -- http://www.last.fm/api/show/geo.getMetroHypeArtistChart getMetroHypeArtistChart :: Request f (Metro -> Country -> APIKey -> Ready) -- | Get a chart of tracks for a metro -- -- Optional: start, end, page, limit -- -- http://www.last.fm/api/show/geo.getMetroHypeTrackChart getMetroHypeTrackChart :: Request f (Metro -> Country -> APIKey -> Ready) -- | Get a chart of tracks for a metro -- -- Optional: start, end, page, limit -- -- http://www.last.fm/api/show/geo.getMetroTrackChart getMetroTrackChart :: Request f (Metro -> Country -> APIKey -> Ready) -- | Get a chart of the artists which make that metro unique -- -- Optional: start, end, page, limit -- -- http://www.last.fm/api/show/geo.getMetroUniqueArtistChart getMetroUniqueArtistChart :: Request f (Metro -> Country -> APIKey -> Ready) -- | Get a chart of tracks for a metro -- -- Optional: start, end, page, limit -- -- http://www.last.fm/api/show/geo.getMetroUniqueTrackChart getMetroUniqueTrackChart :: Request f (Metro -> Country -> APIKey -> Ready) -- | Get a list of available chart periods for this metro, expressed as -- date ranges which can be sent to the chart services. -- -- http://www.last.fm/api/show/geo.getMetroWeeklyChartlist getMetroWeeklyChartlist :: Request f (Metro -> APIKey -> Ready) -- | Get a list of valid countries and metros for use in the other -- webservices -- -- Optional: country -- -- http://www.last.fm/api/show/geo.getMetros getMetros :: Request f (APIKey -> Ready) -- | Get the most popular artists on Last.fm by country -- -- Optional: limit, page -- -- http://www.last.fm/api/show/geo.getTopArtists getTopArtists :: Request f (Country -> APIKey -> Ready) -- | Get the most popular tracks on Last.fm last week by country -- -- Optional: limit, page -- -- http://www.last.fm/api/show/geo.getTopTracks getTopTracks :: Request f (Country -> APIKey -> Ready) -- | Lastfm group API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Group as Group
--   
module Network.Lastfm.Group -- | Get the hype list for a group -- -- http://www.last.fm/api/show/group.getHype getHype :: Request f (Group -> APIKey -> Ready) -- | Get a list of members for this group. -- -- Optional: page, limit -- -- http://www.last.fm/api/show/group.getMembers getMembers :: Request f (Group -> APIKey -> Ready) -- | Get an album chart for a group, for a given date range. If no date -- range is supplied, it will return the most recent album chart for this -- group. -- -- Optional: from, to -- -- http://www.last.fm/api/show/group.getWeeklyAlbumChart getWeeklyAlbumChart :: Request f (Group -> APIKey -> Ready) -- | Get an artist chart for a group, for a given date range. If no date -- range is supplied, it will return the most recent album chart for this -- group. -- -- Optional: from, to -- -- http://www.last.fm/api/show/group.getWeeklyArtistChart getWeeklyArtistChart :: Request f (Group -> APIKey -> Ready) -- | Get a list of available charts for this group, expressed as date -- ranges which can be sent to the chart services. -- -- http://www.last.fm/api/show/group.getWeeklyChartList getWeeklyChartList :: Request f (Group -> APIKey -> Ready) -- | Get a track chart for a group, for a given date range. If no date -- range is supplied, it will return the most recent album chart for this -- group. -- -- Optional: from, to -- -- http://www.last.fm/api/show/group.getWeeklyTrackChart getWeeklyTrackChart :: Request f (Group -> APIKey -> Ready) -- | Lastfm library API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Library as Library
--   
module Network.Lastfm.Library -- | Add an album or collection of albums to a user's Last.fm library -- -- http://www.last.fm/api/show/library.addAlbum addAlbum :: NonEmpty (Request f LibraryAlbum) -> Request f (APIKey -> SessionKey -> Sign) -- | What artist to add to library? albumItem :: Request f (Artist -> Album -> LibraryAlbum) -- | Add an artist to a user's Last.fm library -- -- http://www.last.fm/api/show/library.addArtist addArtist :: NonEmpty (Request f LibraryArtist) -> Request f (APIKey -> SessionKey -> Sign) -- | What album to add to library? artistItem :: Request f (Artist -> LibraryArtist) -- | Add a track to a user's Last.fm library -- -- http://www.last.fm/api/show/library.addTrack addTrack :: Request f (Artist -> Track -> APIKey -> SessionKey -> Sign) -- | A paginated list of all the albums in a user's library, with play -- counts and tag counts. -- -- Optional: artist, limit, page -- -- http://www.last.fm/api/show/library.getAlbums getAlbums :: Request f (User -> APIKey -> Ready) -- | A paginated list of all the artists in a user's library, with play -- counts and tag counts. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/library.getArtists getArtists :: Request f (User -> APIKey -> Ready) -- | A paginated list of all the tracks in a user's library, with play -- counts and tag counts. -- -- Optional: artist, album, page, limit -- -- http://www.last.fm/api/show/library.getTracks getTracks :: Request f (User -> APIKey -> Ready) -- | Remove an album from a user's Last.fm library -- -- http://www.last.fm/api/show/library.removeAlbum removeAlbum :: Request f (Artist -> Album -> APIKey -> SessionKey -> Sign) -- | Remove an artist from a user's Last.fm library -- -- http://www.last.fm/api/show/library.removeArtist removeArtist :: Request f (Artist -> APIKey -> SessionKey -> Sign) -- | Remove a scrobble from a user's Last.fm library -- -- http://www.last.fm/api/show/library.removeScrobble removeScrobble :: Request f (Artist -> Track -> Timestamp -> APIKey -> SessionKey -> Sign) -- | Remove a track from a user's Last.fm library -- -- http://www.last.fm/api/show/library.removeTrack removeTrack :: Request f (Artist -> Track -> APIKey -> SessionKey -> Sign) -- | Lastfm playlist API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Playlist as Playlist
--   
module Network.Lastfm.Playlist -- | Add a track to a Last.fm user's playlist -- -- http://www.last.fm/api/show/playlist.addTrack addTrack :: Request f (Playlist -> Artist -> Track -> APIKey -> SessionKey -> Sign) -- | Create a Last.fm playlist on behalf of a user -- -- Optional: title, description -- -- http://www.last.fm/api/show/playlist.create create :: Request f (APIKey -> SessionKey -> Sign) -- | Lastfm radio API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Radio as Radio
--   
module Network.Lastfm.Radio -- | Fetch new radio content periodically in an XSPF format. -- -- Optional: discovery, rtp, buyLinks -- -- http://www.last.fm/api/show/radio.getPlaylist getPlaylist :: Request f (Multiplier -> Bitrate -> APIKey -> SessionKey -> Sign) -- | Resolve the name of a resource into a station depending on which -- resource it is most likely to represent. -- -- http://www.last.fm/api/show/radio.search search :: Request f (Name -> APIKey -> Ready) -- | Tune in to a Last.fm radio station. -- -- Optional: language -- -- http://www.last.fm/api/show/radio.tune tune :: Request f (Station -> APIKey -> SessionKey -> Sign) -- | Lastfm tag API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Tag as Tag
--   
module Network.Lastfm.Tag -- | Get the metadata for a tag -- -- Optional: language -- -- http://www.last.fm/api/show/tag.getInfo getInfo :: Request f (Tag -> APIKey -> Ready) -- | Search for tags similar to this one. Returns tags ranked by -- similarity, based on listening data. -- -- http://www.last.fm/api/show/tag.getSimilar getSimilar :: Request f (Tag -> APIKey -> Ready) -- | Get the top albums tagged by this tag, ordered by tag count. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/tag.getTopAlbums getTopAlbums :: Request f (Tag -> APIKey -> Ready) -- | Get the top artists tagged by this tag, ordered by tag count. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/tag.getTopArtists getTopArtists :: Request f (Tag -> APIKey -> Ready) -- | Fetches the top global tags on Last.fm, sorted by popularity (number -- of times used) -- -- http://www.last.fm/api/show/tag.getTopTags getTopTags :: Request f (APIKey -> Ready) -- | Get the top tracks tagged by this tag, ordered by tag count. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/tag.getTopTracks getTopTracks :: Request f (Tag -> APIKey -> Ready) -- | Get an artist chart for a tag, for a given date range. If no date -- range is supplied, it will return the most recent artist chart for -- this tag. -- -- Optional: from, to, limit -- -- http://www.last.fm/api/show/tag.getWeeklyArtistChart getWeeklyArtistChart :: Request f (Tag -> APIKey -> Ready) -- | Get a list of available charts for this tag, expressed as date ranges -- which can be sent to the chart services. -- -- http://www.last.fm/api/show/tag.getWeeklyChartList getWeeklyChartList :: Request f (Tag -> APIKey -> Ready) -- | Search for a tag by name. Returns matches sorted by relevance. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/tag.search search :: Request f (Tag -> APIKey -> Ready) -- | Lastfm tasteometer API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Tasteometer as Tasteometer
--   
module Network.Lastfm.Tasteometer -- | Get a Tasteometer score from two inputs, along with a list of shared -- artists. If the input is a user some additional information is -- returned. -- -- Optional: limit -- -- http://www.last.fm/api/show/tasteometer.compare compare :: (Targeted u, Targeted v) => Request f u -> Request f v -> Request f (APIKey -> Ready) -- | Lastfm track API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Track as Track
--   
module Network.Lastfm.Track -- | Unify (Artist -> Track -> …) and (MBID -- -> …) class ArtistTrackOrMBID a -- | Tag a track using a list of user supplied tags. -- -- http://www.last.fm/api/show/track.addTags addTags :: Request f (Artist -> Track -> [Tag] -> APIKey -> SessionKey -> Sign) -- | Ban a track for a given user profile. -- -- http://www.last.fm/api/show/track.ban ban :: Request f (Artist -> Track -> APIKey -> SessionKey -> Sign) -- | Get a list of Buy Links for a particular track. -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/track.getBuylinks getBuyLinks :: ArtistTrackOrMBID t => Request f (Country -> t) -- | Use the last.fm corrections data to check whether the supplied track -- has a correction to a canonical track. -- -- http://www.last.fm/api/show/track.getCorrection getCorrection :: Request f (Artist -> Track -> APIKey -> Ready) -- | Retrieve track metadata associated with a fingerprint id generated by -- the Last.fm Fingerprinter. Returns track elements, along with a -- rank value between 0 and 1 reflecting the confidence for each -- match. -- -- http://www.last.fm/api/show/track.getFingerprintMetadata getFingerprintMetadata :: Request f (Fingerprint -> APIKey -> Ready) -- | Get the metadata for a track on Last.fm. -- -- Optional: autocorrect, username -- -- http://www.last.fm/api/show/track.getInfo getInfo :: ArtistTrackOrMBID t => Request f t -- | Get shouts for this track. Also available as an rss feed. -- -- Optional: autocorrect, limit, page -- -- http://www.last.fm/api/show/track.getShouts getShouts :: ArtistTrackOrMBID t => Request f t -- | Get the similar tracks for this track on Last.fm, based on listening -- data. -- -- Optional: autocorrect, limit -- -- http://www.last.fm/api/show/track.getSimilar getSimilar :: ArtistTrackOrMBID t => Request f t -- | Get the tags applied by an individual user to a track on Last.fm. -- -- Optional: autocorrect, user -- -- http://www.last.fm/api/show/track.getTags getTags :: ArtistTrackOrMBID t => Request f t -- | Get the top fans for this track on Last.fm, based on listening data. -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/track.getTopFans getTopFans :: ArtistTrackOrMBID t => Request f t -- | Get the top tags for this track on Last.fm, ordered by tag count. -- -- Optional: autocorrect -- -- http://www.last.fm/api/show/track.getTopTags getTopTags :: ArtistTrackOrMBID t => Request f t -- | Love a track for a user profile. -- -- http://www.last.fm/api/show/track.love love :: Request f (Artist -> Track -> APIKey -> SessionKey -> Sign) -- | Remove a user's tag from a track. -- -- http://www.last.fm/api/show/track.removeTag removeTag :: Request f (Artist -> Track -> Tag -> APIKey -> SessionKey -> Sign) -- | Add played tracks to the user profile. -- -- Scrobbles 50 first list elements -- -- http://www.last.fm/api/show/track.scrobble scrobble :: NonEmpty (Request f Scrobble) -> Request f (APIKey -> SessionKey -> Sign) -- | What track to scrobble? -- -- Optional: album, albumArtist, chosenByUser, -- context, duration, mbid, streamId, -- trackNumber item :: Request f (Artist -> Track -> Timestamp -> Scrobble) -- | Search for a track by track name. Returns track matches sorted by -- relevance. -- -- Optional: artist, limit, page -- -- http://www.last.fm/api/show/track.search search :: Request f (Track -> APIKey -> Ready) -- | Share a track twith one or more Last.fm users or other friends. -- -- Optional: public, message, recipient -- -- http://www.last.fm/api/show/track.share share :: Request f (Artist -> Track -> Recipient -> APIKey -> SessionKey -> Sign) -- | Unban a track for a user profile. -- -- http://www.last.fm/api/show/track.unban unban :: Request f (Artist -> Track -> APIKey -> SessionKey -> Sign) -- | Unlove a track for a user profile. -- -- http://www.last.fm/api/show/track.unlove unlove :: Request f (Artist -> Track -> APIKey -> SessionKey -> Sign) -- | Used to notify Last.fm that a user has started listening to a track. -- Parameter names are case sensitive. -- -- Optional: album, albumArtist, context, -- duration, mbid, trackNumber -- -- http://www.last.fm/api/show/track.updateNowPlaying updateNowPlaying :: Request f (Artist -> Track -> APIKey -> SessionKey -> Sign) instance ArtistTrackOrMBID (Artist -> Track -> APIKey -> Ready) instance ArtistTrackOrMBID (MBID -> APIKey -> Ready) -- | Lastfm user API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.User as User
--   
module Network.Lastfm.User -- | Get a list of tracks by a given artist scrobbled by this user , -- including scrobble time. Can be limited to specific timeranges, -- defaults to all time. -- -- Optional: startTimestamp, page, endTimestamp -- -- http://www.last.fm/api/show/user.getArtistTracks getArtistTracks :: Request f (User -> Artist -> APIKey -> Ready) -- | Returns the tracks banned by the user -- -- Optional: limit, page -- -- http://www.last.fm/api/show/user.getBannedTracks getBannedTracks :: Request f (User -> APIKey -> Ready) -- | Get a list of upcoming events that this user is attending. Easily -- integratable into calendars, using the ical standard (see 'more -- formats' section below). -- -- Optional: page, festivalsonly, limit -- -- http://www.last.fm/api/show/user.getEvents getEvents :: Request f (User -> APIKey -> Ready) -- | Get a list of the user's friends on Last.fm. -- -- Optional: recenttracks, limit, page -- -- http://www.last.fm/api/show/user.getFriends getFriends :: Request f (User -> APIKey -> Ready) -- | Get information about a user profile. -- -- http://www.last.fm/api/show/user.getInfo getInfo :: Request f (User -> APIKey -> Ready) -- | Get the last 50 tracks loved by a user. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/user.getLovedTracks getLovedTracks :: Request f (User -> APIKey -> Ready) -- | Get a list of a user's neighbours on Last.fm. -- -- Optional: limit -- -- http://www.last.fm/api/show/user.getNeighbours getNeighbours :: Request f (User -> APIKey -> Ready) -- | Gets a list of forthcoming releases based on a user's musical taste. -- -- Optional: userecs -- -- http://www.last.fm/api/show/user.getNewReleases getNewReleases :: Request f (User -> APIKey -> Ready) -- | Get a paginated list of all events a user has attended in the past. -- -- Optional: page, limit -- -- http://www.last.fm/api/show/user.getPastEvents getPastEvents :: Request f (User -> APIKey -> Ready) -- | Get the user's personal tags -- -- Optional: taggingtype, limit, page -- -- http://www.last.fm/api/show/user.getPersonalTags getPersonalTags :: Request f (User -> Tag -> TaggingType -> APIKey -> Ready) -- | Get a list of a user's playlists on Last.fm. -- -- http://www.last.fm/api/show/user.getPlaylists getPlaylists :: Request f (User -> APIKey -> Ready) -- | Get a list of the recent Stations listened to by this user. -- -- Optional: limit, page -- -- http://www.last.fm/api/show/user.getRecentStations getRecentStations :: Request f (User -> APIKey -> SessionKey -> Sign) -- | Get a list of the recent tracks listened to by this user. Also -- includes the currently playing track with the nowplaying="true" -- attribute if the user is currently listening. -- -- Optional: limit, page, from, extended, -- to -- -- http://www.last.fm/api/show/user.getRecentTracks getRecentTracks :: Request f (User -> APIKey -> Ready) -- | Get Last.fm artist recommendations for a user -- -- Optional: page, limit -- -- http://www.last.fm/api/show/user.getRecommendedArtists getRecommendedArtists :: Request f (APIKey -> SessionKey -> Sign) -- | Get a paginated list of all events recommended to a user by Last.fm, -- based on their listening profile. -- -- Optional: limit, page, latitude, -- longitude, festivalsonly, country -- -- http://www.last.fm/api/show/user.getRecommendedEvents getRecommendedEvents :: Request f (APIKey -> SessionKey -> Sign) -- | Get shouts for this user. Also available as an rss feed. -- -- Optional: page, limit -- -- http://www.last.fm/api/show/user.getShouts getShouts :: Request f (User -> APIKey -> Ready) -- | Get the top albums listened to by a user. You can stipulate a time -- period. Sends the overall chart by default. -- -- Optional: period, limit, page -- -- http://www.last.fm/api/show/user.getTopAlbums getTopAlbums :: Request f (User -> APIKey -> Ready) -- | Get the top artists listened to by a user. You can stipulate a time -- period. Sends the overall chart by default. -- -- Optional: period, limit, page -- -- http://www.last.fm/api/show/user.getTopArtists getTopArtists :: Request f (User -> APIKey -> Ready) -- | Get the top tags used by this user. -- -- Optional: limit -- -- http://www.last.fm/api/show/user.getTopTags getTopTags :: Request f (User -> APIKey -> Ready) -- | Get the top tracks listened to by a user. You can stipulate a time -- period. Sends the overall chart by default. -- -- Optional: period, limit, page -- -- http://www.last.fm/api/show/user.getTopTracks getTopTracks :: Request f (User -> APIKey -> Ready) -- | Get an album chart for a user profile, for a given date range. If no -- date range is supplied, it will return the most recent album chart for -- this user. -- -- Optional: from, to -- -- http://www.last.fm/api/show/user.getWeeklyAlbumChart getWeeklyAlbumChart :: Request f (User -> APIKey -> Ready) -- | Get an artist chart for a user profile, for a given date range. If no -- date range is supplied, it will return the most recent artist chart -- for this user. -- -- Optional: from, to -- -- http://www.last.fm/api/show/user.getWeeklyArtistChart getWeeklyArtistChart :: Request f (User -> APIKey -> Ready) -- | Get a list of available charts for this user, expressed as date ranges -- which can be sent to the chart services. -- -- http://www.last.fm/api/show/user.getWeeklyChartList getWeeklyChartList :: Request f (User -> APIKey -> Ready) -- | Get a track chart for a user profile, for a given date range. If no -- date range is supplied, it will return the most recent track chart for -- this user. -- -- Optional: from, to -- -- http://www.last.fm/api/show/user.getWeeklyTrackChart getWeeklyTrackChart :: Request f (User -> APIKey -> Ready) -- | Shout on this user's shoutbox -- -- http://www.last.fm/api/show/user.shout shout :: Request f (User -> Message -> APIKey -> SessionKey -> Sign) -- | Lastfm venue API -- -- This module is intended to be imported qualified: -- --
--   import qualified Network.Lastfm.Venue as Venue
--   
module Network.Lastfm.Venue -- | Get a list of upcoming events at this venue. -- -- Optional: festivalsonly -- -- http://www.last.fm/api/show/venue.getEvents getEvents :: Request f (Venue -> APIKey -> Ready) -- | Get a paginated list of all the events held at this venue in the past. -- -- Optional: festivalsonly, page, limit -- -- http://www.last.fm/api/show/venue.getPastEvents getPastEvents :: Request f (Venue -> APIKey -> Ready) -- | Search for a venue by venue name -- -- Optional: page, limit, country -- -- http://www.last.fm/api/show/venue.search search :: Request f (VenueName -> APIKey -> Ready) -- | Lastfm API interface module Network.Lastfm