Permalink
Browse files

Docs update

  • Loading branch information...
1 parent d506266 commit 778b772c7f4c00e5cd31ef459262b64fd67fc7d1 Mark Cavage committed Jun 2, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 index.html
View
@@ -174,7 +174,7 @@ <h2 id="class-zkpluszkclient">Class: zkplus.ZKClient</h2>
<p>Shuts down the connection to the ZooKeeper server(s). Emits the <code>close</code> event
when done.</p>
-<h4>client.creat(path, [options], callback)</h4>
+<h3>client.creat(path, [options], callback)</h3>
<p>Creates a "file" (really a znode) in ZooKeeper. the <code>options</code> parameter may be
specified, in which case, that drives the semantics. If you pass in <code>flags</code> to
@@ -236,6 +236,17 @@ <h2 id="class-zkpluszkclient">Class: zkplus.ZKClient</h2>
});
</code></pre>
+<h3>client.put(path, object, [options], callback)</h3>
+
+<p>Creates or overwrites <code>path</code> with <code>object</code>. You can pass in an options with
+flags of ephemeral if you want that behavior. This API is idempotent.
+Callback is of the form <code>function (err)</code>.</p>
+
+<pre><code>client.put('/foo/bar/hello', {value: 'world'}, function (err) {
+ assert.ifError(err);
+});
+</code></pre>
+
<h3>client.readdir(path, callback)</h3>
<p>Lists all nodes under a given path, and returns you the keys as relative paths
@@ -299,7 +310,7 @@ <h2 id="class-zkpluszkclient">Class: zkplus.ZKClient</h2>
client.unlink('/foo', {version: 0}, function (err) { ... });
</code></pre>
-<h3>client.upate(path, object, [options], callback)</h3>
+<h3>client.update(path, object, [options], callback)</h3>
<p>Allows you to overwrite the data associated with a given "file". Again,
<code>object</code> is JS Object. <code>options</code> is just link <code>unlink</code>, it's not required, but

0 comments on commit 778b772

Please sign in to comment.