| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Text.Playlist.HTTP.Full
Description
Synopsis
- download :: forall m. MonadIO m => Environment -> Text -> m (Either Error Playlist)
- data Error
- data Environment = Environment {
- httpManager :: Manager
- httpByteCheck :: Int -> ByteStatus
- data ByteStatus
- module Text.Playlist
Documentation
download :: forall m. MonadIO m => Environment -> Text -> m (Either Error Playlist) Source #
Given an Environment and a URL, recursively download and
process a playlist.
For an example of using this function see the example.hs file
included in this package.
Possible error values produced while downloading and resolving a
Playlist.
Constructors
| InvalidURL Text | URL could not be parsed. |
| ResponseTooLarge | Byte limit exceeded. |
| ProtocolError HttpException | HTTP/Network error. |
| FailedToParse String | Invalid playlist format. |
| FailedOnException String | Unknown exception. |
data Environment Source #
Details needed by the download function to operate.
Constructors
| Environment | |
Fields
| |
data ByteStatus Source #
A status flag used to indicate if a download byte limit has been reached.
Constructors
| Continue | Continue processing network data. |
| LimitReached | Abort playlist processing. |
module Text.Playlist