pushover-0.1.0.1: A Haskell Pushover API library

Safe HaskellNone
LanguageHaskell2010

Network.Pushover.Request

Contents

Synopsis

Constructing a request

data Request Source #

Contains the contents of a Pushover notification request. This follows the API specification at https://pushover.net/api.

Constructors

Request 

Fields

defaultRequest :: APIToken -> UserKey -> Message -> Request Source #

Construct a default request value.

As a request requires, at a minimum, an API token, a user key and a message, this function requires each of these values as an argument. Other fields can then be initialised using the regular Haskell record syntax.

Other request parameters

data URL Source #

A URL for sending within a notification request.

A Pushover URL is optional within a request; if present, it may optionally contain a title to display instead of the URL itself.

Constructors

URL 

Fields

Instances

Eq URL Source # 

Methods

(==) :: URL -> URL -> Bool #

(/=) :: URL -> URL -> Bool #

Show URL Source # 

Methods

showsPrec :: Int -> URL -> ShowS #

show :: URL -> String #

showList :: [URL] -> ShowS #

data Priority Source #

Describes the priority of a particular message.

The different priority settings affect the way in which a notification is presented to the user. See https://pushover.net/api#priority for specific details.

Constructors

Lowest 
Low 
Normal 
High 
Emergency 

HTTP request helper

makeHttpRequest :: Request -> IO Request Source #

Construct an HTTP request out of a Pushover request value.

This function is exposed for use by the functions in the Network.Pushover.Execute module. It is unlikely that the user will require to call it directly.