diff --git a/index.html b/index.html index 75a0a2a..c7bdd33 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,10 @@ document.addEventListener("DOMContentLoaded", function(){hljs.initHighlightingOn
create a new comment
+the message of the comment
+optional, an object containing any of the following
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.comment.create("a comment message", function(err, res){
+ console.dir(res);
+});
+
+update an existing comment
+the id of the comment to update
+the message of the comment
+optional, the handle to associate the comment with (e.g. "user@domain.com")
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.comment.update(1234, "new message", function(err, res){
+ console.dir(res);
+});
+
+remove a comment
+the id of the comment to remove
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.comment.remove(1234, function(err, res){
+ console.dir(res);
+});
+
+schedule a new downtime
+string scope that the downtime should apply to (e.g. "env:staging")
+optional, an object containing any of the following
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.downtime.create("env:staging", function(err, res){
+ console.dir(res);
+});
+
+update an existing downtime
+the id the downtie to update
+optional, an object containing any of the following
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+var properties = {
+ scope: "env:staging"
+};
+dogapi.downtime.update(1234, properties, function(err, res){
+ console.dir(res);
+});
+
+delete a scheduled downtime
+the id of the downtime
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.downtime.remove(1234, function(err, res){
+ console.dir(res);
+});
+
+get a scheduled downtimes details
+the id of the downtime
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.downtime.get(1234, function(err, res){
+ console.dir(res);
+});
+
+get all downtimes details
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.downtime.getAll(function(err, res){
+ console.dir(res);
+});
+
+