pushover- A Haskell Pushover API library

Safe HaskellNone



This module exposes types intended to make it easy to incorporate Pushover request functionality within an existing application.

The PushoverReader class is designed to make it easy to extend an existing reader environment to include the information required by Pushover in the making of requests.

PushoverKeys is a simple type available for immediate use should a developer not yet have a reader environment and wants quickly to use Pushover.



class PushoverReader r where Source #

The PushoverReader class is intended to make it straightforward to incorporate the making of Pushover requests within an existing monad stack.

This class is intended to make it easy to add an API token and user key to an existing reader monad environment.

Minimal complete definition

apiToken, userKey

data PushoverKeys Source #

A basic type for use in storing the pair of keys required for making a request.



type UnvalidatedAPIToken = Text Source #

An unvalidated API token.

type UnvalidatedUserKey = Text Source #

An unvalidated user key.

createKeys :: (Error e, MonadError e m) => UnvalidatedAPIToken -> UnvalidatedUserKey -> m PushoverKeys Source #

Construct a PushoverKeys value.

This attempts to create valid tokens/keys from a pair of unvalidated tokens/keys, returning the result wrapped within a MonadError.