From 5b187cba011e37c0bd5b0cb43a8c558f9e155c7d Mon Sep 17 00:00:00 2001 From: yiyiyimu Date: Sun, 12 Jul 2020 20:43:28 +0800 Subject: [PATCH] replace 'key' with 'dir' in dir-API parameters in doc, fix #64 --- api_v2.md | 12 ++++++------ api_v3.md | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api_v2.md b/api_v2.md index 52a568a7..37846707 100644 --- a/api_v2.md +++ b/api_v2.md @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. diff --git a/api_v3.md b/api_v3.md index 446bdec4..c612b679 100644 --- a/api_v3.md +++ b/api_v3.md @@ -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. @@ -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. @@ -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.