Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions api_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ res, err = cli:wait('/path/to/key', res.body.node.modifiedIndex + 2, 10)

### readdir

`syntax: res, err = cli:readdir(key:string [, recursive:boolean])`
`syntax: res, err = cli:readdir(dir:string [, recursive:boolean])`

- `recursive`: boolean - get all the contents under a directory.

Expand All @@ -187,7 +187,7 @@ local res, err = cli:readdir('/path/to/dir')

### mkdir

`syntax: res, err = cli:mkdir(key:string [, ttl:int])`
`syntax: res, err = cli:mkdir(dir:string [, ttl:int])`

Creates a directory.

Expand All @@ -199,7 +199,7 @@ local res, err = cli:mkdir('/path/to/dir', 10)

### mkdirnx

`syntax: res, err = cli:mkdirnx(key:string [, ttl:int])`
`syntax: res, err = cli:mkdirnx(dir:string [, ttl:int])`

Creates a directory if that directory does not exist.

Expand All @@ -211,7 +211,7 @@ local res, err = cli:mkdirnx('/path/to/dir', 10)

### rmdir

`syntax: res, err = cli:rmdir(key:string [, recursive:boolean])`
`syntax: res, err = cli:rmdir(dir:string [, recursive:boolean])`

- `recursive`: boolean - remove all the contents under a directory.

Expand All @@ -225,7 +225,7 @@ local res, err = cli:rmdir('/path/to/dir')

### waitdir

`syntax: res, err = cli:waitdir(key:string [, modified_index:uint [, timeout:uint] ])`
`syntax: res, err = cli:waitdir(dir:string [, modified_index:uint [, timeout:uint] ])`


- `modified_index`: uint - this argument to use to the `prev_index` query of atomic operation.
Expand All @@ -239,7 +239,7 @@ local res, err = cli:waitdir('/path/to/dir')

### push

`syntax: res, err = cli:push(key:string, val:JSON value [, ttl:int])`
`syntax: res, err = cli:push(dir:string, val:JSON value [, ttl:int])`

Pushs a value into the specified directory.

Expand Down
6 changes: 3 additions & 3 deletions api_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ local res, err = cli:watch('/path/to/key')

### readdir

`syntax: res, err = cli:readdir(key:string [, opts:table])`
`syntax: res, err = cli:readdir(dir:string [, opts:table])`

* `key`: string value.
* `opts`: optional options.
Expand All @@ -183,7 +183,7 @@ local res, err = cli:readdir('/path/to/dir')

### watchdir

`syntax: res, err = cli:watchdir(key:string [, opts:table])`
`syntax: res, err = cli:watchdir(dir:string [, opts:table])`


* `key`: string value.
Expand All @@ -208,7 +208,7 @@ local res, err = cli:watchdir('/path/to/dir')

### rmdir

`syntax: res, err = cli:rmdir(key:string [, opts:table])`
`syntax: res, err = cli:rmdir(dir:string [, opts:table])`

* `key`: string value.
* `opts`: optional options.
Expand Down