Commits

Chun-Ping Chang committed aa48908

add javascript binding doc

Comments (0)

Files changed (1)

+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <head>
+    <title>JavaScript - Library - Documentation - GaiaSup</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="keywords" content="GaiaSup,LBS,Geo,Spatial,Location Base Service,Spatial Publish Subscribe,SPS,ImonCloud" />
+    <meta name="description" content="Spatial PubSub Service for your Geo / Spatial / Location Base Service in the cloud by Imonology">
+    <meta name="author" content="Imonology LLC">
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+    <!-- styles -->
+    <link href="/assets/css/bs_united.css" rel="stylesheet">
+    <style type="text/css">
+      body {
+        padding-top: 60px;
+        padding-bottom: 40px;
+      }
+    </style>
+    <link href="/assets/css/bootstrap-responsive.css" rel="stylesheet">
+    <link href="/assets/css/prettify.css" rel="stylesheet">
+
+    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+    <!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+
+    <!-- fav and touch icons -->
+    <!--<link rel="shortcut icon" href="./assets/ico/favicon.ico">-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/ico/apple-touch-icon-144-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/ico/apple-touch-icon-114-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/ico/apple-touch-icon-72-precomposed.png">-->
+    <!--<link rel="apple-touch-icon-precomposed" href="./assets/ico/apple-touch-icon-57-precomposed.png">-->
+  </head>
+
+  <body onload="prettyPrint()">
+
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </a>
+          <a class="brand" href="/">GaiaSup</a>
+          <div class="nav-collapse">
+            <ul class="nav">
+              <li><a href="/">Home</a></li>
+              <li><a href="/pricing">Pricing</a></li>
+              <li><a href="/manage">Manage</a></li>
+              <li class="active"><a href="/doc/api">Documentation</a></li>
+              <li><a data-toggle="modal" href="#contact">Contact us</a></li>
+              <!--<li><a href="/contact">Contact us</a></li>-->
+            </ul>
+
+            <!-- The drop down menu -->
+            <ul class="nav pull-right">
+              <li><a href="/login">Log In / Sign Up</a></li>
+              <!--<li class="divider-vertical"></li>-->
+              <!--<li class="drop down">-->
+              <!--<a class="dropdown-toggle" href="#" data-toggle="dropdown">Log In <strong class="caret"></strong></a>-->
+              <!--<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">-->
+                <!--<form id="frmLogin">-->
+                  <!--<input id="txtUserID" style="margin-bottom: 15px;" type="text" name="txtUserID" size="30" />-->
+                  <!--<input id="txtUserPW" style="margin-bottom: 15px;" type="password" name="txtUserPW" size="30" />-->
+
+                  <!--<input class="btn btn-primary" style="clear: left; width: 100%; height: 32px; font-size: 13px;" type="button" id="btnLogin" name="btnLogin" value="Log In" />-->
+                <!--</form>-->
+              <!--</div>-->
+              <!--</li>-->
+            </ul>
+          </div>
+          <!--/.nav-collapse -->
+        </div>
+      </div>
+    </div>
+
+    <div class="container">
+      <ul class="breadcrumb">
+        <li><a href="/doc/api">Documentation</a> <span class="divider">→</span></li>
+        <li><a href="/doc/api#lib">Libraries</a> <span class="divider">→</span></li>
+        <li class="active">JavaScript</li>
+      </ul>
+
+      <div class="hero-unit">
+        <h2>gaia.Position(:x, :y, :z)</h2>
+        <em>A Position object used by GaiaSup.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+// my self position
+var myPosition = new gaia.Position(1, 2, 3); </pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:x</div>
+              </td>
+              <td>
+                <div>
+                  x value of the Position
+                </div>
+                <br/>
+                <div>
+                  <strong>Example Value: </strong>
+                  <span>0</span>
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:y</div>
+              </td>
+              <td>
+                <div>
+                  y value of the Position
+                </div>
+                <br/>
+                <div>
+                  <strong>Example Value: </strong>
+                  <span>1</span>
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:z</div>
+              </td>
+              <td>
+                <div>
+                  z value of the Position
+                </div>
+                <br/>
+                <div>
+                  <strong>Example Value: </strong>
+                  <span>2</span>
+                </div>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Position.equals(:pos)</h2>
+        <em>Check if two positions are equal.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var myPosition = new gaia.Position(0, 0, 0);
+
+// new position
+var newpos = new gaia.Position(3, 2, 1);
+
+// check for position change
+if (myPosition.equals(newpos) === false) {
+  myPosition = newpos;
+  pos_changed = true;
+} </pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:pos</div>
+              </td>
+              <td>
+                <div>
+                  another gaia.Position object to be checked against
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node(:api_key, <em>:id</em>, <em>:layer</em>, <em>:pos</em>)</h2>
+        <em>A Node object representing a position with attributes in the system.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var myPosition = new gaia.Position(0, 0, 0);
+
+// reference to gaiaNode object, with API key provided
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887', 'BlueT', 'GaiaSup', myPosition); </pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:api_key</div>
+              </td>
+              <td>
+                <div>
+                  unique API key for the application using GaiaSup
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Optional Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:id</div>
+              </td>
+              <td>
+                <div>
+                  unique id for this Node
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:layer</div>
+              </td>
+              <td>
+                <div>
+                  layer name for this Node
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:pos</div>
+              </td>
+              <td>
+                <div>
+                  a gaia.Position object indicating the initial position
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.registerLayer(:layer, :onDone)</h2>
+        <em>Register a new Layer.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.registerLayer('GaiaSup',
+  function (ret) {
+    // do something when register layer succeed ...
+  }
+);</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:layer</div>
+              </td>
+              <td>
+                <div>
+                  layer name for this Node
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  callback to return result
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.registerNode(:id, :onDone)</h2>
+        <em>Register a Node under the current API key and Layer.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.registerNode('BlueT',
+  function (ret) {
+    // do something when register node succeed ...
+  }
+);</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:id</div>
+              </td>
+              <td>
+                <div>
+                  unique identification for the Node
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  callback to return result
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.revokeLayer(:onDone)</h2>
+        <em>Revoke the currently used Layer.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.revokeLayer( function (ret) {
+  // do something when revoke current layer succeed ...
+});</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  callback to notify when done
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.revokeNode(:onDone)</h2>
+        <em>Register a new Layer.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.revokeNode( function (ret) {
+  // do something when revoke current node succeed ...
+});</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  callback to notify when done
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.querySquare(:xmin, :ymin, :zmin, :xmax, :ymax, zmax, :onDone)</h2>
+        <em>Obtain the positions of other Nodes within a square area.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.querySquare(100, 200, 300, 300, 400, 500,
+  function (ret) {
+    // do something when query succeed ...
+  }
+);</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:xmin</div>
+              </td>
+              <td>
+                <div>
+                  The minimal value of x of the queried square area
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:ymin</div>
+              </td>
+              <td>
+                <div>
+                  The minimal value of y of the queried square area
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:zmin</div>
+              </td>
+              <td>
+                <div>
+                  The minimal value of z of the queried square area
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:xmax</div>
+              </td>
+              <td>
+                <div>
+                  The maximal value of x of the queried square area
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:ymax</div>
+              </td>
+              <td>
+                <div>
+                  The maximal value of y of the queried square area
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:zmax</div>
+              </td>
+              <td>
+                <div>
+                  The maximal value of z of the queried square area
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  callback to return result
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.publishPos(:pos)</h2>
+        <em>Publish self position for other Nodes to see.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var myPosition = new gaia.Position(1, 2, 3);
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.publishPos(myPosition)</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:post</div>
+              </td>
+              <td>
+                <div>
+                  a gaia.Position object for current position
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.queryNearby(:radius, :onListReceived)</h2>
+        <em>Query for all neighboring Nodes within a radius.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.queryNearby(500,
+  function (lstNode) {
+    // do something when node list (lstNode) Received ...
+  }
+);</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:radius</div>
+              </td>
+              <td>
+                <div>
+                  the radius to query
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onListReceived</div>
+              </td>
+              <td>
+                <div>
+                  a list of neighbor Nodes (gaia.Node objects)
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.valid(:layer, :id, :onDone)</h2>
+        <em>Validate whether a particular Node is registered.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.valid('GaiaSup', 'BlueT',
+  function (ret) {
+    // do something when check succeed ...
+  }
+);</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:layer</div>
+              </td>
+              <td>
+                <div>
+                  Layer name of the Node to check for existence
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:id</div>
+              </td>
+              <td>
+                <div>
+                  Unique ID of the Node to check for existence
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  return result of the check
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.sendMessage(:msg, :onDone)</h2>
+        <em>Send message all currently known Nodes.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.sendMessage('Hello, Gaia!',
+  function (ret) {
+    // do something when message sent ...
+  }
+);</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:msg</div>
+              </td>
+              <td>
+                <div>
+                  message content
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  callback to notify when the send is done
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.recvMessage(:onReceived)</h2>
+        <em>Receive new messages sent by other Nodes.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.recvMessage( function (msg) {
+  // do something when message received ...
+});
+</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:onReceived</div>
+              </td>
+              <td>
+                <div>
+                  callback to return back a received message
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.queryMessage(:start, :stop, :onDone)</h2>
+        <em>Query messages sent to self Node from history.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.queryMessage(1347468776, 1347498729
+  function (msg) {
+    // do something when message received ...
+  }
+);</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:start</div>
+              </td>
+              <td>
+                <div>
+                  Time for the earliest message to retrieve (in epoch format)
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:stop</div>
+              </td>
+              <td>
+                <div>
+                  Time for the latest message to retrieve  (in epoch format)
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onDone</div>
+              </td>
+              <td>
+                <div>
+                  callback to notify received messages
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <br/>
+
+      <div>
+        <legend>Shortcut Methods</legend>
+      </div>
+      <div class="hero-unit">
+        <h2>gaia.Node.join(:layer, :id)</h2>
+        <em>Join the system directly with a Node.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.join('GaiaSup', 'BlueT');</pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:layer</div>
+              </td>
+              <td>
+                <div>
+                  Layer to join
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:id</div>
+              </td>
+              <td>
+                <div>
+                  unique ID for the joining Node
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.subscribeNearby(:radius, :onUpdate, :interval)</h2>
+        <em>Subscribe the updates of Nodes within a radius.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.subscribeNearby(500, updateHandler, 1000); </pre>
+          <br/>
+        </div>
+        <table class="table">
+          <thead>
+            <tr>
+              <th class="span3">Parameters</th>
+              <th>Description</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <div>:radius</div>
+              </td>
+              <td>
+                <div>
+                  radius around my Node center to subscribe for updates
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:onUpdate</div>
+              </td>
+              <td>
+                <div>
+                  callback to notify when there's join/update/leave of Nodes
+                </div>
+                <br/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <div>:interval</div>
+              </td>
+              <td>
+                <div>
+                  interval time for querying the neighboring Node states
+                </div>
+                <br/>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.getNeighbors()</h2>
+        <em>Get a list of neighbor Nodes currently known.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.getNeighbors();</pre>
+          <br/>
+          <strong>Return</strong>
+          <br/> <br/>
+          <pre>gaia.Node[]</pre>
+          <br/>
+        </div>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.isJoined()</h2>
+        <em>Check if the current Node has joined successfully.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.isJoined();</pre>
+          <br/>
+          <strong>Return</strong>
+          <br/> <br/>
+          <pre>bool</pre>
+          <br/>
+        </div>
+      </div>
+
+      <div class="hero-unit">
+        <h2>gaia.Node.toString()</h2>
+        <em>Print a string format of the current Node.</em>
+        <div>
+          <br/>
+          <strong>Example: </strong>
+          <br/> <br/>
+          <pre class="prettyprint linenums lang-js">
+var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
+
+gaiaNode.toString();</pre>
+          <br/>
+        </div>
+      </div>
+
+    <hr>
+
+    <footer>
+    <center>
+      <p>&copy; 2012, <a href="http://imonology.com/" target="_blank">Imonology, LLC</a>. All rights reserved.</p>
+    </center>
+    </footer>
+
+    </div>
+    <!-- /container -->
+
+    <!-- Modals -->
+    <div class="modal hide fade" id="contact">
+      <div class="modal-header">
+        <a class="close" data-dismiss="modal">×</a>
+        <h3>Contact us</h3>
+      </div>
+      <div class="modal-body">
+        <p>You can send feedback or report bug to <a href="mailto:contact@GaiaSup.com">contact@GaiaSup.com</a></p>
+      </div>
+      <div class="modal-footer">
+        <a data-dismiss="modal" href="#" class="btn btn-primary" id="ContactUsClose">Close</a>
+      </div>
+    </div>
+
+    <!-- Le javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <script src="/assets/js/jquery.js"></script>
+    <script src="/assets/js/bootstrap-transition.js"></script>
+    <script src="/assets/js/bootstrap-alert.js"></script>
+    <script src="/assets/js/bootstrap-modal.js"></script>
+    <script src="/assets/js/bootstrap-dropdown.js"></script>
+    <script src="/assets/js/bootstrap-scrollspy.js"></script>
+    <script src="/assets/js/bootstrap-tab.js"></script>
+    <script src="/assets/js/bootstrap-tooltip.js"></script>
+    <script src="/assets/js/bootstrap-popover.js"></script>
+    <script src="/assets/js/bootstrap-button.js"></script>
+    <script src="/assets/js/bootstrap-collapse.js"></script>
+    <script src="/assets/js/bootstrap-carousel.js"></script>
+    <script src="/assets/js/bootstrap-typeahead.js"></script>
+
+    <script src="/assets/js/prettify.js"></script>
+
+  </body>
+</html>