From 4ae288b201d29fce777a2b0d4bd67fcbd2b733da Mon Sep 17 00:00:00 2001 From: Karissa McKelvey Date: Mon, 11 Apr 2016 14:45:38 -0700 Subject: Update api.md --- api.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/api.md b/api.md index a92e20f..e3bcbb3 100644 --- a/api.md +++ b/api.md @@ -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. -- cgit v1.2.3