diff options
author | Karissa McKelvey <karissa@users.noreply.github.com> | 2016-04-11 14:45:38 -0700 |
---|---|---|
committer | Karissa McKelvey <karissa@users.noreply.github.com> | 2016-04-11 14:45:38 -0700 |
commit | 4ae288b201d29fce777a2b0d4bd67fcbd2b733da (patch) | |
tree | 03dfb982d9b17db2cf9058c977339e2547f2039a | |
parent | 39a0791dfd350b10f7ff8540762431cf993e8e3a (diff) | |
download | dat-docs-4ae288b201d29fce777a2b0d4bd67fcbd2b733da.tar.gz dat-docs-4ae288b201d29fce777a2b0d4bd67fcbd2b733da.zip |
Update api.md
-rw-r--r-- | api.md | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -1,12 +1,9 @@ ## 1.0 Architecture Design -![dat-arch.001.jpg](arch.png) - * dat: command-line * dat-desk: desktop application - * dat-server: http and ui frontend - * dat-js: JS api + * dat-server: daemon dat manager * hyperdrive: storage layer * discovery-swarm: swarm @@ -83,9 +80,9 @@ linker.on('progress', function (progress) { }) ``` -#### `dat.download(link, dir, cb)` +#### `dat.join(link, dir, cb)` -Download the given link to a given location. Get progress events from the stream. Progress events are the same as emitted by the `dat` object. +Joins the swarm for a given link to a given location. Get progress events from the stream. Progress events are the same as emitted by the `dat` object. ```js var done = function (err) { @@ -100,10 +97,6 @@ downloader.on('progress', function (progress) { }) ``` -#### `dat.join(link, cb)` - -Join a swarm for the given link. Should be called after `link` or `download`. Throws error if data has not been downloaded or linked. - #### `dat.leave(link, cb)` Leave the swarm for the given link. |