hPushover-0.2: Pushover.net API functions

Safe HaskellNone




Small library that provides functions to send push messages to Android and Apple devices which have the Pushover app installed. Please note that the IO functions make use of the network stack and should be wrapped with withSocketsDo.


Data types

data PushMessage Source

The PushMessage data structure. To construct one of these, you should alter the message under *defaultMessage* using record syntax.




token :: Text
user :: Text
message :: Text
device :: Text
title :: Text
url :: Text
urlTitle :: Text
priority :: Int
timestamp :: Text
sound :: Text
callback :: Text
expire :: Int
retry :: Int
html :: Int

data PushResponse Source

When you send a PushMessage, the server replies with at least a status code and a request number. See the pushover API documentation for what each field means.




status :: Int
request :: Text
receipt :: Maybe Text
errors :: Maybe [Text]

data ReceiptResponse Source

The reponse you get when you inquire about a receipt for a priority 2 message. See the pushover API documentation for what each field means.

Default constructor

defaultMessage :: PushMessage Source

A default PushMessage (all empty fields except token, user and message will be removed later in the POST request, but the fields have to be there to overwrite them later (if you want)).

IO functions

sendPushMessage :: PushMessage -> IO PushResponse Source

Sends a push message to the Pushover servers.

checkReceipt :: Apptoken -> Receipt -> IO ReceiptResponse Source

Inquire about a receipt.