summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/www/gf-cloud-api.html24
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>&amp;command=<strong>upload</strong>&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</code>...
<dd>Upload files to be stored in the cloud.
- <dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>make</strong>&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</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>&amp;command=<strong>make</strong>&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</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>&amp;command=<strong>remake</strong>&amp;</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&amp;</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&amp;</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>&amp;command=<strong>download</strong>&amp;file=</code><var>path</var>
<dd>Download the specified file.
+
<dt><code>/cloud?dir=</code>...<code>&amp;command=<strong>ls</strong>&amp;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>&amp;command=<strong>rm</strong>&amp;file=</code><var>path</var>
<dd>Remove the specified file.
+
<dt><code>/cloud?dir=</code>...<code>&amp;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>