Safe Haskell | None |
---|---|
Language | Haskell2010 |
- download :: forall m. MonadIO m => Environment -> Text -> m (Either Error Playlist)
- data Error
- data Environment = Environment {
- httpManager :: Manager
- httpByteCheck :: Int -> ByteStatus
- data ByteStatus
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
.
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.
Environment | |
|
data ByteStatus Source #
A status flag used to indicate if a download byte limit has been reached.
Continue | Continue processing network data. |
LimitReached | Abort playlist processing. |