aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/clients/refresh.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/clients/refresh.js b/lib/clients/refresh.js
index 7b9fde7..a88d899 100644
--- a/lib/clients/refresh.js
+++ b/lib/clients/refresh.js
@@ -92,8 +92,14 @@ RefreshClient.prototype.getDevice = function(id) {
return this._doRequest('/devices/' + id);
};
-RefreshClient.prototype.getAlerts = function() {
- return this._doRequest('/alerts');
+RefreshClient.prototype.getAlerts = function(options) {
+ var url = '/alerts';
+ if (options && options.alert_minutes) {
+ url += '?alert_minutes=' + options.alert_minutes;
+ } else if (options && options.alert_days) {
+ url += '?alert_days=' + options.alert_days;
+ }
+ return this._doRequest(url);
};
RefreshClient.prototype.getAlert = function(id) {