| Safe Haskell | None |
|---|
Network.Haskheap
Description
A library for interfacing with the refheap (https:www.refheap.com) API.
Documentation
Result of as successful request (either empty or a paste).
Constructors
| Paste | |
Fields
| |
| Empty | Operation was successful, but response is empty. |
getPaste :: PasteID -> IO (Either Error Success)Source
Get a paste from refheap. Will return IO Nothing if the paste doesn't exist.
createPaste :: Contents -> Bool -> Language -> Maybe Auth -> IO (Either Error Success)Source
Create a new paste.
deletePaste :: PasteID -> Auth -> IO (Either Error Success)Source
Delete a paste. If it fails for some reason, will return the error message from refheap's API wrapped in Maybe, otherwise Nothing.