diff --git a/index.html b/index.html index 2b0a6a5..1846c11 100644 --- a/index.html +++ b/index.html @@ -32,6 +32,8 @@ document.addEventListener("DOMContentLoaded", function(){hljs.initHighlightingOn
create a new screenboard
+the name of the screenboard
+description of the screenboard
+an array of objects which required the following keys
+optional, a object which can contain any of the following keys
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+var title = "my screenboard";
+var description = "it is super awesome";
+var graphs = [
+ {
+ type: "image",
+ height: 20,
+ width: 32,
+ y: 7,
+ x: 32,
+ url: "https://path/to/image.jpg"
+ }
+];
+var options = {
+ templateVariables: [
+ {
+ name: "host1",
+ prefix: "host",
+ "default": "host:my-host"
+ }
+ ]
+};
+dogapi.screenboard.create(
+ title, description, graphs, options,
+ function(err, res){
+ console.dir(res);
+ }
+);
+
+delete an existing screenboard
+the id of the screenboard to delete
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.screenboard.remove(1234, function(err, res){
+ console.dir(res);
+});
+
+get the info of a single existing screenboard
+the id of the screenboard to fetch
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.screenboard.get(1234, function(err, res){
+ console.dir(res);
+});
+
+get all existing screenboards
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.screenboard.getAll(function(err, res){
+ console.dir(res);
+});
+
+