Permalink
Browse files

update readme for alerts

  • Loading branch information...
1 parent 35f76a3 commit 6b438de9db524d5aaad686effda74eafcb883f9b @freeman1988 freeman1988 committed Feb 19, 2014
Showing with 43 additions and 0 deletions.
  1. +43 −0 README.md
View
@@ -351,6 +351,49 @@ $ironmq->clearQueue($queue_name);
--
+### Add alerts to a queue. This is for Pull Queue only.
+
+```php
+<?php
+$first_alert = array(
+ 'type' => 'fixed',
+ 'direction' => 'desc',
+ 'trigger' => 1001,
+ 'snooze' => 10,
+ 'queue' => 'test_alert_queue');
+$second_alert = array(
+ 'type' => 'fixed',
+ 'direction' => 'asc',
+ 'trigger' => 1000,
+ 'snooze' => 5,
+ 'queue' => 'test_alert_queue',);
+
+$res = $ironmq->addAlerts("test_alert_queue", array($first_alert, $second_alert));
+```
+
+### Replace current queue alerts with a given list of alerts. This is for Pull Queue only.
+
+```php
+<?php
+$res = $ironmq->updateAlerts("test_alert_queue", array($first_alert, $second_alert));
+```
+
+### Remove alerts from a queue. This is for Pull Queue only.
+
+```php
+<?php
+$ironmq->deleteAlerts("test_alert_queue", $alert_ids);
+```
+
+### Remove alert from a queue by its ID. This is for Pull Queue only.
+
+```php
+<?php
+$ironmq->deleteAlertById("test_alert_queue", $alert_id);
+```
+
+--
+
## Push Queues

0 comments on commit 6b438de

Please sign in to comment.