From e8d4705a38f0ce81bfb6e0f0fdacc3d53f1a4e4f Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Fri, 28 Feb 2014 10:35:47 +0100 Subject: [PATCH] add Web-Hook alert support --- UptimeSharp.Tests/AlertsTest.cs | 3 +++ UptimeSharp/Components/Alert.cs | 2 +- UptimeSharp/Models/Alert.cs | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/UptimeSharp.Tests/AlertsTest.cs b/UptimeSharp.Tests/AlertsTest.cs index 386034c..dad75b3 100644 --- a/UptimeSharp.Tests/AlertsTest.cs +++ b/UptimeSharp.Tests/AlertsTest.cs @@ -55,14 +55,17 @@ namespace UptimeSharp.Tests { Alert alert1; Alert alert2; + Alert alert3; Assert.NotNull(alert1 = await client.AddAlert(AlertType.Email, "example1@ceecore.com")); Assert.NotNull(alert2 = await client.AddAlert(AlertType.Boxcar, "example2@ceecore.com")); + Assert.NotNull(alert3 = await client.AddAlert(AlertType.WebHook, "http://ceecore.com?")); try { await client.DeleteAlert(alert1); await client.DeleteAlert(alert2); + await client.DeleteAlert(alert3); } catch { } } diff --git a/UptimeSharp/Components/Alert.cs b/UptimeSharp/Components/Alert.cs index 8ad3d6a..c3cf554 100644 --- a/UptimeSharp/Components/Alert.cs +++ b/UptimeSharp/Components/Alert.cs @@ -45,7 +45,7 @@ namespace UptimeSharp /// /// Adds an alert. - /// mobile/SMS alert contacts are not supported yet, see: http://www.uptimerobot.com/api.asp#methods + /// SMS & Twitter alert contacts are not supported yet, see: http://www.uptimerobot.com/api.asp#methods /// /// The type. /// The value. diff --git a/UptimeSharp/Models/Alert.cs b/UptimeSharp/Models/Alert.cs index 2a534a0..1ea4bfe 100644 --- a/UptimeSharp/Models/Alert.cs +++ b/UptimeSharp/Models/Alert.cs @@ -90,7 +90,11 @@ namespace UptimeSharp.Models /// /// Boxcar /// - Boxcar = 4 + Boxcar = 4, + /// + /// Web Hook + /// + WebHook = 5 }