Permalink
Browse files

[docs] Updating README

  • Loading branch information...
1 parent c05d104 commit 1c705ea2ebc4f69802656830e5bd6be91387243b @Marak Marak committed Jan 1, 2012
Showing with 28 additions and 35 deletions.
  1. +28 −35 README.md
View
@@ -8,63 +8,56 @@
# How does it work?
-*hnet uses couchiris at top*
+*will add diagrams here*
-*img of db layout*
+# Usage
-*another img of client getting data*
+For now, see examples: https://github.com/Marak/hnet/tree/master/example
-*description of data format*
+## hnet protocol is JSON
-*basic linking*
-
-*basic circular dep linking*
-
-
-## hnet protocol
-
-**arbitrary data**
+**Supports arbitrary data**
```
-{ "foo": "bar", "tar": "val" }
-{ "foo": "boo", "something": ["a","b","c"] }
-{ "foo": "bar", "tar": "val" }
+[
+ { "foo": "bar", "tar": "val" },
+ { "foo": "boo", "something": ["a","b","c"] },
+ { "foo": "bar", "tar": "val" },
+]
```
-**JSON-RPC commands**
+**Supports JSON-RPC commands**
-`hnet` supports JSON-RPC.
+`hnet` **optionally** supports JSON-RPC commands.
```
-{ "foo": "boo", "something": ["a","b","c"] }
-{ "method": "link", params: [ { "type": "couch", "uri": "http://hnet.iriscouch.com/public/0"} ] }
-{ "method": "link", params: [ { "type": "gist", "uri": "http://hnet.iriscouch.com/public/0"}, "cypher":"CaesarZalgo" ] }
-{ "foo": "bar", "tar": "val" }
+[
+ { "foo": "boo", "something": ["a","b","c"] },
+ { "method": "link", params: [ { "type": "couch", "uri": "http://hnet.iriscouch.com/public/0"} ] },
+ { "method": "link", params: [ { "type": "gist", "uri": "http://hnet.iriscouch.com/public/0"} ] },
+ { "foo": "bar", "tar": "val" }
+]
```
-## hnet protocol methods
-
-### link
-#### params: type, uri
+# hnet protocol JSON-RPC methods
-**the link method indicates that we should lazily link this document from a remote dataset**
+### method: link
+### params: type, uri
-## hnet protocol params
+*the link method indicates that we should lazily link this document from a remote dataset*
-### type
-#### the type of dataset we are going to load
+**type** - the type of dataset we are going to load
-**ex: couch, gist, imgur, irc, etc..**
+*ex: couch, gist, imgur, irc, etc..*
-### uri
-#### the uri of the dataet. i.e., the location
+**uri** - the uri of the node. i.e., the location
**ex: http://hnet.iriscouch.com/0**
-### cypher ( optional )
-#### the cryptology cypher the dataset is encoded in
+## Ex:
+
+ { "method": "link", params: [ { "type": "couch", "uri": "http://hnet.iriscouch.com/public/0"} ] },
-**ex: CaesarZalgo**
# TODO:

0 comments on commit 1c705ea

Please sign in to comment.