diff --git a/README.md b/README.md index 76acbfe..7cbaaac 100644 --- a/README.md +++ b/README.md @@ -190,13 +190,13 @@ List items = _client.GetAlerts(); Retrieve alerts by IDs: ```csharp -List items = _client.GetAlerts(new int[]{ 12897, 98711 }); +List items = _client.GetAlerts(new string[]{ "12897", "98711" }); ``` Retrieve a specific alert: ```csharp -Alert item = _client.GetAlert(12897); +Alert item = _client.GetAlert("12897"); ``` Adds an alert _(Due to UptimeRobot API limitations SMS and Twitter alert contact types are not supported yet)_: @@ -215,7 +215,7 @@ bool isSuccess = _client.AddAlert(myAlert); Deletes an alert: ```csharp -bool isSuccess = _client.DeleteAlert(12897); +bool isSuccess = _client.DeleteAlert("12897"); ``` Deletes an alert from instance: @@ -229,6 +229,7 @@ bool isSuccess = _client.DeleteAlert(myAlert); ## Release History +- 2013-08-28 v0.2.0 Request Validation - 2013-08-26 v0.1.1 Adding a Port monitor works now - 2013-08-25 v0.1.0 Monitor and Alert APIs diff --git a/UptimeSharp.Website/index.html b/UptimeSharp.Website/index.html index 827b6bc..0f36428 100644 --- a/UptimeSharp.Website/index.html +++ b/UptimeSharp.Website/index.html @@ -87,6 +87,7 @@ localhost | Ping

Release History

    +
  • 2013-08-28 v0.2.0 Request Validation
  • 2013-08-26 v0.1.1 Adding a Port monitor works now
  • 2013-08-25 v0.1.0 Monitor and Alert APIs
@@ -133,20 +134,20 @@ Monitor item = _client.GetMonitor(12891);

- +

Add

Adds/creates a new monitor.

bool AddMonitor(
-    string name, 
-    string uri, 
-    Type type = Type.HTTP, 
+    string name,
+    string uri,
+    Type type = Type.HTTP,
     Subtype subtype = Subtype.Unknown,
-    int? port = null, 
-    string keywordValue = null, 
+    int? port = null,
+    string keywordValue = null,
     KeywordType keywordType = KeywordType.Unknown,
-    int[] alerts = null, 
+    int[] alerts = null,
     string HTTPUsername = null,
     string HTTPPassword = null
 )
@@ -194,26 +195,26 @@ bool isSuccess = _client.ModifyMonitor(myMonitor);

Retrieve all alerts:

List<Alert> items = _client.GetAlerts();

Retrieve alerts by IDs:

-
List<Alert> items = _client.GetAlerts(new int[]{ 12897, 98711 });
+
List<Alert> items = _client.GetAlerts(new string[]{ "12897", "98711" });

Retrieve a specific alert:

-
Alert item = _client.GetAlert(12897);
+
Alert item = _client.GetAlert("12897");

Adds an alert (Due to UptimeRobot API limitations SMS and Twitter alert contact types are not supported yet):

bool isSuccess = _client.AddAlert(AlertType.Email, "uptimesharp@outlook.com");

Adds an alert from instance:

// Alert myAlert = ...
 bool isSuccess = _client.AddAlert(myAlert);

Deletes an alert:

-
bool isSuccess = _client.DeleteAlert(12897);
+
bool isSuccess = _client.DeleteAlert("12897");

Deletes an alert from instance:

// Alert myAlert = ...
 bool isSuccess = _client.DeleteAlert(myAlert);
- +

Delete

Delete a monitor by ID:

-
bool isSuccess = _client.DeleteMonitor(12891);
+
bool isSuccess = _client.DeleteMonitor("12891");

Delete a monitor by a Monitor instance:

// Monitor myMonitor = ...
 bool isSuccess = _client.DeleteMonitor(myMonitor);
diff --git a/UptimeSharp.Website/package.json b/UptimeSharp.Website/package.json index 170513f..84f961d 100644 --- a/UptimeSharp.Website/package.json +++ b/UptimeSharp.Website/package.json @@ -1,6 +1,6 @@ { - "name": "wingsforlife", - "version": "0.1.0", + "name": "uptimesharp", + "version": "0.2.0", "devDependencies": { "grunt": "~0.4.1", "grunt-contrib-uglify": "~0.1.2", diff --git a/UptimeSharp.nuspec b/UptimeSharp.nuspec index 739e330..e0f44f0 100644 --- a/UptimeSharp.nuspec +++ b/UptimeSharp.nuspec @@ -2,7 +2,7 @@ UptimeSharp - 0.1.1 + 0.2.0 UptimeSharp Tobias Klika Tobias Klika @@ -37,4 +37,4 @@ - \ No newline at end of file +