add Web-Hook alert support
This commit is contained in:
@@ -55,14 +55,17 @@ namespace UptimeSharp.Tests
|
|||||||
{
|
{
|
||||||
Alert alert1;
|
Alert alert1;
|
||||||
Alert alert2;
|
Alert alert2;
|
||||||
|
Alert alert3;
|
||||||
|
|
||||||
Assert.NotNull(alert1 = await client.AddAlert(AlertType.Email, "example1@ceecore.com"));
|
Assert.NotNull(alert1 = await client.AddAlert(AlertType.Email, "example1@ceecore.com"));
|
||||||
Assert.NotNull(alert2 = await client.AddAlert(AlertType.Boxcar, "example2@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
|
try
|
||||||
{
|
{
|
||||||
await client.DeleteAlert(alert1);
|
await client.DeleteAlert(alert1);
|
||||||
await client.DeleteAlert(alert2);
|
await client.DeleteAlert(alert2);
|
||||||
|
await client.DeleteAlert(alert3);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace UptimeSharp
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds an alert.
|
/// 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
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">The type.</param>
|
/// <param name="type">The type.</param>
|
||||||
/// <param name="value">The value.</param>
|
/// <param name="value">The value.</param>
|
||||||
|
|||||||
@@ -90,7 +90,11 @@ namespace UptimeSharp.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Boxcar
|
/// Boxcar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Boxcar = 4
|
Boxcar = 4,
|
||||||
|
/// <summary>
|
||||||
|
/// Web Hook
|
||||||
|
/// </summary>
|
||||||
|
WebHook = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user