Permalink
Browse files

added api docs

  • Loading branch information...
1 parent 2a1fe4b commit 0cf41ea7c580a4f86dfae2c6eff28a337c5f74e3 @brianleroux brianleroux committed Jul 19, 2011
Showing with 39 additions and 3 deletions.
  1. +35 −0 doc/api.md
  2. +3 −3 doc/finding.md
  3. +1 −0 doc/quickstart.md
View
@@ -0,0 +1,35 @@
+application programming interface
+===
+
+The `Lawnchair` api (or _application programming interface_):
+
+
+ :::JavaScript
+ // returns all the keys in the store
+ keys (callback)
+
+ // save an object
+ save (obj, callback)
+
+ // batch save array of objs
+ batch(array, callback)
+
+ // retrieve obj (or array of objs) and apply callback to each
+ get (key|array, callback)
+
+ // check if exists in the collection passing boolean to callback
+ exists (key, callback)
+
+ // iterate collection passing: obj, index to callback
+ each(callback)
+
+ // returns all the objs to the callback as an array
+ all (callback)
+
+ // remove a doc or collection of em
+ remove (key|array, callback)
+
+ // destroy everything
+ nuke (callback)
+
+
View
@@ -1,7 +1,7 @@
Finding
-------
-In a keystore document centric paradigm you likely won't do much
+you need to find stuff. In a keystore document centric paradigm you likely won't do much
searching since you can just refer to a key.
@@ -23,7 +23,7 @@ That said, sometimes you may want to peruse the `Lawnchair` index.
})
-Searching keys is annoying and tedious. GAWD! Oh wait...
+Searching keys is annoying and tedious. GAWD! But wait...
:::JavaScript
@@ -37,5 +37,5 @@ Searching keys is annoying and tedious. GAWD! Oh wait...
Of course you can return everything in a `Lawnchair` with `all`. Or checkout
the [query plugin](/plugins) for more advanced querying capabilities
-should your app require them clientside.
+should your app require them clientside.
View
@@ -17,6 +17,7 @@ Figure 1: index.html
</head>
<body>
<script src="lawnchair.js"></script>
+ <script src="app.js"></script>
</body>
</html>

0 comments on commit 0cf41ea

Please sign in to comment.