liblastfm-0.3.2.0: Lastfm API interface

Safe HaskellNone

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

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

Serialize (R f) 

wrap :: (R f -> R f) -> Request f aSource

Wrapping to interesting Monoid (R -> R) instance

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

Unwrapping from interesting Monoid (R -> R) instance

render :: R f -> StringSource

Construct String from request for networking

coerce :: (Contravariant f, Functor f) => f a -> f bSource

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

Absorbing a bunch of queries, useful in batch operations

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

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

Request _query string