remove params keyword from RetrieveAlerts and update docs

This commit is contained in:
2013-08-20 23:07:19 +02:00
parent 1534a93b68
commit d603ea82aa
2 changed files with 10 additions and 3 deletions
+4 -3
View File
@@ -1,4 +1,5 @@
using RestSharp;
using System;
using System.Collections.Generic;
using UptimeSharp.Models;
@@ -12,11 +13,11 @@ namespace UptimeSharp
/// <summary>
/// Retrieves alerts from UptimeRobot
/// </summary>
/// <param name="IDs">Retrieve specified alert contacts by supplying IDs for them.</param>
/// <param name="alertIDs">Retrieve specified alert contacts by supplying IDs for them.</param>
/// <returns></returns>
public List<Alert> RetrieveAlerts(params int[] alertIDs)
public List<Alert> RetrieveAlerts(int[] alertIDs = null)
{
Parameter alerts = Parameter("alertcontacts", alertIDs.Length > 0 ? string.Join("-", alertIDs) : null);
Parameter alerts = Parameter("alertcontacts", alertIDs != null ? string.Join("-", alertIDs) : null);
return Get<AlertResponse>("getAlertContacts", alerts).Items;
}
+6
View File
@@ -147,6 +147,12 @@ namespace UptimeSharp
}
/// <summary>
/// Creates a RestSharp.Parameter instance.
/// </summary>
/// <param name="name">The name.</param>
/// <param name="value">The value.</param>
/// <returns></returns>
public static Parameter Parameter(string name, object value)
{
return new Parameter()