diff --git a/UptimeSharp/Components/Alert.cs b/UptimeSharp/Components/Alert.cs index d3eccff..47cf705 100644 --- a/UptimeSharp/Components/Alert.cs +++ b/UptimeSharp/Components/Alert.cs @@ -39,6 +39,24 @@ namespace UptimeSharp } + /// + /// Adds an alert. + /// mobile/SMS alert contacts are not supported yet, see: http://www.uptimerobot.com/api.asp#methods + /// + /// The alert. + /// + public bool AddAlert(Alert alert) + { + List parameters = new List() + { + Utilities.CreateParam("alertContactType", (int)alert.Type), + Utilities.CreateParam("alertContactValue", alert.Value) + }; + + return Get("newAlertContact", parameters).Status; + } + + /// /// Removes an alert. ///