Safe Haskell | None |
---|
A library for interfacing with the refheap (https:www.refheap.com) API.
- data Success
- getPaste :: PasteID -> IO (Either Error Success)
- createPaste :: Contents -> Bool -> Language -> Maybe Auth -> IO (Either Error Success)
- deletePaste :: PasteID -> Auth -> IO (Either Error Success)
- forkPaste :: PasteID -> Auth -> IO (Either Error Success)
- editPaste :: PasteID -> Contents -> Bool -> Language -> Auth -> IO (Either Error Success)
- getHighlightedPaste :: PasteID -> IO (Either Error Success)
Documentation
Result of as successful request (either empty or a paste).
Paste | |
| |
Line String | A string was returned by the API that can't be represented as a paste. |
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.
editPaste :: PasteID -> Contents -> Bool -> Language -> Auth -> IO (Either Error Success)Source
Edit a paste.
getHighlightedPaste :: PasteID -> IO (Either Error Success)Source
Get the highlighted body of a paste. This does not include theme css, just raw HTML.