Safe Haskell | None |
---|
liblastfm internals
You shouldn't need to import this module unless you are doing something interesting.
- newtype Request f a = Request {}
- data Format
- data Ready
- data Sign
- data R f = R {}
- wrap :: (R f -> R f) -> Request f a
- unwrap :: Request f a -> R f -> R f
- render :: R f -> String
- coerce :: (Contravariant f, Functor f) => f a -> f b
- absorbQuery :: Foldable t => t (Request f b) -> Request f a
- indexedWith :: Int -> Request f a -> Request f a
- host :: Functor f => (Text -> f Text) -> R h -> f (R h)
- method :: Functor f => (ByteString -> f ByteString) -> R h -> f (R h)
- query :: Functor f => (Map Text Text -> f (Map Text Text)) -> R h -> f (R h)
Documentation
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
Functor (Request f) | |
Applicative (Request f) | |
Foldable (Request f) | |
Traversable (Request f) | |
Contravariant (Request f) |
Request that is ready to be sent
ArtistTrackOrMBID (MBID -> APIKey -> Ready) | |
ArtistTrackOrMBID (Artist -> Track -> APIKey -> Ready) |
Lastfm API request data type
low-level representation
coerce :: (Contravariant f, Functor f) => f a -> f bSource
Copypaste from Control.Lens.Internal.Getter
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
method :: Functor f => (ByteString -> f ByteString) -> R h -> f (R h)Source