| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Network.IronMQ
Contents
- type Url = Text
 - type Endpoint = Text
 - type Param = (Text, Text)
 - type QueueName = Text
 - type ID = Text
 - baseurl :: Client -> Text
 - emptyBody :: Payload
 - getJSONWithOpts :: FromJSON a => Client -> Endpoint -> [Param] -> IO a
 - getJSON :: FromJSON a => Client -> Endpoint -> IO a
 - postJSONWithBody :: (Postable a, FromJSON b) => Client -> Endpoint -> a -> IO b
 - postJSON :: (ToJSON b, FromJSON b) => Client -> Endpoint -> IO b
 - deleteJSON :: FromJSON a => Client -> Endpoint -> IO a
 - queues :: Client -> IO [QueueSummary]
 - getQueue :: Client -> QueueName -> IO Queue
 - getMessages' :: Client -> QueueName -> Maybe Int -> Maybe Int -> IO MessageList
 - getMessages :: Client -> QueueName -> IO MessageList
 - getMessageById :: Client -> QueueName -> ID -> IO Message
 - getMessagePushStatus :: Client -> QueueName -> ID -> IO PushStatus
 - postMessages :: Client -> QueueName -> [Message] -> IO IronResponse
 - clear :: Client -> QueueName -> IO IronResponse
 - deleteQueue :: Client -> QueueName -> IO IronResponse
 - deleteMessage :: Client -> QueueName -> ID -> IO IronResponse
 - deleteMessagePushStatus :: Client -> QueueName -> ID -> IO IronResponse
 - deleteAlerts :: Client -> QueueName -> [ID] -> IO IronResponse
 - deleteAlert :: Client -> QueueName -> ID -> IO IronResponse
 - deleteSubscribers :: t -> t1 -> t2 -> t3
 - peek' :: Client -> QueueName -> Maybe Int -> IO MessageList
 - peek :: Client -> QueueName -> IO MessageList
 - touch :: Client -> QueueName -> ID -> IO IronResponse
 - update :: Client -> QueueName -> [Subscriber] -> IO IronResponse
 - addAlerts :: Client -> QueueName -> [Alert] -> IO IronResponse
 - updateAlerts :: Client -> QueueName -> [Alert] -> IO IronResponse
 - addSubscribers :: Client -> QueueName -> [Subscriber] -> IO IronResponse
 - data Client = Client {}
 - message :: Message
 
Some type synonyms to help keel track of things
Some functions to make HTTP requests easier
getJSONWithOpts :: FromJSON a => Client -> Endpoint -> [Param] -> IO a Source
Make a GET request to an endpoint using connection info from client and query string set to parameters. Return the JSON results
getJSON :: FromJSON a => Client -> Endpoint -> IO a Source
Make a GET request to an endpoint using the connection info from client. Return the JSON results.
postJSONWithBody :: (Postable a, FromJSON b) => Client -> Endpoint -> a -> IO b Source
Make a POST a request to an endpoint using connection info from client and the body provided. Return the JSON response.
postJSON :: (ToJSON b, FromJSON b) => Client -> Endpoint -> IO b Source
Make a POST request to an endpoint using the connection into from client and an empty body. Returb the JSON response.
The public API
queues :: Client -> IO [QueueSummary] Source
Get a list of queues available to the client
getMessages' :: Client -> QueueName -> Maybe Int -> Maybe Int -> IO MessageList Source
Get a list of messages on the queue (allowing specification of number of messages and delay)
getMessages :: Client -> QueueName -> IO MessageList Source
Get a list of messages on a queue
getMessagePushStatus :: Client -> QueueName -> ID -> IO PushStatus Source
Get the push status of a message
postMessages :: Client -> QueueName -> [Message] -> IO IronResponse Source
Post messages to a queue
deleteQueue :: Client -> QueueName -> IO IronResponse Source
Delete a queue
deleteMessage :: Client -> QueueName -> ID -> IO IronResponse Source
Delete a message from a queue
deleteMessagePushStatus :: Client -> QueueName -> ID -> IO IronResponse Source
Delete the message push status of a message
deleteAlerts :: Client -> QueueName -> [ID] -> IO IronResponse Source
Remove alerts from a queue
deleteAlert :: Client -> QueueName -> ID -> IO IronResponse Source
Remove an alert from a queue
deleteSubscribers :: t -> t1 -> t2 -> t3 Source
peek' :: Client -> QueueName -> Maybe Int -> IO MessageList Source
Take a look at the next item on the queue
update :: Client -> QueueName -> [Subscriber] -> IO IronResponse Source
Update a queues subscribers
updateAlerts :: Client -> QueueName -> [Alert] -> IO IronResponse Source
Update alerts on a queue
addSubscribers :: Client -> QueueName -> [Subscriber] -> IO IronResponse Source
Add subscribers to a queue