Skip to content

Commit

Permalink
[update] updating the API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Jun 28, 2022
1 parent 841ee02 commit f1c9a3d
Show file tree
Hide file tree
Showing 58 changed files with 7,335 additions and 1,293 deletions.
30 changes: 18 additions & 12 deletions docs/English/API Documentation/Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,21 @@ The "call_stack" attribute is enabled only when an error occurs or the `call_sta

## Index

- [Language](./sections/Language.md#language)
- [Language Details](./sections/Language.md#language-details)
- [Language Search](./sections/Language.md#language-search)
- [Language Details (dynamic)](./sections/Language.md#language-details-dynamic)
- [Translation](./sections/Translation.md#translation)
- [Translate](./sections/Translation.md#translate)
- [Translation Stream](./sections/Translation.md#translation-stream)
- [Translate HTML](./sections/Translation.md#translate-html)
- [Transliterate](./sections/Translation.md#transliterate)
- [Spellcheck](./sections/Translation.md#spellcheck)
- [Language](./sections/Translation.md#language-1)
- [Text to Speech](./sections/Translation.md#text-to-speech)
- [Language](./Sections/Language.md#language)
- [Language Details](./Sections/Language.md#language-details)
- [Language Search](./Sections/Language.md#language-search)
- [Language Details (dynamic)](./Sections/Language.md#language-details-dynamic)
- [Stars](./Sections/Stars.md#stars)
- [Stars](./Sections/Stars.md#stars-1)
- [Translation Star](./Sections/Stars.md#translation-star)
- [Stats](./Sections/Stats.md#stats)
- [Timings Stats](./Sections/Stats.md#timings-stats)
- [Erros Stats](./Sections/Stats.md#erros-stats)
- [Translation](./Sections/Translation.md#translation)
- [Translate](./Sections/Translation.md#translate)
- [Translation Stream](./Sections/Translation.md#translation-stream)
- [Translate HTML](./Sections/Translation.md#translate-html)
- [Transliterate](./Sections/Translation.md#transliterate)
- [Spellcheck](./Sections/Translation.md#spellcheck)
- [Language](./Sections/Translation.md#language-1)
- [Text to Speech](./Sections/Translation.md#text-to-speech)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":{"name":"Stars","description":"All of the endpoints under the 'Stars' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Stars","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stars?=","host":["{{DOMAIN}}"],"path":["stars"],"query":[]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L49)\n\nGet all starred translations\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Stars","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stars?=","host":["{{DOMAIN}}"],"path":["stars"],"query":[]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L49)\n\nGet all starred translations\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]},{"name":"Translation Star","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stars/{{translation_id}}?=","host":["{{DOMAIN}}"],"path":["stars","{{translation_id}}"],"query":[]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82)\n\nGet the stars for a translation\n\n\n#### Authentication\n\nLogin is **not** required\n\n#### Response\n\n##### Example response\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"source\": \"no example\",\n \"result\": \"no example\",\n \"language\": \"no example\",\n \"users\": \"no example\"\n }\n}\n\n```\n\n##### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | No |\n| `result` | The result text | string | No |\n| `language` | The translation languages | string | No |\n| `users` | The number of users who starred the translation | <class 'int'> | No |\n\n##### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `FORBIDDEN` | You are not allowed to star this translation | 403 |\n| `NOT_FOUND` | The translation could not be found | 404 |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Star","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stars/{{translation_id}}?=","host":["{{DOMAIN}}"],"path":["stars","{{translation_id}}"],"query":[]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82)\n\nGet the stars for a translation\n\n\n#### Authentication\n\nLogin is **not** required\n\n#### Response\n\n##### Example response\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"source\": \"no example\",\n \"result\": \"no example\",\n \"language\": \"no example\",\n \"users\": \"no example\"\n }\n}\n\n```\n\n##### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | No |\n| `result` | The result text | string | No |\n| `language` | The translation languages | string | No |\n| `users` | The number of users who starred the translation | <class 'int'> | No |\n\n##### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `FORBIDDEN` | You are not allowed to star this translation | 403 |\n| `NOT_FOUND` | The translation could not be found | 404 |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"source\": \"no example\",\n \"result\": \"no example\",\n \"language\": \"no example\",\n \"users\": \"no example\"\n }\n}\n"}]},{"name":"Translation Star","event":[],"request":{"method":"POST","header":[],"url":{"raw":"{{DOMAIN}}/stars/{{translation_id}}?=token","host":["{{DOMAIN}}"],"path":["stars","{{translation_id}}"],"query":[{"key":"token","value":"<token:TranslationToken>","description":"The token to authenticate the translation"}]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82)\n\nStar a translation\n\n\n#### Authentication\n\nLogin is **not** required\n\n#### Response\n\n##### Example response\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"source\": \"no example\",\n \"result\": \"no example\",\n \"language\": \"no example\",\n \"users\": \"no example\"\n }\n}\n\n```\n\n##### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | No |\n| `result` | The result text | string | No |\n| `language` | The translation languages | string | No |\n| `users` | The number of users who starred the translation | <class 'int'> | No |\n\n##### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `FORBIDDEN` | You are not allowed to star this translation | 403 |\n| `NOT_FOUND` | The translation could not be found | 404 |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Star","event":[],"request":{"method":"POST","header":[],"url":{"raw":"{{DOMAIN}}/stars/{{translation_id}}?=token","host":["{{DOMAIN}}"],"path":["stars","{{translation_id}}"],"query":[{"key":"token","value":"<token:TranslationToken>","description":"The token to authenticate the translation"}]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82)\n\nStar a translation\n\n\n#### Authentication\n\nLogin is **not** required\n\n#### Response\n\n##### Example response\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"source\": \"no example\",\n \"result\": \"no example\",\n \"language\": \"no example\",\n \"users\": \"no example\"\n }\n}\n\n```\n\n##### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | No |\n| `result` | The result text | string | No |\n| `language` | The translation languages | string | No |\n| `users` | The number of users who starred the translation | <class 'int'> | No |\n\n##### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `FORBIDDEN` | You are not allowed to star this translation | 403 |\n| `NOT_FOUND` | The translation could not be found | 404 |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"source\": \"no example\",\n \"result\": \"no example\",\n \"language\": \"no example\",\n \"users\": \"no example\"\n }\n}\n"}]},{"name":"Translation Star","event":[],"request":{"method":"DELETE","header":[],"url":{"raw":"{{DOMAIN}}/stars/{{translation_id}}?=","host":["{{DOMAIN}}"],"path":["stars","{{translation_id}}"],"query":[]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82)\n\nUnstar a translation\n\n\n#### Authentication\n\nLogin is **not** required\n\n##### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `FORBIDDEN` | You are not allowed to star this translation | 403 |\n| `NOT_FOUND` | The translation could not be found | 404 |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Star","event":[],"request":{"method":"DELETE","header":[],"url":{"raw":"{{DOMAIN}}/stars/{{translation_id}}?=","host":["{{DOMAIN}}"],"path":["stars","{{translation_id}}"],"query":[]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82)\n\nUnstar a translation\n\n\n#### Authentication\n\nLogin is **not** required\n\n##### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `FORBIDDEN` | You are not allowed to star this translation | 403 |\n| `NOT_FOUND` | The translation could not be found | 404 |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":{"name":"Stats","description":"All of the endpoints under the 'Stats' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Timings Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/timings?=granularity","host":["{{DOMAIN}}"],"path":["stats","timings"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Timings Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/timings?=granularity","host":["{{DOMAIN}}"],"path":["stats","timings"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]},{"name":"Erros Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/errors?=granularity","host":["{{DOMAIN}}"],"path":["stats","errors"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28)\n\nGet all errors count for each service\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Erros Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/errors?=granularity","host":["{{DOMAIN}}"],"path":["stats","errors"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28)\n\nGet all errors count for each service\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}}

Large diffs are not rendered by default.

Loading

0 comments on commit f1c9a3d

Please sign in to comment.