Permalink
Browse files

CustomMonitors: added support for additional params

  • Loading branch information...
1 parent 712f857 commit cd18e24a66e92c286b50ce86720130564b474cf8 @danfruehauf danfruehauf committed Jun 28, 2012
Showing with 19 additions and 2 deletions.
  1. +6 −0 Changes
  2. +1 −1 lib/Monitis.pm
  3. +12 −1 lib/Monitis/CustomMonitors.pm
View
@@ -1,5 +1,11 @@
Revision history for Monitis
+0.93 Thu Jun 28 16:30:00 2012
+ CustomMonitors: added support for additional params
+
+0.92 Mon Apr 30 19:24:51 2012
+ CustomMonitors: added support for monitor type
+
0.91 Wed Jul 13 11:59:54 2011
improved live tests
View
@@ -11,7 +11,7 @@ use HTTP::Request::Common;
use Digest::SHA 'hmac_sha1_base64';
use JSON;
-our $VERSION = '0.92';
+our $VERSION = '0.93';
use constant DEBUG => $ENV{MONITIS_DEBUG} || 0;
@@ -12,7 +12,7 @@ sub add {
my ($self, @params) = @_;
my @mandatory = qw/name tag resultParams/;
- my @optional = qw/type monitorParams/;
+ my @optional = qw/type monitorParams additionalResultParams/;
my $params = $self->prepare_params(\@params, \@mandatory, \@optional);
@@ -63,6 +63,17 @@ sub add_results {
return $self->api_post('addResult' => $params);
}
+sub add_additional_results {
+ my ($self, @params) = @_;
+
+ my @mandatory = qw/monitorId checktime results/;
+ my @optional = ();
+
+ my $params = $self->prepare_params(\@params, \@mandatory, \@optional);
+
+ return $self->api_post('addAdditionalResults' => $params);
+}
+
sub get_results {
my ($self, @params) = @_;

0 comments on commit cd18e24

Please sign in to comment.