liblastfm-0.5.1: Lastfm API interface

Safe HaskellNone
LanguageHaskell2010

Network.Lastfm.Internal

Contents

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

Instances

data R f Source

Lastfm API request data type

low-level representation

Constructors

R 

Fields

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

Instances

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

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"

Lenses

host :: Functor f => (Text -> f Text) -> R h -> f (R h) Source

method :: Functor f => (ByteString -> f ByteString) -> R h -> f (R h) Source

query :: Functor f => (Map Text Text -> f (Map Text Text)) -> R h -> f (R h) Source