Skip to content

Commit 1ead4be

Browse files
authored
replace 'key' with 'dir' in dir-API parameters in doc, fix #64 (#67)
1 parent 05eb12b commit 1ead4be

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

api_v2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ res, err = cli:wait('/path/to/key', res.body.node.modifiedIndex + 2, 10)
173173

174174
### readdir
175175

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

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

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

188188
### mkdir
189189

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

192192
Creates a directory.
193193

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

200200
### mkdirnx
201201

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

204204
Creates a directory if that directory does not exist.
205205

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

212212
### rmdir
213213

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

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

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

226226
### waitdir
227227

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

230230

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

240240
### push
241241

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

244244
Pushs a value into the specified directory.
245245

api_v3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ local res, err = cli:watch('/path/to/key')
165165

166166
### readdir
167167

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

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

189189
### watchdir
190190

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

193193

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

214214
### rmdir
215215

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

218218
* `key`: string value.
219219
* `opts`: optional options.

0 commit comments

Comments
 (0)