From 336642f1f173e982eddb68bcbac6c923c2cf9d62 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Sun, 22 Mar 2015 16:24:57 -0400 Subject: [PATCH] rebuild docs --- index.html | 270 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 270 insertions(+) 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

Node Dogapi

+
+
+

comment

+ +
+

create(message, properties, callback)

+
+

create a new comment

+

Parameters:

+
+
message
+

the message of the comment

+
+
properties
+

optional, an object containing any of the following

+
    +
  • handle: the handle to associate the comment with (e.g. "user@domain.com")
  • +
  • related_event_id: the event to associate the comment with
  • +
+
+
callback
+

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(commentId, message, handle, callback)

+
+

update an existing comment

+

Parameters:

+
+
commentId
+

the id of the comment to update

+
+
message
+

the message of the comment

+
+
handle
+

optional, the handle to associate the comment with (e.g. "user@domain.com")

+
+
callback
+

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(commentId, callback)

+
+

remove a comment

+

Parameters:

+
+
commentId
+

the id of the comment to remove

+
+
callback
+

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);
+});
+
+
+
+
+
+
+

downtime

+ +
+

create(scope, properties, callback)

+
+

schedule a new downtime

+

Parameters:

+
+
scope
+

string scope that the downtime should apply to (e.g. "env:staging")

+
+
properties
+

optional, an object containing any of the following

+
    +
  • start: POSIX timestamp for when the downtime should start
  • +
  • end: POSIX timestamp for when the downtime should end
  • +
  • message: a string message to accompany the downtime
  • +
+
+
callback
+

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(downtimeId, properties, callback)

+
+

update an existing downtime

+

Parameters:

+
+
downtimeId
+

the id the downtie to update

+
+
properties
+

optional, an object containing any of the following

+
    +
  • scope: the scope the downtime should be changed to (e.g. "env:staging")
  • +
  • start: POSIX timestamp for when the downtime should start
  • +
  • end: POSIX timestamp for when the downtime should end
  • +
  • message: a string message to accompany the downtime
  • +
+
+
callback
+

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);
+});
+
+
+
+
+

remove(downtimeId, callback)

+
+

delete a scheduled downtime

+

Parameters:

+
+
downtimeId
+

the id of the downtime

+
+
callback
+

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(downtimeId, callback)

+
+

get a scheduled downtimes details

+

Parameters:

+
+
downtimeId
+

the id of the downtime

+
+
callback
+

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);
+});
+
+
+
+
+

getAll(callback)

+
+

get all downtimes details

+

Parameters:

+
+
callback
+

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);
+});
+
+
+
+

event