Changeset 67 in code for trunk/docs/api/index.html


Ignore:
Timestamp:
Feb 7, 2024, 12:26:14 AM (16 months ago)
Author:
yakumo.izuru
Message:

Fix bugs, many other changes

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/api/index.html

    r66 r67  
    88        </head>
    99        <body id="body">
    10                 <h1 id="header">API Documentation</h1>
    11                 <br><hr>
    12                 <h2 class="get">[GET] /api/translate</h2>
    13                 <h2 class="post">[POST] /api/translate</h2>
    14                 <h3>Description</h3>
    15                 <p>Translation endpoint, input must be URL-encoded (e.g. multi-byte characters, words separated by space)</p>
    16                 <h3>Arguments</h3>
    17                 <ul>
    18                         <li>engine</li>
    19                         <li>from</li>
    20                         <li>text</li>
    21                         <li>to</li>
    22                 </ul>
    23                 <h3>Examples</h3>
    24                 <p><pre><code>GET /api/translate?engine=google&amp;from=auto&amp;to=en&amp;text="sonrisa"</code></pre></p>
    25                 <hr>
    26                 <h2 class="get">[GET] /api/source_languages</h2>
    27                 <h2 class="get">[GET] /api/target_languages</h2>
    28                 <h3>Description</h3>
    29                 <p>Get a JSON array of supported source and target languages for a particular engine</p>
    30                 <h3>Arguments</h3>
    31                 <ul>
    32                         <li>engine</li>
    33                 </ul>
    34                 <h3>Examples</h3>
    35                 <p><pre><code>GET /api/source_languages?engine=google</code></pre></p>
    36                 <p><pre><code>GET /api/target_languages?engine=google</code></pre></p>
    37                 <hr>
    38                 <h2 class="get">[GET] /api/tts</h2>
    39                 <h3>Description</h3>
    40                 <p>Obtain text-to-speech audio files from an engine, provided said engine supports them</p>
    41                 <h3>Arguments</h3>
    42                 <ul>
    43                         <li>engine</li>
    44                         <li>lang</li>
    45                         <li>text</li>
    46                 </ul>
    47                 <h3>Examples</h3>
    48                 <p><pre><code>GET /api/tts?engine=google&amp;lang=en&amp;text="hi"</code></pre></p>
    49                 <hr>
    50                 <h2 class="post">[POST] /switchlanguages</h2>
    51                 <h3>Description</h3>
    52                 <p>Switch between source and target languages, as long as the source language isn't "auto"</p>
    53                 <hr>
     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>
    5473        </body>
    5574</html>
Note: See TracChangeset for help on using the changeset viewer.