add overload for AddAlert

This commit is contained in:
2013-08-19 21:03:11 +02:00
parent a144aa1914
commit 8599cec7e6
+18
View File
@@ -39,6 +39,24 @@ namespace UptimeSharp
}
/// <summary>
/// Adds an alert.
/// mobile/SMS alert contacts are not supported yet, see: http://www.uptimerobot.com/api.asp#methods
/// </summary>
/// <param name="alert">The alert.</param>
/// <returns></returns>
public bool AddAlert(Alert alert)
{
List<Parameter> parameters = new List<Parameter>()
{
Utilities.CreateParam("alertContactType", (int)alert.Type),
Utilities.CreateParam("alertContactValue", alert.Value)
};
return Get<DefaultResponse>("newAlertContact", parameters).Status;
}
/// <summary>
/// Removes an alert.
/// </summary>