liblastfm-0.6.0: Lastfm API interface

Safe HaskellNone
LanguageHaskell2010

Lastfm.Internal

Description

liblastfm internals

You shouldn't need to import this module unless you are doing something interesting.

Synopsis

Documentation

newtype 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)

Constructors

Request 

Fields

unRequest :: Const (Dual (Endo (R f))) a
 

data Format Source

Response format: either JSON or XML

Constructors

JSON 
XML 

data Ready Source

Request that is ready to be sent

data Sign Source

Request that requires signing procedure

data R f Source

Lastfm API request data type

low-level representation

Constructors

R 

Fields

_host :: !Text
 
_method :: !ByteString
 
_query :: !(Map Text Text)
 

Instances

wrap :: (R f -> R f) -> Request f a Source

Wrapping to interesting Monoid (R -> R) instance

unwrap :: Request f a -> R f -> R f Source

Unwrapping from interesting Monoid (R -> R) instance

render :: R f -> String Source

Construct String from request for networking

absorbQuery :: Foldable t => t (Request f b) -> Request f a Source

Absorbing a bunch of queries, useful in batch operations

indexedWith :: Int -> Request f a -> Request f a Source

Transforming Request to the "array notation"