liblastfm-0.5.1: Lastfm API interface

Safe HaskellNone
LanguageHaskell2010

Network.Lastfm.Request

Contents

Description

Request construction

Synopsis

Request

data Request f a Source

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 R f Source

Lastfm API request data type

low-level representation

Instances

Serialize (R f) 
Typeable (Format -> *) R 

data Ready Source

Request that is ready to be sent

data Sign Source

Request that requires signing procedure

Instances

data Format Source

Response format: either JSON or XML

Constructors

JSON 
XML 

Request major parameters

api :: Text -> Request f a Source

Change request API method

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

post :: Request f a Source

Change html _method to POST

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

get :: Request f a Source

Change html _method to GET

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

json :: Request JSON a Source

Change API response format to JSON

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

xml :: Request XML a Source

Change API response format to XML

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

apiKey :: Text -> Request f APIKey Source

Change request API key

sessionKey :: Text -> Request f SessionKey Source

Change request session key

Request minor parameters

token :: Text -> Request f Token Source

Add token parameter

callback :: Text -> Request f Callback Source

Add callback link parameter

artist :: Text -> Request f Artist Source

Add artist parameter

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

Add artists parameter

data Album Source

Instances

album :: Text -> Request f Album Source

Add album parameter

mbid :: Text -> Request f MBID Source

Add MBID parameter

country :: Text -> Request f Country Source

Add country parameter

autocorrect :: Bool -> Request f Autocorrect Source

Add autocorrect parameter

event :: Int64 -> Request f Event Source

Add event parameter

status :: Status -> Request f Status Source

Add status parameter

from :: Int64 -> Request f From Source

Add from parameter

data To Source

to :: Int64 -> Request f To Source

Add to parameter

group :: Text -> Request f Group Source

Add group parameter

language :: Text -> Request f Language Source

Add language parameter

distance :: Int64 -> Request f Distance Source

Add distance parameter

longitude :: Text -> Request f Longitude Source

Add longitude parameter

latitude :: Text -> Request f Latitude Source

Add latitude parameter

location :: Text -> Request f Location Source

Add location parameter

start :: Int64 -> Request f Start Source

Add start parameter

data End Source

end :: Int64 -> Request f End Source

Add end parameter

festivalsonly :: Bool -> Request f Festivals Source

Add festivalsonly parameter

startTimestamp :: Int64 -> Request f StartTimestamp Source

Add startTimestamp parameter

endTimestamp :: Int64 -> Request f EndTimestamp Source

Add endTimestamp parameter

metro :: Text -> Request f Metro Source

Add metro parameter

data Tag Source

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

Add tags parameter

tag :: Text -> Request f Tag Source

Add tag parameter

track :: Text -> Request f Track Source

Add track parameter

timestamp :: Int64 -> Request f Timestamp Source

Add timestamp parameter

fingerprint :: Int64 -> Request f Fingerprint Source

Add fingerprint parameter

albumArtist :: Text -> Request f AlbumArtist Source

Add albumArtist parameter

duration :: Int64 -> Request f Duration Source

Add duration parameter

trackNumber :: Int64 -> Request f TrackNumber Source

Add trackNumber parameter

playlist :: Int64 -> Request f Playlist Source

Add playlistID parameter

title :: Text -> Request f Title Source

Add title parameter

description :: Text -> Request f Description Source

Add description parameter

chosenByUser :: Bool -> Request f ChosenByUser Source

Add chosenByUser parameter

context :: Text -> Request f Context Source

Add context parameter

streamId :: Int64 -> Request f StreamId Source

Add streamId parameter

recentTracks :: Bool -> Request f RecentTracks Source

Add recentTracks parameter

recipient :: Text -> Request f Recipient Source

Add recipient parameter

username :: Text -> Request f Username Source

Add username parameter

data User Source

Instances

user :: Text -> Request f User Source

Add user parameter

password :: Text -> Request f Password Source

Add password parameter

public :: Bool -> Request f Public Source

Add public parameter

message :: Text -> Request f Message Source

Add message parameter

page :: Int64 -> Request f Page Source

Add page parameter

limit :: Int64 -> Request f Limit Source

Add limit parameter

taggingType :: Text -> Request f TaggingType Source

Add taggingType parameter

useRecs :: Bool -> Request f UseRecs Source

Add useRecs parameter

venue :: Int64 -> Request f Venue Source

Add venue parameter

venueName :: Text -> Request f VenueName Source

Add venue parameter

discovery :: Bool -> Request f Discovery Source

Add group parameter

data RTP Source

rtp :: Bool -> Request f RTP Source

Add rtp parameter

buyLinks :: Bool -> Request f BuyLinks Source

Add buyLinks parameter

data Multiplier Source

Constructors

M1 
M2 

multiplier :: Multiplier -> Request f Multiplier Source

Add multiplier parameter

data Bitrate Source

Constructors

B64 
B128 

bitrate :: Bitrate -> Request f Bitrate Source

Add bitrate parameter

name :: Text -> Request f Name Source

Add name parameter

station :: Text -> Request f Station Source

Add station parameter

class Targeted a Source

Minimal complete definition

target

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

Add comparison parameter