source: code/trunk/docs/api/index.html@ 69

Last change on this file since 69 was 67, checked in by yakumo.izuru, 16 months ago

Fix bugs, many other changes

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 1.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "//W3C DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3 <head>
4 <link rel="stylesheet" href="/docs/style.css">
5 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6 <meta name="author" content="Izuru Yakumo">
7 <title>API Documentation | Mai</title>
8 </head>
9 <body id="body">
10 <h1>API documentation</h1>
11 <table border="1" align="center">
12 <tr>
13 <td>
14 <h2 class="get">[GET] /api/translate</h2>
15 <h2 class="post">[POST] /api/translate</h2>
16 <h3>Description</h3>
17 <p>Translation endpoint, input must be URL-encoded (e.g. multi-byte characters, words separated by space)</p>
18 <h3>Arguments</h3>
19 <ul>
20 <li>engine</li>
21 <li>from</li>
22 <li>text</li>
23 <li>to</li>
24 </ul>
25 </td>
26 </tr>
27 <tr>
28 <td>
29 <h2 class="get">[GET] /api/source_languages</h2>
30 <h2 class="get">[GET] /api/target_languages</h2>
31 <h3>Description</h3>
32 <p>Get a JSON array of supported source and target languages for a particular engine</p>
33 <h3>Arguments</h3>
34 <ul>
35 <li>engine</li>
36 </ul>
37 </td>
38 </tr>
39 <tr>
40 <td>
41 <h2 class="get">[GET] /api/tts</h2>
42 <h3>Description</h3>
43 <p>Obtain text-to-speech audio files from an engine, provided said engine supports them</p>
44 <h3>Arguments</h3>
45 <ul>
46 <li>engine</li>
47 <li>lang</li>
48 <li>text</li>
49 </ul>
50 </td>
51 </tr>
52 <tr>
53 <td>
54 <h2 class="get">[GET] /robots.txt</h2>
55 </td>
56 </tr>
57 <tr>
58 <td>
59 <h2 class="post">[POST] /switchlanguages</h2>
60 <h3>Description</h3>
61 <p>Switch between source and target languages, as long as the source language isn't "auto"</p>
62 <p>Must only be called inside the form interface</p>
63 </td>
64 </tr>
65 <tr>
66 <td>
67 <h2 class="get">[GET] /version</h2>
68 <h3>Description</h3>
69 <p>Return the software version as a JSON array</p>
70 </td>
71 </tr>
72 </table>
73 </body>
74</html>
Note: See TracBrowser for help on using the repository browser.