-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Pushover.net API functions
--
@package hPushover
@version 0.2
-- | 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.
module Saas.Pushover
-- | The PushMessage data structure. To construct one of these, you should
-- alter the message under *defaultMessage* using record syntax.
data PushMessage
PM :: Text -> Text -> Text -> Text -> Text -> Text -> Text -> Int -> Text -> Text -> Text -> Int -> Int -> Int -> PushMessage
token :: PushMessage -> Text
user :: PushMessage -> Text
message :: PushMessage -> Text
device :: PushMessage -> Text
title :: PushMessage -> Text
url :: PushMessage -> Text
urlTitle :: PushMessage -> Text
priority :: PushMessage -> Int
timestamp :: PushMessage -> Text
sound :: PushMessage -> Text
callback :: PushMessage -> Text
expire :: PushMessage -> Int
retry :: PushMessage -> Int
html :: PushMessage -> Int
-- | 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.
data PushResponse
PR :: Int -> Text -> Maybe Text -> Maybe [Text] -> PushResponse
status :: PushResponse -> Int
request :: PushResponse -> Text
receipt :: PushResponse -> Maybe Text
errors :: PushResponse -> Maybe [Text]
-- | 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.
data ReceiptResponse
RR :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> ReceiptResponse
receiptstatus :: ReceiptResponse -> Int
acknowledged :: ReceiptResponse -> Int
acknowledgedAt :: ReceiptResponse -> Int
lastDeliveredAt :: ReceiptResponse -> Int
expired :: ReceiptResponse -> Int
expiresAt :: ReceiptResponse -> Int
calledBack :: ReceiptResponse -> Int
calledBackAt :: ReceiptResponse -> Int
type Apptoken = Text
type Receipt = Text
-- | 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)).
defaultMessage :: PushMessage
-- | Sends a push message to the Pushover servers.
sendPushMessage :: PushMessage -> IO PushResponse
-- | Inquire about a receipt.
checkReceipt :: Apptoken -> Receipt -> IO ReceiptResponse
instance Show PushMessage
instance Eq PushMessage
instance Show PushResponse
instance Eq PushResponse
instance Show ReceiptResponse
instance Eq ReceiptResponse
instance FromJSON ReceiptResponse
instance FromJSON PushResponse