diff options
| author | hallgren <hallgren@chalmers.se> | 2012-10-23 21:16:31 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-10-23 21:16:31 +0000 |
| commit | f7cb80008be3808530ffc2a6d0bb4da4ee150dd6 (patch) | |
| tree | 2066a61c6fa8ea64bf01da379ec2978b990efd9f | |
| parent | b810b5000cbfdb1dda9a6684023e8bca115f3611 (diff) | |
gf-cloud-api.html: document the new command=remake
Also improve the documentation of the responses to the upload and make
commands.
| -rw-r--r-- | src/www/gf-cloud-api.html | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/www/gf-cloud-api.html b/src/www/gf-cloud-api.html index 698bda510..2b98b0057 100644 --- a/src/www/gf-cloud-api.html +++ b/src/www/gf-cloud-api.html @@ -8,6 +8,7 @@ dl.api>dt, .request { background-color: #cef; } .response { background-color: #ffc; } dd { margin-top: 0.5ex; margin-bottom: 0.5ex; } +em { color: #36f; } </style> </head> @@ -107,22 +108,39 @@ For documentation of GF shell commands, see: The working directory is persistent, so clients are expected to remember and reuse it. Access to previously uploaded files requires that the same working directory is used. + <dt><code>/parse?</code><var>path</var><code>=</code><var>source</var> <dd>This command can be used to check GF source code for syntax errors. It also converts GF source code to the JSON representation used in GFSE (the cloud-based GF grammar editor). + <dt><code>/cloud?dir=</code>...<code>&command=<strong>upload</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>... <dd>Upload files to be stored in the cloud. - <dt><code>/cloud?dir=</code>...<code>&command=<strong>make</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>... - <dd>Upload grammar files and compile them into a PGF file. The response code is 204 if the upload was successful. + + <dt><code>/cloud?dir=</code>...<code>&command=<strong>make</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>... + <dd>Upload grammar files and compile them into a PGF file. Example response: + <blockquote class=response><code> + { "errorcode":"OK", <em>// "OK" or "Error"</em> + <br> "command":"gf -s -make FoodsEng.gf FoodsSwe.gf FoodsChi.gf", + <br> "output":"\n\n" <em>// Warnings and errors from GF</em> + <br>}</code></blockquote> + + <dt><code>/cloud?dir=</code>...<code>&command=<strong>remake</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>... + <dd>Like <code>command=<strong>remake</strong></code>, except you can leave + the <var>source<sub>i</sub></var> parts empty to reuse previously uploaded + files. + <dt><code>/cloud?dir=</code>...<code>&command=<strong>download</strong>&file=</code><var>path</var> <dd>Download the specified file. + <dt><code>/cloud?dir=</code>...<code>&command=<strong>ls</strong>&ext=.pgf</code> <dd>List files with the specified extension, e.g. <code class=response>["Foods.pgf","Letter.pgf"]</code>. + <dt><code>/cloud?dir=</code>...<code>&command=<strong>rm</strong>&file=</code><var>path</var> <dd>Remove the specified file. + <dt><code>/cloud?dir=</code>...<code>&command=<strong>link_directories</strong>&newdir=</code>... <dd>Combine server directores. This is used by GFSE to share grammars between multiple devices. @@ -131,7 +149,7 @@ For documentation of GF shell commands, see: <hr> <address></address> <div class=modtime><small> -<!-- hhmts start -->Last modified: Tue Oct 2 17:26:02 CEST 2012 <!-- hhmts end --> +<!-- hhmts start -->Last modified: Tue Oct 23 23:16:26 CEST 2012 <!-- hhmts end --> </small></div> <address> <a href="http://www.cse.chalmers.se/~hallgren/">TH</a> |
