This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-170
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-170 by this push:
new 3c62a8d Update NCCli.scala
3c62a8d is described below
commit 3c62a8dfcb8839e8b1ae8ffc9107df1b00544c4c
Author: Aaron Radzinski <[email protected]>
AuthorDate: Fri Dec 11 19:11:03 2020 -0800
Update NCCli.scala
---
.../nlpcraft/model/tools/cmdline/NCCli.scala | 33 ++++++++++++++++++----
1 file changed, 28 insertions(+), 5 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 54d2097..da6b9e1 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -656,11 +656,21 @@ object NCCli extends App {
examples = Seq(
Example(
usage = Seq(
- s"$PROMPT $SCRIPT_NAME rest ",
+ s"$$ nlpcraft.sh rest ",
" -p=signin",
" -j='{\"email\": \"[email protected]\", \"passwd\":
\"admin\"}'"
),
- desc = s"Issues ${y("'signin'")} REST call with given JSON
payload."
+ desc = s"${bo("Unix/Linux:")} issues ${y("'signin'")} REST
call with given JSON payload."
+ ),
+ Example(
+ usage = Seq(
+ s"> nlpcraft.cmd rest ",
+ " -p=signin",
+ " -j='{\\\"email\\\": \\\"[email protected]\\\",
\\\"passwd\\\": \\\"admin\\\"}'"
+ ),
+ desc =
+ s"${bo("Windows:")} issues ${y("'signin'")} REST call
with given JSON payload. " +
+ s"Note the necessary escaping of double quotes."
)
)
),
@@ -768,7 +778,7 @@ object NCCli extends App {
),
Example(
usage = Seq(
- s"$PROMPT $SCRIPT_NAME call --path=ask/sync",
+ s"$$ nlpcraft.sh call --path=ask/sync",
" --acsTok=qwerty123456",
" --txt=\"User request\"",
" --mdlId=my.model.id",
@@ -776,7 +786,20 @@ object NCCli extends App {
" --enableLog=false"
),
desc =
- s"Issues ${y("'ask/sync'")} REST call with given JSON
payload provided as a set of parameters."
+ s"${bo("Unix/Linux:")} issues ${y("'ask/sync'")} REST
call with given JSON payload provided as a set of parameters."
+ ),
+ Example(
+ usage = Seq(
+ s"> nlpcraft.cmd call --path=ask/sync",
+ " --acsTok=qwerty123456",
+ " --txt=\"User request\"",
+ " --mdlId=my.model.id",
+ " --data='{\\\"data1\\\": true, \\\"data2\\\": 123,
\\\"data3\\\": \\\"some text\\\"}'",
+ " --enableLog=false"
+ ),
+ desc =
+ s"${bo("Windows:")} issues ${y("'ask/sync'")} REST
call with given JSON payload provided " +
+ s"as a set of parameters. Note the necessary double
quote escaping."
)
)
),
@@ -1509,7 +1532,7 @@ object NCCli extends App {
synopsis = s"Displays help for ${y(s"'$SCRIPT_NAME'")}.",
desc = Some(
s"By default, without ${y("'--all'")} or ${y("'--cmd'")}
parameters, displays the abbreviated form of manual " +
- s"only listing the commands without parameters or
examples."
+ s"only listing the commands without parameters or examples."
),
body = cmdHelp,
params = Seq(