update inline docs

This commit is contained in:
2014-01-13 23:04:27 +01:00
parent 8363a78ef4
commit ba1feaa55d
2 changed files with 12 additions and 2 deletions
+6 -2
View File
@@ -16,6 +16,7 @@ namespace UptimeSharp
/// <param name="alertIDs">Retrieve specified alert contacts by supplying IDs for them.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns></returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<List<Alert>> GetAlerts(string[] alertIDs = null, CancellationToken cancellationToken = default(CancellationToken))
{
AlertResponse response = await Request<AlertResponse>("getAlertContacts", cancellationToken, new Dictionary<string, string>()
@@ -33,6 +34,7 @@ namespace UptimeSharp
/// <param name="alertID">The alertID.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns></returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<Alert> GetAlert(string alertID, CancellationToken cancellationToken = default(CancellationToken))
{
List<Alert> alerts = await GetAlerts(new string[] { alertID }, cancellationToken);
@@ -49,7 +51,7 @@ namespace UptimeSharp
/// <param name="value">The value.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns></returns>
/// <exception cref="UptimeSharpException">AlertType.SMS and AlertType.Twitter are not supported by the UptimeRobot API</exception>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> AddAlert(AlertType type, string value, CancellationToken cancellationToken = default(CancellationToken))
{
if (type == AlertType.SMS || type == AlertType.Twitter)
@@ -74,6 +76,7 @@ namespace UptimeSharp
/// <param name="alert">The alert.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns></returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> AddAlert(Alert alert, CancellationToken cancellationToken = default(CancellationToken))
{
return await AddAlert(alert.Type, alert.Value, cancellationToken);
@@ -86,7 +89,7 @@ namespace UptimeSharp
/// <param name="alertID">The alert ID.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns></returns>
/// <exception cref="UptimeSharpException">Can't delete main alert</exception>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> DeleteAlert(string alertID, CancellationToken cancellationToken = default(CancellationToken))
{
if (alertID.StartsWith("0"))
@@ -109,6 +112,7 @@ namespace UptimeSharp
/// <param name="alert">The alert.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns></returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> DeleteAlert(Alert alert, CancellationToken cancellationToken = default(CancellationToken))
{
return await DeleteAlert(alert.ID, cancellationToken);
+6
View File
@@ -23,6 +23,7 @@ namespace UptimeSharp
/// <returns>
/// Monitor List
/// </returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<List<Models.Monitor>> GetMonitors(
int[] monitorIDs = null,
float[] customUptimeRatio = null,
@@ -55,6 +56,7 @@ namespace UptimeSharp
/// <returns>
/// The Monitor
/// </returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<Models.Monitor> GetMonitor(
int monitorId,
float[] customUptimeRatio = null,
@@ -75,6 +77,7 @@ namespace UptimeSharp
/// <returns>
/// Success state
/// </returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> DeleteMonitor(int monitorId, CancellationToken cancellationToken = default(CancellationToken))
{
DefaultResponse response = await Request<DefaultResponse>("getMonitors", cancellationToken, new Dictionary<string, string>()
@@ -93,6 +96,7 @@ namespace UptimeSharp
/// <returns>
/// Success state
/// </returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> DeleteMonitor(Models.Monitor monitor, CancellationToken cancellationToken = default(CancellationToken))
{
return await DeleteMonitor(monitor.ID, cancellationToken);
@@ -116,6 +120,7 @@ namespace UptimeSharp
/// <returns>
/// Success state
/// </returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> AddMonitor(
string name,
string uri,
@@ -156,6 +161,7 @@ namespace UptimeSharp
/// <returns>
/// Success state
/// </returns>
/// <exception cref="UptimeSharpException"></exception>
public async Task<bool> ModifyMonitor(Models.Monitor monitor, CancellationToken cancellationToken = default(CancellationToken))
{
List<string> alerts = null;