liblastfm- Lastfm API interface

Safe HaskellNone




Request construction



data Request f a Source

Lastfm API request data type

a is authentication state. Might be Send which indicates that you may send this request already or Sign, when request signature isn't computed yet

f is response format. liblastfm currently supports JSON or XML

data R f Source

Lastfm API request data type

low-level representation


Serialize (R f) 

data Ready Source

Request that is ready to be sent

data Sign Source

Request that requires signing procedure

data Format Source

Response format: either JSON or XML



Request major parameters

api :: Text -> Request f aSource

Change request API method

Primarily used in API call wrappers, not intended for usage by library user

post :: Request f aSource

Change html _method to POST

Primarily used in API call wrappers, not intended for usage by library user

get :: Request f aSource

Change html _method to GET

Primarily used in API call wrappers, not intended for usage by library user

json :: Request JSON aSource

Change API response format to JSON

This is a little helper. It's actually enough to specialize Format manually

xml :: Request XML aSource

Change API response format to XML

This is a little helper. It's actually enough to specialize Format manually

apiKey :: Text -> Request f APIKeySource

Change request API key

sessionKey :: Text -> Request f SessionKeySource

Change request session key

Request minor parameters

token :: Text -> Request f TokenSource

Add token parameter

callback :: Text -> Request f CallbackSource

Add callback link parameter

artist :: Text -> Request f ArtistSource

Add artist parameter

artists :: [Text] -> Request f [Artist]Source

Add artists parameter

data Album Source


album :: Text -> Request f AlbumSource

Add album parameter

mbid :: Text -> Request f MBIDSource

Add MBID parameter

country :: Text -> Request f CountrySource

Add country parameter

autocorrect :: Bool -> Request f AutocorrectSource

Add autocorrect parameter

event :: Int64 -> Request f EventSource

Add event parameter

status :: Status -> Request f StatusSource

Add status parameter

from :: Int64 -> Request f FromSource

Add from parameter

data To Source

to :: Int64 -> Request f ToSource

Add to parameter

group :: Text -> Request f GroupSource

Add group parameter

language :: Text -> Request f LanguageSource

Add language parameter

distance :: Int64 -> Request f DistanceSource

Add distance parameter

longitude :: Text -> Request f LongitudeSource

Add longitude parameter

latitude :: Text -> Request f LatitudeSource

Add latitude parameter

location :: Text -> Request f LocationSource

Add location parameter

start :: Int64 -> Request f StartSource

Add start parameter

data End Source

end :: Int64 -> Request f EndSource

Add end parameter

festivalsonly :: Bool -> Request f FestivalsSource

Add festivalsonly parameter

startTimestamp :: Int64 -> Request f StartTimestampSource

Add startTimestamp parameter

endTimestamp :: Int64 -> Request f EndTimestampSource

Add endTimestamp parameter

metro :: Text -> Request f MetroSource

Add metro parameter

data Tag Source

tags :: [Text] -> Request f [Tag]Source

Add tags parameter

tag :: Text -> Request f TagSource

Add tag parameter

track :: Text -> Request f TrackSource

Add track parameter

timestamp :: Int64 -> Request f TimestampSource

Add timestamp parameter

fingerprint :: Int64 -> Request f FingerprintSource

Add fingerprint parameter

albumArtist :: Text -> Request f AlbumArtistSource

Add albumArtist parameter

duration :: Int64 -> Request f DurationSource

Add duration parameter

trackNumber :: Int64 -> Request f TrackNumberSource

Add trackNumber parameter

playlist :: Int64 -> Request f PlaylistSource

Add playlistID parameter

title :: Text -> Request f TitleSource

Add title parameter

description :: Text -> Request f DescriptionSource

Add description parameter

chosenByUser :: Bool -> Request f ChosenByUserSource

Add chosenByUser parameter

context :: Text -> Request f ContextSource

Add context parameter

streamId :: Int64 -> Request f StreamIdSource

Add streamId parameter

recentTracks :: Bool -> Request f RecentTracksSource

Add recentTracks parameter

recipient :: Text -> Request f RecipientSource

Add recipient parameter

username :: Text -> Request f UsernameSource

Add username parameter

data User Source


user :: Text -> Request f UserSource

Add user parameter

password :: Text -> Request f PasswordSource

Add password parameter

public :: Bool -> Request f PublicSource

Add public parameter

message :: Text -> Request f MessageSource

Add message parameter

page :: Int64 -> Request f PageSource

Add page parameter

limit :: Int64 -> Request f LimitSource

Add limit parameter

taggingType :: Text -> Request f TaggingTypeSource

Add taggingType parameter

useRecs :: Bool -> Request f UseRecsSource

Add useRecs parameter

venue :: Int64 -> Request f VenueSource

Add venue parameter

venueName :: Text -> Request f VenueNameSource

Add venue parameter

discovery :: Bool -> Request f DiscoverySource

Add group parameter

data RTP Source

rtp :: Bool -> Request f RTPSource

Add rtp parameter

buyLinks :: Bool -> Request f BuyLinksSource

Add buyLinks parameter

data Multiplier Source



multiplier :: Multiplier -> Request f MultiplierSource

Add multiplier parameter

data Bitrate Source



bitrate :: Bitrate -> Request f BitrateSource

Add bitrate parameter

name :: Text -> Request f NameSource

Add name parameter

station :: Text -> Request f StationSource

Add station parameter

comparison :: Targeted a => Int64 -> Request f a -> Request f aSource

Add comparison parameter