iron-mq-0.1.1.0: Iron.IO message queueing client library

Safe HaskellNone
LanguageHaskell2010

Network.IronMQ

Contents

Synopsis

Some type synonyms to help keel track of things

type Url = Text Source

type Param = (Text, Text) Source

type ID = Text Source

Some functions to make HTTP requests easier

baseurl :: Client -> Text Source

Construct a base URL for HTTP requests from a client

emptyBody :: Payload Source

An empty body for POST/PUT requests

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

getQueue :: Client -> QueueName -> IO Queue Source

Get a queue from 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

getMessageById :: Client -> QueueName -> ID -> IO Message Source

Get a message by ID

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

clear :: Client -> QueueName -> IO IronResponse Source

Clear all messages from 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

touch :: Client -> QueueName -> ID -> IO IronResponse Source

Touch a message on the queue

update :: Client -> QueueName -> [Subscriber] -> IO IronResponse Source

Update a queues subscribers

addAlerts :: Client -> QueueName -> [Alert] -> IO IronResponse Source

Add alerts to a queue

updateAlerts :: Client -> QueueName -> [Alert] -> IO IronResponse Source

Update alerts on a queue

addSubscribers :: Client -> QueueName -> [Subscriber] -> IO IronResponse Source

Add subscribers to a queue

data Client Source

Constructors

Client 

Instances

message :: Message Source

A default constructor for message