diff --git a/docs/English/API Documentation/Getting Started.md b/docs/English/API Documentation/Getting Started.md index 8afe75b..382a4b4 100644 --- a/docs/English/API Documentation/Getting Started.md +++ b/docs/English/API Documentation/Getting Started.md @@ -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) diff --git a/docs/English/API Documentation/postman/Language.postman_collection.utils.json b/docs/English/API Documentation/postman/Language.postman_collection.utils.json index 2971e58..361f945 100644 --- a/docs/English/API Documentation/postman/Language.postman_collection.utils.json +++ b/docs/English/API Documentation/postman/Language.postman_collection.utils.json @@ -1 +1 @@ -{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file +{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git a/docs/English/API Documentation/postman/Stars.postman_collection.utils.json b/docs/English/API Documentation/postman/Stars.postman_collection.utils.json new file mode 100644 index 0000000..7e31d44 --- /dev/null +++ b/docs/English/API Documentation/postman/Stars.postman_collection.utils.json @@ -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 | | 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 | | 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":"","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 | | 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":"","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 | | 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"}]}} \ No newline at end of file diff --git a/docs/English/API Documentation/postman/Stats.postman_collection.utils.json b/docs/English/API Documentation/postman/Stats.postman_collection.utils.json new file mode 100644 index 0000000..6be5394 --- /dev/null +++ b/docs/English/API Documentation/postman/Stats.postman_collection.utils.json @@ -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":"","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":"","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":"","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":"","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"}]}} \ No newline at end of file diff --git a/docs/English/API Documentation/postman/Translation.postman_collection.utils.json b/docs/English/API Documentation/postman/Translation.postman_collection.utils.json index bfbe934..3bbc734 100644 --- a/docs/English/API Documentation/postman/Translation.postman_collection.utils.json +++ b/docs/English/API Documentation/postman/Translation.postman_collection.utils.json @@ -1 +1 @@ -{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file +{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file diff --git a/docs/English/API Documentation/sections/Language.md b/docs/English/API Documentation/sections/Language.md index 7f40bd2..6caf94e 100644 --- a/docs/English/API Documentation/sections/Language.md +++ b/docs/English/API Documentation/sections/Language.md @@ -21,9 +21,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Yes | str | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -117,14 +117,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors @@ -152,9 +152,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `limit` | The limit of languages to return. (max: 100, default: 10) | False | int | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Yes | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | No | int | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -268,7 +268,7 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `languages` | The languages found | array | False | +| `languages` | The languages found | array | No | #### Possible Errors @@ -296,14 +296,14 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Dynamic URL | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `language` | The language to lookup | True | str | +| `language` | The language to lookup | Yes | str | ### Example @@ -392,14 +392,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors diff --git a/docs/English/API Documentation/sections/Stars.md b/docs/English/API Documentation/sections/Stars.md new file mode 100644 index 0000000..da3a4d0 --- /dev/null +++ b/docs/English/API Documentation/sections/Stars.md @@ -0,0 +1,409 @@ + +# Stars Section API Reference + +This file lists and explains the different endpoints available in the Stars section. + +# Stars + +Get all starred translations + +```http +GET /stars +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L49) + +### Authentication + +Login is **not** required + +### Example + + + + +
+ cURL Example + +#### **cURL** + +```bash +curl -X GET "/stars" +``` + +
+ + +
+ JavaScript Example + +#### **JavaScript** + +```javascript +fetch("/stars", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Example + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stars") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars, error: " + r.json()["error"]) +print("Successfully requested for /stars") +print(r.json()["data"]) +``` + +
+ + +#### Possible Errors + +| Exception | Description | Code | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Return to the Index](../Getting%20Started.md#index) + +# Translation Star + + - ### Using GET + +Get the stars for a translation + +```http +GET /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### Authentication + +Login is **not** required + +#### Dynamic URL + +| Name | Description | Required | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to get | Yes | str | + +#### Example + + + + +
+ cURL Example + +##### **cURL** + +```bash +curl -X GET "/stars/" +``` + +
+ + +
+ JavaScript Example + +##### **JavaScript** + +```javascript +fetch("/stars/", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Example + +##### **Python** + +```python +import requests +r = requests.request("GET", "/stars/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +#### Response + +##### Example response + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "source": "no example", + "result": "no example", + "language": "no example", + "users": "no example" + } +} + +``` + +##### Returns + +| Field | Description | Type | Nullable | +| ---------- | -------------------------------- | ------ | --------- | +| `source` | The source text | string | No | +| `result` | The result text | string | No | +| `language` | The translation languages | string | No | +| `users` | The number of users who starred the translation | | No | + +##### Possible Errors + +| Exception | Description | Code | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Return to the Index](../Getting%20Started.md#index) + + - ### Using POST + +Star a translation + +```http +POST /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### Authentication + +Login is **not** required + +#### Parameters + +| Name | Description | Required | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `token` | The token to authenticate the translation | Yes | TranslationToken | + +#### Dynamic URL + +| Name | Description | Required | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to star | Yes | str | + +#### Example + + + + +
+ cURL Example + +##### **cURL** + +```bash +curl -X POST \ + --data-urlencode "token=" \ + "/stars/" +``` + +
+ + +
+ JavaScript Example + +##### **JavaScript** + +```javascript +fetch(`/stars/?token=${encodeURIComponent("token")}`, { + method: "POST" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Example + +##### **Python** + +```python +import requests +r = requests.request("POST", "/stars/", + params = { + "token": "The token to authenticate the translation" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +#### Response + +##### Example response + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "source": "no example", + "result": "no example", + "language": "no example", + "users": "no example" + } +} + +``` + +##### Returns + +| Field | Description | Type | Nullable | +| ---------- | -------------------------------- | ------ | --------- | +| `source` | The source text | string | No | +| `result` | The result text | string | No | +| `language` | The translation languages | string | No | +| `users` | The number of users who starred the translation | | No | + +##### Possible Errors + +| Exception | Description | Code | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Return to the Index](../Getting%20Started.md#index) + + - ### Using DELETE + +Unstar a translation + +```http +DELETE /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### Authentication + +Login is **not** required + +#### Dynamic URL + +| Name | Description | Required | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to unstar | Yes | str | + +#### Example + + + + +
+ cURL Example + +##### **cURL** + +```bash +curl -X DELETE "/stars/" +``` + +
+ + +
+ JavaScript Example + +##### **JavaScript** + +```javascript +fetch("/stars/", { + method: "DELETE" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Example + +##### **Python** + +```python +import requests +r = requests.request("DELETE", "/stars/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +##### Possible Errors + +| Exception | Description | Code | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Return to the Index](../Getting%20Started.md#index) diff --git a/docs/English/API Documentation/sections/Stats.md b/docs/English/API Documentation/sections/Stats.md new file mode 100644 index 0000000..2694731 --- /dev/null +++ b/docs/English/API Documentation/sections/Stats.md @@ -0,0 +1,172 @@ + +# Stats Section API Reference + +This file lists and explains the different endpoints available in the Stats section. + +# Timings Stats + +Get all timings + +```http +GET /stats/timings +``` + +> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17) + +### Authentication + +Login is **not** required + +### Parameters + +| Name | Description | Required | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `granularity` | The granularity of the stats | No | Granularity | + +### Example + + + + +
+ cURL Example + +#### **cURL** + +```bash +curl -X GET "/stats/timings" +``` + +
+ + +
+ JavaScript Example + +#### **JavaScript** + +```javascript +fetch("/stats/timings", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stats/timings") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stats/timings, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Example + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stats/timings") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stats/timings, error: " + r.json()["error"]) +print("Successfully requested for /stats/timings") +print(r.json()["data"]) +``` + +
+ + +#### Possible Errors + +| Exception | Description | Code | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Return to the Index](../Getting%20Started.md#index) + +# Erros Stats + +Get all errors count for each service + +```http +GET /stats/errors +``` + +> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28) + +### Authentication + +Login is **not** required + +### Parameters + +| Name | Description | Required | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `granularity` | The granularity of the stats | No | Granularity | + +### Example + + + + +
+ cURL Example + +#### **cURL** + +```bash +curl -X GET "/stats/errors" +``` + +
+ + +
+ JavaScript Example + +#### **JavaScript** + +```javascript +fetch("/stats/errors", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stats/errors") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stats/errors, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Example + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stats/errors") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stats/errors, error: " + r.json()["error"]) +print("Successfully requested for /stats/errors") +print(r.json()["data"]) +``` + +
+ + +#### Possible Errors + +| Exception | Description | Code | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Return to the Index](../Getting%20Started.md#index) \ No newline at end of file diff --git a/docs/English/API Documentation/sections/Translation.md b/docs/English/API Documentation/sections/Translation.md index 8fa88f2..bf25817 100644 --- a/docs/English/API Documentation/sections/Translation.md +++ b/docs/English/API Documentation/sections/Translation.md @@ -25,11 +25,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -108,6 +108,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -115,12 +118,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -128,10 +131,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -143,11 +143,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -175,7 +175,7 @@ print(r.json()["data"]) GET /stream ``` -> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101) +> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49) ### Authentication @@ -185,11 +185,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -268,6 +268,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -275,12 +278,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -288,10 +291,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -303,11 +303,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -378,12 +378,12 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `code` | The HTML snippet to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `parser` | The HTML parser to use | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `code` | The HTML snippet to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `parser` | The HTML parser to use | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -469,6 +469,9 @@ print(r.json()["data"]) "eng" ], "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -476,10 +479,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "

こんにちは、今日はお元気ですか

大丈夫

" } @@ -491,11 +491,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `services` | The translators used | array | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source languages | array | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `services` | The translators used | array | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source languages | array | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -533,11 +533,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to transliterate | True | str | -| `dest` | The destination language | False | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to transliterate | Yes | str | +| `dest` | The destination language | No | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -614,6 +614,9 @@ print(r.json()["data"]) "service": "Google", "source": "おはよう", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -621,12 +624,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -634,10 +637,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Ohayou" } @@ -649,11 +649,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The transliteration | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The transliteration | str | No | #### Possible Errors @@ -691,10 +691,10 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to spellcheck | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to spellcheck | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -771,6 +771,9 @@ print(r.json()["data"]) "service": "Google", "source": "God morning", "sourceLang": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -778,10 +781,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Good morning" } @@ -793,10 +793,10 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLang` | The source language | object | False | -| `result` | The spellchecked text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLang` | The source language | object | No | +| `result` | The spellchecked text | str | No | #### Possible Errors @@ -834,9 +834,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to get the language of | True | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to get the language of | Yes | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -913,6 +913,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "result": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -920,10 +923,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" } } } @@ -934,9 +934,9 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `result` | The resulting language alpha-3 code | object | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `result` | The resulting language alpha-3 code | object | No | #### Possible Errors @@ -993,11 +993,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to convert to speech | True | str | -| `source` | The source language | False | str | -| `speed` | The speed of the speech | False | int | -| `gender` | The gender of the speech | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | +| `text` | The text to convert to speech | Yes | str | +| `source` | The source language | No | str | +| `speed` | The speed of the speech | No | int | +| `gender` | The gender of the speech | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | ### Example diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/Getting Started.md" b/docs/English/CLI Usage/Server Documentation/Getting Started.md similarity index 88% rename from "docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/Getting Started.md" rename to docs/English/CLI Usage/Server Documentation/Getting Started.md index 8afe75b..167a496 100644 --- "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/Getting Started.md" +++ b/docs/English/CLI Usage/Server Documentation/Getting Started.md @@ -101,15 +101,15 @@ 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) +- [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) diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/sections/Language.md" b/docs/English/CLI Usage/Server Documentation/Sections/Language.md similarity index 86% rename from "docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/sections/Language.md" rename to docs/English/CLI Usage/Server Documentation/Sections/Language.md index 7f40bd2..6caf94e 100644 --- "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/sections/Language.md" +++ b/docs/English/CLI Usage/Server Documentation/Sections/Language.md @@ -21,9 +21,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Yes | str | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -117,14 +117,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors @@ -152,9 +152,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `limit` | The limit of languages to return. (max: 100, default: 10) | False | int | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Yes | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | No | int | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -268,7 +268,7 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `languages` | The languages found | array | False | +| `languages` | The languages found | array | No | #### Possible Errors @@ -296,14 +296,14 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Dynamic URL | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `language` | The language to lookup | True | str | +| `language` | The language to lookup | Yes | str | ### Example @@ -392,14 +392,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/sections/Translation.md" b/docs/English/CLI Usage/Server Documentation/Sections/Translation.md similarity index 87% rename from "docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/sections/Translation.md" rename to docs/English/CLI Usage/Server Documentation/Sections/Translation.md index 8fa88f2..a54ff6a 100644 --- "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/sections/Translation.md" +++ b/docs/English/CLI Usage/Server Documentation/Sections/Translation.md @@ -25,11 +25,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -108,6 +108,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -115,12 +118,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -128,10 +131,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -143,11 +143,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -185,11 +185,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -268,6 +268,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -275,12 +278,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -288,10 +291,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -303,11 +303,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -378,12 +378,12 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `code` | The HTML snippet to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `parser` | The HTML parser to use | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `code` | The HTML snippet to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `parser` | The HTML parser to use | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -469,6 +469,9 @@ print(r.json()["data"]) "eng" ], "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -476,10 +479,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "

こんにちは、今日はお元気ですか

大丈夫

" } @@ -491,11 +491,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `services` | The translators used | array | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source languages | array | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `services` | The translators used | array | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source languages | array | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -533,11 +533,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to transliterate | True | str | -| `dest` | The destination language | False | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to transliterate | Yes | str | +| `dest` | The destination language | No | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -614,6 +614,9 @@ print(r.json()["data"]) "service": "Google", "source": "おはよう", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -621,12 +624,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -634,10 +637,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Ohayou" } @@ -649,11 +649,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The transliteration | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The transliteration | str | No | #### Possible Errors @@ -691,10 +691,10 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to spellcheck | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to spellcheck | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -771,6 +771,9 @@ print(r.json()["data"]) "service": "Google", "source": "God morning", "sourceLang": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -778,10 +781,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Good morning" } @@ -793,10 +793,10 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLang` | The source language | object | False | -| `result` | The spellchecked text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLang` | The source language | object | No | +| `result` | The spellchecked text | str | No | #### Possible Errors @@ -834,9 +834,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to get the language of | True | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to get the language of | Yes | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -913,6 +913,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "result": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -920,10 +923,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" } } } @@ -934,9 +934,9 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `result` | The resulting language alpha-3 code | object | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `result` | The resulting language alpha-3 code | object | No | #### Possible Errors @@ -993,11 +993,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to convert to speech | True | str | -| `source` | The source language | False | str | -| `speed` | The speed of the speech | False | int | -| `gender` | The gender of the speech | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | +| `text` | The text to convert to speech | Yes | str | +| `source` | The source language | No | str | +| `speed` | The speed of the speech | No | int | +| `gender` | The gender of the speech | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | ### Example diff --git a/docs/English/CLI Usage/Server Documentation/postman/Language.postman_collection.utils.json b/docs/English/CLI Usage/Server Documentation/postman/Language.postman_collection.utils.json new file mode 100644 index 0000000..361f945 --- /dev/null +++ b/docs/English/CLI Usage/Server Documentation/postman/Language.postman_collection.utils.json @@ -0,0 +1 @@ +{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git a/docs/English/CLI Usage/Server Documentation/postman/Translation.postman_collection.utils.json b/docs/English/CLI Usage/Server Documentation/postman/Translation.postman_collection.utils.json new file mode 100644 index 0000000..a208c93 --- /dev/null +++ b/docs/English/CLI Usage/Server Documentation/postman/Translation.postman_collection.utils.json @@ -0,0 +1 @@ +{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/Pour commencer.md" "b/docs/Fran\303\247ais/Documentation d'API/Pour commencer.md" new file mode 100644 index 0000000..7d261d7 --- /dev/null +++ "b/docs/Fran\303\247ais/Documentation d'API/Pour commencer.md" @@ -0,0 +1,121 @@ + +# Référence d'API pour translatepy + +Bienvenue sur la référence d'API pour translatepy. + +## Globalité + +### Format de réponse + +Généralement, les réponses JSON seront formattez comme suit (même lorsque des erreurs critiques sont encontrées) + +```json +{ + "success": true, + "message": "Ça marche!", + "error": null, + "data": {} +} +``` + +| Champ | Description | Peut être `null` | +| ------------ | ------------------------------------------------ | ---------------- | +| `success` | Si la requête est un succès ou pas | False | +| `message` | Un message qui décrit ce qu'il s'est passé | True | +| `error` | Le nom de l'erreur si il y en a une | True | +| `data` | Des données supplémentaires, les informations demandées | False | + +### Erreurs + +De multiples erreurs peuvent survenir, que ce soit du côté client (au niveau de la requête) ou du côté du serveur. + +Les erreurs spécifiques sont documentés dans chaque *Endpoint* mais celles-ci sont celles qui peuvent survenir sur n'importe quel endpoint : + +| Erreur | Description | Code | +| --------------------------- | --------------------------------------------------------------------------------------------------------------- | ----- | +| `SERVER_ERROR` | Quand une erreur survient sur translatepy en traitant la requête. | 500 | +| `MISSING_CONTEXT` | Quand dans le code vous essayez d'accéder à une ressource seulement disponible dans un contexte Nasse (pendant une requête) mais que vous n'êtes pas dans un contexte Nasse. | 500 | +| `INTERNAL_SERVER_ERROR` | Quand une erreur critique survient sur le système | 500 | +| `METHOD_NOT_ALLOWED` | Quand vous faites une requête avec le mauvaise méthode HTTP | 405 | +| `CLIENT_ERROR` | Quand quelque chose manque où n'est pas bon avec la requête | 400 | +| `MISSING_VALUE` | Quand quelque chose manque à la requête | 400 | +| `MISSING_PARAM` | Quand un paramètre manque à la requête | 400 | +| `MISSING_DYNAMIC` | Quand une valeur dynamique de l'URL manque | 400 | +| `MISSING_HEADER` | Quand un en-tête manque à la requête | 400 | +| `MISSING_COOKIE` | Quand un cookie manque à la requête | 400 | +| `AUTH_ERROR` | Quand une erreur d'authentification survient | 403 | + +### Requêtes authentifiées + +Quand un utilisateur doit être connecter, l'en-tête "Authorization" doit être définie avec le token de connexion communiqué lorsqu'il s'est connecté. + +Vous pouvez aussi utiliser le paramètre "translatepy_token" ou le cookie "__translatepy_token" mais ceux-ci ne vont pas être priorisé. + +Si la règle d'authentification de l'*endpoint* est défini comme "seulement vérifié", le compte ne doit pas être cherché dans la base de donnée mais la forme du token ou des informations comprises à l'intérieur peuvent être vérifiées. + +### Mode de développement + +Lorsque le mode de développement est activé (`-d` ou `--debug`), de multiples informations sont renvoyées dans la section `debug` des réponses et le niveau `DEBUG` de logging est sélectioné sur le serveurr. + +La section 'debug' est disponible sur tous type d'erreur, sauf celles qui sont renvoyées par Flask de manière interne (comme `INTERNAL_SERVER_ERROR`, `METHOD_NOT_ALLOWED`, etc.). En effet, celles-ci doivent modifier le moins possible la requête pour ne pas se retrouver avec une autre erreur qui pourrait survenir) + +Le champ "call_stack" est activé seulement quand il y a le paramètre `call_stack` qui est envoyé avec la requête. + +```json +{ + "success": true, + "message": "Nous n'avons pas pu satisfaire la requête", + "error": null, + "data": { + "username": "Animenosekai" + }, + "debug": { + "time": { + "global": 0.036757, + "verification": 0.033558, + "authentication": 0.003031, + "processing": 4.9e-05, + "formatting": 0.0001 + }, + "ip": "127.0.0.1", + "headers": { + "Host": "api.translatepy.com", + "Connection": "close", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Accept-Language": "fr-fr", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15" + }, + "values": {}, + "domain": "api.translatepy.com", + "logs": [ + "1636562693.036563|[INFO] [nasse.receive.Receive.__call__] → Incoming GET request to /account/name from 127.0.0.1", + "1636562693.070008|[ERROR] [nasse.exceptions.base.MissingToken.__init__] An authentication token is missing from the request" + ], + "call_stack": [ + "pass the 'call_stack' parameter to get the call stack" + ] + } +} +``` + +## 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) +- [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) diff --git "a/docs/Fran\303\247ais/Documentation d'API/README.md" "b/docs/Fran\303\247ais/Documentation d'API/README.md" deleted file mode 100644 index e69de29..0000000 diff --git "a/docs/Fran\303\247ais/Documentation d'API/postman/Language.postman_collection.utils.json" "b/docs/Fran\303\247ais/Documentation d'API/postman/Language.postman_collection.utils.json" index 78528d4..bd6a053 100644 --- "a/docs/Fran\303\247ais/Documentation d'API/postman/Language.postman_collection.utils.json" +++ "b/docs/Fran\303\247ais/Documentation d'API/postman/Language.postman_collection.utils.json" @@ -1 +1 @@ -{"info":{"name":"Language","description":"Tous les endpoints sous la section 'Language' de l'interface API de translatepy","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file +{"info":{"name":"Language","description":"Tous les endpoints sous la section 'Language' de l'interface API de translatepy","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/postman/Stars.postman_collection.utils.json" "b/docs/Fran\303\247ais/Documentation d'API/postman/Stars.postman_collection.utils.json" new file mode 100644 index 0000000..75a5451 --- /dev/null +++ "b/docs/Fran\303\247ais/Documentation d'API/postman/Stars.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Stars","description":"Tous les endpoints sous la section 'Stars' de l'interface API de translatepy","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### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Retourner à l'Index](../Pour%20commencer.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### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Retourner à l'Index](../Pour%20commencer.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#### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Réponse\n\n##### Exemple de réponse\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##### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | Non |\n| `result` | The result text | string | Non |\n| `language` | The translation languages | string | Non |\n| `users` | The number of users who starred the translation | | Non |\n\n##### Erreurs possibles\n\n| Erreur | 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[Retourner à l'Index](../Pour%20commencer.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#### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Réponse\n\n##### Exemple de réponse\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##### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | Non |\n| `result` | The result text | string | Non |\n| `language` | The translation languages | string | Non |\n| `users` | The number of users who starred the translation | | Non |\n\n##### Erreurs possibles\n\n| Erreur | 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[Retourner à l'Index](../Pour%20commencer.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":"","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#### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Réponse\n\n##### Exemple de réponse\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##### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | Non |\n| `result` | The result text | string | Non |\n| `language` | The translation languages | string | Non |\n| `users` | The number of users who starred the translation | | Non |\n\n##### Erreurs possibles\n\n| Erreur | 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[Retourner à l'Index](../Pour%20commencer.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":"","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#### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Réponse\n\n##### Exemple de réponse\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##### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | Non |\n| `result` | The result text | string | Non |\n| `language` | The translation languages | string | Non |\n| `users` | The number of users who starred the translation | | Non |\n\n##### Erreurs possibles\n\n| Erreur | 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[Retourner à l'Index](../Pour%20commencer.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#### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n##### Erreurs possibles\n\n| Erreur | 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[Retourner à l'Index](../Pour%20commencer.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#### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n##### Erreurs possibles\n\n| Erreur | 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[Retourner à l'Index](../Pour%20commencer.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"}]}} \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/postman/Stats.postman_collection.utils.json" "b/docs/Fran\303\247ais/Documentation d'API/postman/Stats.postman_collection.utils.json" new file mode 100644 index 0000000..58a17c4 --- /dev/null +++ "b/docs/Fran\303\247ais/Documentation d'API/postman/Stats.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Stats","description":"Tous les endpoints sous la section 'Stats' de l'interface API de translatepy","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":"","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Retourner à l'Index](../Pour%20commencer.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":"","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Retourner à l'Index](../Pour%20commencer.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":"","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### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Retourner à l'Index](../Pour%20commencer.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":"","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### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Retourner à l'Index](../Pour%20commencer.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"}]}} \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/postman/Translation.postman_collection.utils.json" "b/docs/Fran\303\247ais/Documentation d'API/postman/Translation.postman_collection.utils.json" index 5563940..2a6156a 100644 --- "a/docs/Fran\303\247ais/Documentation d'API/postman/Translation.postman_collection.utils.json" +++ "b/docs/Fran\303\247ais/Documentation d'API/postman/Translation.postman_collection.utils.json" @@ -1 +1 @@ -{"info":{"name":"Translation","description":"Tous les endpoints sous la section 'Translation' de l'interface API de translatepy","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'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"}]}} \ No newline at end of file +{"info":{"name":"Translation","description":"Tous les endpoints sous la section 'Translation' de l'interface API de translatepy","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source languages | array | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source languages | array | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The transliteration | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The transliteration | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLang` | The source language | object | Non |\n| `result` | The spellchecked text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLang` | The source language | object | Non |\n| `result` | The spellchecked text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `result` | The resulting language alpha-3 code | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `result` | The resulting language alpha-3 code | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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"}]}} \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/sections/Language.md" "b/docs/Fran\303\247ais/Documentation d'API/sections/Language.md" index deb115b..7b3b23f 100644 --- "a/docs/Fran\303\247ais/Documentation d'API/sections/Language.md" +++ "b/docs/Fran\303\247ais/Documentation d'API/sections/Language.md" @@ -21,9 +21,9 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Oui | str | +| `threshold` | The similarity threshold to use when searching for similar languages | Non | float | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -117,14 +117,14 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | Non | +| `alpha2` | The language alpha2 code | str | Non | +| `alpha3b` | The language alpha3b code | str | Non | +| `alpha3t` | The language alpha3t code | str | Non | +| `alpha3` | The language alpha3 code | str | Non | +| `name` | The language name | str | Non | +| `inForeignLanguages` | The language in foreign languages | object | Non | +| `extra` | The language extra data | object | Non | #### Erreurs possibles @@ -132,7 +132,7 @@ print(r.json()["data"]) | --------------- | -------------------------------- | ------ | | `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Language Search @@ -152,9 +152,9 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `limit` | The limit of languages to return. (max: 100, default: 10) | False | int | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Oui | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | Non | int | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -268,7 +268,7 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `languages` | The languages found | array | False | +| `languages` | The languages found | array | Non | #### Erreurs possibles @@ -276,7 +276,7 @@ print(r.json()["data"]) | --------------- | -------------------------------- | ------ | | `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Language Details (dynamic) @@ -296,14 +296,14 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `threshold` | The similarity threshold to use when searching for similar languages | Non | float | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### URL Dynamique | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `language` | The language to lookup | True | str | +| `language` | The language to lookup | Oui | str | ### Exemple @@ -392,14 +392,14 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | Non | +| `alpha2` | The language alpha2 code | str | Non | +| `alpha3b` | The language alpha3b code | str | Non | +| `alpha3t` | The language alpha3t code | str | Non | +| `alpha3` | The language alpha3 code | str | Non | +| `name` | The language name | str | Non | +| `inForeignLanguages` | The language in foreign languages | object | Non | +| `extra` | The language extra data | object | Non | #### Erreurs possibles @@ -407,4 +407,4 @@ print(r.json()["data"]) | --------------- | -------------------------------- | ------ | | `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) \ No newline at end of file +[Retourner à l'Index](../Pour%20commencer.md#index) \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/sections/Stars.md" "b/docs/Fran\303\247ais/Documentation d'API/sections/Stars.md" new file mode 100644 index 0000000..af78f88 --- /dev/null +++ "b/docs/Fran\303\247ais/Documentation d'API/sections/Stars.md" @@ -0,0 +1,409 @@ + +# Référence de la section Stars + +Ce fichier liste et explique les différents *endpoints* disponible sous la section Stars + +# Stars + +Get all starred translations + +```http +GET /stars +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L49) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET "/stars" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch("/stars", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stars") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars, error: " + r.json()["error"]) +print("Successfully requested for /stars") +print(r.json()["data"]) +``` + +
+ + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Translation Star + + - ### En utilisant GET + +Get the stars for a translation + +```http +GET /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +#### URL Dynamique + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to get | Oui | str | + +#### Exemple + + + + +
+ cURL Exemple + +##### **cURL** + +```bash +curl -X GET "/stars/" +``` + +
+ + +
+ JavaScript Exemple + +##### **JavaScript** + +```javascript +fetch("/stars/", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +##### **Python** + +```python +import requests +r = requests.request("GET", "/stars/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +#### Réponse + +##### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "source": "no example", + "result": "no example", + "language": "no example", + "users": "no example" + } +} + +``` + +##### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `source` | The source text | string | Non | +| `result` | The result text | string | Non | +| `language` | The translation languages | string | Non | +| `users` | The number of users who starred the translation | | Non | + +##### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Retourner à l'Index](../Pour%20commencer.md#index) + + - ### En utilisant POST + +Star a translation + +```http +POST /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +#### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `token` | The token to authenticate the translation | Oui | TranslationToken | + +#### URL Dynamique + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to star | Oui | str | + +#### Exemple + + + + +
+ cURL Exemple + +##### **cURL** + +```bash +curl -X POST \ + --data-urlencode "token=" \ + "/stars/" +``` + +
+ + +
+ JavaScript Exemple + +##### **JavaScript** + +```javascript +fetch(`/stars/?token=${encodeURIComponent("token")}`, { + method: "POST" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +##### **Python** + +```python +import requests +r = requests.request("POST", "/stars/", + params = { + "token": "The token to authenticate the translation" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +#### Réponse + +##### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "source": "no example", + "result": "no example", + "language": "no example", + "users": "no example" + } +} + +``` + +##### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `source` | The source text | string | Non | +| `result` | The result text | string | Non | +| `language` | The translation languages | string | Non | +| `users` | The number of users who starred the translation | | Non | + +##### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Retourner à l'Index](../Pour%20commencer.md#index) + + - ### En utilisant DELETE + +Unstar a translation + +```http +DELETE /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +#### URL Dynamique + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to unstar | Oui | str | + +#### Exemple + + + + +
+ cURL Exemple + +##### **cURL** + +```bash +curl -X DELETE "/stars/" +``` + +
+ + +
+ JavaScript Exemple + +##### **JavaScript** + +```javascript +fetch("/stars/", { + method: "DELETE" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +##### **Python** + +```python +import requests +r = requests.request("DELETE", "/stars/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +##### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Retourner à l'Index](../Pour%20commencer.md#index) diff --git "a/docs/Fran\303\247ais/Documentation d'API/sections/Stats.md" "b/docs/Fran\303\247ais/Documentation d'API/sections/Stats.md" new file mode 100644 index 0000000..29c88e5 --- /dev/null +++ "b/docs/Fran\303\247ais/Documentation d'API/sections/Stats.md" @@ -0,0 +1,172 @@ + +# Référence de la section Stats + +Ce fichier liste et explique les différents *endpoints* disponible sous la section Stats + +# Timings Stats + +Get all timings + +```http +GET /stats/timings +``` + +> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `granularity` | The granularity of the stats | Non | Granularity | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET "/stats/timings" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch("/stats/timings", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stats/timings") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stats/timings, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stats/timings") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stats/timings, error: " + r.json()["error"]) +print("Successfully requested for /stats/timings") +print(r.json()["data"]) +``` + +
+ + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Erros Stats + +Get all errors count for each service + +```http +GET /stats/errors +``` + +> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `granularity` | The granularity of the stats | Non | Granularity | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET "/stats/errors" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch("/stats/errors", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stats/errors") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stats/errors, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stats/errors") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stats/errors, error: " + r.json()["error"]) +print("Successfully requested for /stats/errors") +print(r.json()["data"]) +``` + +
+ + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[Retourner à l'Index](../Pour%20commencer.md#index) \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/sections/Translation.md" "b/docs/Fran\303\247ais/Documentation d'API/sections/Translation.md" index c8f313f..5e1a157 100644 --- "a/docs/Fran\303\247ais/Documentation d'API/sections/Translation.md" +++ "b/docs/Fran\303\247ais/Documentation d'API/sections/Translation.md" @@ -25,11 +25,11 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Oui | str | +| `dest` | The destination language | Oui | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -108,6 +108,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -115,12 +118,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -128,10 +131,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -143,11 +143,11 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source language | object | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The translated text | str | Non | #### Erreurs possibles @@ -161,7 +161,7 @@ print(r.json()["data"]) | `TRANSLATION_ERROR` | When a translation error occurs | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Translation Stream @@ -175,7 +175,7 @@ print(r.json()["data"]) GET /stream ``` -> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101) +> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49) ### Authentification @@ -185,11 +185,11 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Oui | str | +| `dest` | The destination language | Oui | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -268,6 +268,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -275,12 +278,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -288,10 +291,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -303,11 +303,11 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source language | object | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The translated text | str | Non | #### Erreurs possibles @@ -321,7 +321,7 @@ print(r.json()["data"]) | `TRANSLATION_ERROR` | When a translation error occurs | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Translate HTML @@ -378,12 +378,12 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `code` | The HTML snippet to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `parser` | The HTML parser to use | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `code` | The HTML snippet to translate | Oui | str | +| `dest` | The destination language | Oui | str | +| `source` | The source language | Non | str | +| `parser` | The HTML parser to use | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -469,6 +469,9 @@ print(r.json()["data"]) "eng" ], "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -476,10 +479,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "

こんにちは、今日はお元気ですか

大丈夫

" } @@ -491,11 +491,11 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `services` | The translators used | array | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source languages | array | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `services` | The translators used | array | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source languages | array | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The translated text | str | Non | #### Erreurs possibles @@ -509,7 +509,7 @@ print(r.json()["data"]) | `TRANSLATION_ERROR` | When a translation error occurs | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Transliterate @@ -533,11 +533,11 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to transliterate | True | str | -| `dest` | The destination language | False | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to transliterate | Oui | str | +| `dest` | The destination language | Non | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -614,6 +614,9 @@ print(r.json()["data"]) "service": "Google", "source": "おはよう", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -621,12 +624,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -634,10 +637,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Ohayou" } @@ -649,11 +649,11 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The transliteration | str | False | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source language | object | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The transliteration | str | Non | #### Erreurs possibles @@ -667,7 +667,7 @@ print(r.json()["data"]) | `TRANSLATION_ERROR` | When a translation error occurs | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Spellcheck @@ -691,10 +691,10 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to spellcheck | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to spellcheck | Oui | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -771,6 +771,9 @@ print(r.json()["data"]) "service": "Google", "source": "God morning", "sourceLang": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -778,10 +781,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Good morning" } @@ -793,10 +793,10 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLang` | The source language | object | False | -| `result` | The spellchecked text | str | False | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLang` | The source language | object | Non | +| `result` | The spellchecked text | str | Non | #### Erreurs possibles @@ -810,7 +810,7 @@ print(r.json()["data"]) | `TRANSLATION_ERROR` | When a translation error occurs | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Language @@ -834,9 +834,9 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to get the language of | True | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to get the language of | Oui | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | ### Exemple @@ -913,6 +913,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "result": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -920,10 +923,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" } } } @@ -934,9 +934,9 @@ print(r.json()["data"]) | Champ | Description | Type | Peut être `null` | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `result` | The resulting language alpha-3 code | object | False | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `result` | The resulting language alpha-3 code | object | Non | #### Erreurs possibles @@ -950,7 +950,7 @@ print(r.json()["data"]) | `TRANSLATION_ERROR` | When a translation error occurs | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) +[Retourner à l'Index](../Pour%20commencer.md#index) # Text to Speech @@ -993,11 +993,11 @@ Il n'est **pas** nécessaire d'être authentifié | Nom | Description | Obligatoire | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to convert to speech | True | str | -| `source` | The source language | False | str | -| `speed` | The speed of the speech | False | int | -| `gender` | The gender of the speech | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | +| `text` | The text to convert to speech | Oui | str | +| `source` | The source language | Non | str | +| `speed` | The speed of the speech | Non | int | +| `gender` | The gender of the speech | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | ### Exemple @@ -1073,4 +1073,4 @@ print(r.json()["data"]) | `TRANSLATION_ERROR` | When a translation error occurs | 500 | | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | -[Retourner à l'Index](../Getting%20Started.md#index) \ No newline at end of file +[Retourner à l'Index](../Pour%20commencer.md#index) \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Documentation d'API/Getting Started.md" "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Pour commencer.md" similarity index 89% rename from "docs/Fran\303\247ais/Documentation d'API/Getting Started.md" rename to "docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Pour commencer.md" index a0c2d48..c344a73 100644 --- "a/docs/Fran\303\247ais/Documentation d'API/Getting Started.md" +++ "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Pour commencer.md" @@ -101,15 +101,15 @@ Le champ "call_stack" est activé seulement quand il y a le paramètre `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) +- [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) diff --git "a/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Sections/Language.md" "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Sections/Language.md" new file mode 100644 index 0000000..7b3b23f --- /dev/null +++ "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Sections/Language.md" @@ -0,0 +1,410 @@ + +# Référence de la section Language + +Ce fichier liste et explique les différents *endpoints* disponible sous la section Language + +# Language Details + +Retrieving details about the given language + +```http +GET /language/details +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L113) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `lang` | The language to lookup | Oui | str | +| `threshold` | The similarity threshold to use when searching for similar languages | Non | float | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "lang=" \ + "/language/details" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/language/details?lang=${encodeURIComponent("lang")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/details") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/details, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/details", + params = { + "lang": "The language to lookup" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/details, error: " + r.json()["error"]) +print("Successfully requested for /language/details") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "id": "eng", + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + } + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `id` | The language id | str | Non | +| `alpha2` | The language alpha2 code | str | Non | +| `alpha3b` | The language alpha3b code | str | Non | +| `alpha3t` | The language alpha3t code | str | Non | +| `alpha3` | The language alpha3 code | str | Non | +| `name` | The language name | str | Non | +| `inForeignLanguages` | The language in foreign languages | object | Non | +| `extra` | The language extra data | object | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Language Search + +Searching for a language + +```http +GET /language/search +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L135) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `lang` | The language to lookup | Oui | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | Non | int | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "lang=" \ + "/language/search" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/language/search?lang=${encodeURIComponent("lang")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/search") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/search, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/search", + params = { + "lang": "The language to lookup" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/search, error: " + r.json()["error"]) +print("Successfully requested for /language/search") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "languages": [ + { + "string": "English", + "similarity": 100, + "language": { + "id": "eng", + "similarity": 100, + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": { + "af": "Engels", + "sq": "Anglisht", + "am": "እንግሊዝኛ", + "ar": "الإنجليزية", + "hy": "Անգլերեն", + "...": "...", + "zh": "英语", + "he": "אנגלית", + "jv": "Inggris", + "en": "English" + }, + "extra": { + "type": "Living", + "scope": "Individual" + } + } + } + ] + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `languages` | The languages found | array | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Language Details (dynamic) + +Retrieving details about the given language + +```http +GET /language/details/ +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L184) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `threshold` | The similarity threshold to use when searching for similar languages | Non | float | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### URL Dynamique + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `language` | The language to lookup | Oui | str | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET "/language/details/" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch("/language/details/", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/details/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/details/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/details/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/details/, error: " + r.json()["error"]) +print("Successfully requested for /language/details/") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "id": "eng", + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + } + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `id` | The language id | str | Non | +| `alpha2` | The language alpha2 code | str | Non | +| `alpha3b` | The language alpha3b code | str | Non | +| `alpha3t` | The language alpha3t code | str | Non | +| `alpha3` | The language alpha3 code | str | Non | +| `name` | The language name | str | Non | +| `inForeignLanguages` | The language in foreign languages | object | Non | +| `extra` | The language extra data | object | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Sections/Translation.md" "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Sections/Translation.md" new file mode 100644 index 0000000..15e8fa2 --- /dev/null +++ "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/Sections/Translation.md" @@ -0,0 +1,1076 @@ + +# Référence de la section Translation + +Ce fichier liste et explique les différents *endpoints* disponible sous la section Translation + +# Translate + + + Translates the given text to the given language + + i.e Good morning (en) --> おはようございます (ja) + + +```http +GET /translate +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to translate | Oui | str | +| `dest` | The destination language | Oui | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text="\ + --data-urlencode "dest=" \ + "/translate" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/translate?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /translate") + console.log(response.data) + } else { + console.error("An error occured while requesting for /translate, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/translate", + params = { + "text": "The text to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /translate, error: " + r.json()["error"]) +print("Successfully requested for /translate") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "こんにちは世界" + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source language | object | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The translated text | str | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Translation Stream + + + Translates the given text to the given language + + i.e Good morning (en) --> おはようございます (ja) + This endpoint returns a stream of results. + +```http +GET /stream +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to translate | Oui | str | +| `dest` | The destination language | Oui | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text="\ + --data-urlencode "dest=" \ + "/stream" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/stream?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stream") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stream, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stream", + params = { + "text": "The text to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stream, error: " + r.json()["error"]) +print("Successfully requested for /stream") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "こんにちは世界" + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source language | object | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The translated text | str | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Translate HTML + + + Translates the given HTML string or BeautifulSoup object to the given language + + i.e + English: `

Hello

everyone and welcome to my website
` + French: `

Bonjour

tout le monde etBienvenueàMon site internet
` + + Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as + "Hello everyone" with "everyone" in bold but rather "Hello" and "everyone" separately. + + Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified. + If you don't want this behavior, please make sure to pass the string version of the element: + >>> result = Translate().translate_html(str(page_element), "French") + + Parameters: + ---------- + html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup + The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element. + destination_language : str + The language the HTML string needs to be translated in. + source_language : str, default = "auto" + The language of the HTML string. + parser : str, default = "html.parser" + The parser that BeautifulSoup will use to parse the HTML string. + threads_limit : int, default = 100 + The maximum number of threads that will be spawned by translate_html + __internal_replacement_function__ : function, default = None + This is used internally, especially by the translatepy HTTP server to modify the translation step. + + Returns: + -------- + BeautifulSoup: + The result will be the same element as the input `html` parameter with the values modified if the given + input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance. + str: + The result will be a string in any other case. + + + +```http +GET /html +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `code` | The HTML snippet to translate | Oui | str | +| `dest` | The destination language | Oui | str | +| `source` | The source language | Non | str | +| `parser` | The HTML parser to use | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "code="\ + --data-urlencode "dest=" \ + "/html" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/html?code=${encodeURIComponent("code")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /html") + console.log(response.data) + } else { + console.error("An error occured while requesting for /html, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/html", + params = { + "code": "The HTML snippet to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /html, error: " + r.json()["error"]) +print("Successfully requested for /html") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "services": [ + "Google", + "Bing" + ], + "source": "

Hello, how are you today

Comment allez-vous

", + "sourceLanguage": [ + "fra", + "eng" + ], + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "

こんにちは、今日はお元気ですか

大丈夫

" + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `services` | The translators used | array | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source languages | array | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The translated text | str | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Transliterate + + + Transliterates the given text, get its pronunciation + + i.e おはよう --> Ohayou + + +```http +GET /transliterate +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to transliterate | Oui | str | +| `dest` | The destination language | Non | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/transliterate" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/transliterate?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /transliterate") + console.log(response.data) + } else { + console.error("An error occured while requesting for /transliterate, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/transliterate", + params = { + "text": "The text to transliterate" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /transliterate, error: " + r.json()["error"]) +print("Successfully requested for /transliterate") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "おはよう", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "Ohayou" + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLanguage` | The source language | object | Non | +| `destinationLanguage` | The destination language | object | Non | +| `result` | The transliteration | str | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Spellcheck + + + Checks the spelling of a given text + + i.e God morning --> Good morning + + +```http +GET /spellcheck +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to spellcheck | Oui | str | +| `source` | The source language | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/spellcheck" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/spellcheck?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /spellcheck") + console.log(response.data) + } else { + console.error("An error occured while requesting for /spellcheck, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/spellcheck", + params = { + "text": "The text to spellcheck" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /spellcheck, error: " + r.json()["error"]) +print("Successfully requested for /spellcheck") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "God morning", + "sourceLang": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "Good morning" + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `sourceLang` | The source language | object | Non | +| `result` | The spellchecked text | str | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Language + + + Returns the language of the given text + + i.e 皆さんおはようございます! --> Japanese + + +```http +GET /language +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to get the language of | Oui | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | Non | Bool | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/language" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/language?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language", + params = { + "text": "The text to get the language of" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language, error: " + r.json()["error"]) +print("Successfully requested for /language") +print(r.json()["data"]) +``` + +
+ + +### Réponse + +#### Exemple de réponse + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "result": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + } + } +} + +``` + +#### Retourne + +| Champ | Description | Type | Peut être `null` | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | Non | +| `source` | The source text | str | Non | +| `result` | The resulting language alpha-3 code | object | Non | + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) + +# Text to Speech + + + Gives back the text to speech result for the given text + + Args: + text: the given text + source_language: the source language + + Returns: + the mp3 file as bytes + + Example: + >>> from translatepy import Translator + >>> t = Translator() + >>> result = t.text_to_speech("Hello, how are you?") + >>> with open("output.mp3", "wb") as output: # open a binary (b) file to write (w) + ... output.write(result.result) + # or: + result.write_to_file(output) + # Or you can just use write_to_file method: + >>> result.write_to_file("output.mp3") + >>> print("Output of Text to Speech is available in output.mp3!") + + # the result is an MP3 file with the text to speech output + + +```http +GET /tts +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434) + +### Authentification + +Il n'est **pas** nécessaire d'être authentifié + +### Paramètres + +| Nom | Description | Obligatoire | Type | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to convert to speech | Oui | str | +| `source` | The source language | Non | str | +| `speed` | The speed of the speech | Non | int | +| `gender` | The gender of the speech | Non | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | Non | TranslatorList | + +### Exemple + + + + +
+ cURL Exemple + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/tts" +``` + +
+ + +
+ JavaScript Exemple + +#### **JavaScript** + +```javascript +fetch(`/tts?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /tts") + console.log(response.data) + } else { + console.error("An error occured while requesting for /tts, error: " + response.error) + } +}) +``` + +
+ + +
+ Python Exemple + +#### **Python** + +```python +import requests +r = requests.request("GET", "/tts", + params = { + "text": "The text to convert to speech" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /tts, error: " + r.json()["error"]) +print("Successfully requested for /tts") +print(r.json()["data"]) +``` + +
+ + +#### Erreurs possibles + +| Erreur | Description | Code | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[Retourner à l'Index](../Pour%20commencer.md#index) \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/postman/Language.postman_collection.utils.json" "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/postman/Language.postman_collection.utils.json" new file mode 100644 index 0000000..bd6a053 --- /dev/null +++ "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/postman/Language.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Language","description":"Tous les endpoints sous la section 'Language' de l'interface API de translatepy","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | Non |\n| `alpha2` | The language alpha2 code | str | Non |\n| `alpha3b` | The language alpha3b code | str | Non |\n| `alpha3t` | The language alpha3t code | str | Non |\n| `alpha3` | The language alpha3 code | str | Non |\n| `name` | The language name | str | Non |\n| `inForeignLanguages` | The language in foreign languages | object | Non |\n| `extra` | The language extra data | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git "a/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/postman/Translation.postman_collection.utils.json" "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/postman/Translation.postman_collection.utils.json" new file mode 100644 index 0000000..8a72c70 --- /dev/null +++ "b/docs/Fran\303\247ais/Utilisation par CLI/Documentation du Serveur/postman/Translation.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Translation","description":"Tous les endpoints sous la section 'Translation' de l'interface API de translatepy","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source languages | array | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source languages | array | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The translated text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The transliteration | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLanguage` | The source language | object | Non |\n| `destinationLanguage` | The destination language | object | Non |\n| `result` | The transliteration | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLang` | The source language | object | Non |\n| `result` | The spellchecked text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `sourceLang` | The source language | object | Non |\n| `result` | The spellchecked text | str | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `result` | The resulting language alpha-3 code | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n### Réponse\n\n#### Exemple de réponse\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Retourne\n\n| Champ | Description | Type | Peut être `null` |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | Non |\n| `source` | The source text | str | Non |\n| `result` | The resulting language alpha-3 code | object | Non |\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentification\n\nIl n'est **pas** nécessaire d'être authentifié\n\n#### Erreurs possibles\n\n| Erreur | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Retourner à l'Index](../Pour%20commencer.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"}]}} \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Language.postman_collection.utils.json" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Language.postman_collection.utils.json" index 2971e58..ea99dc5 100644 --- "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Language.postman_collection.utils.json" +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Language.postman_collection.utils.json" @@ -1 +1 @@ -{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file +{"info":{"name":"Language","description":"translatepy APIインターフェイスでの「Language」セクションの全てのエンドポイント","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Stars.postman_collection.utils.json" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Stars.postman_collection.utils.json" new file mode 100644 index 0000000..fcf1481 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Stars.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Stars","description":"translatepy APIインターフェイスでの「Stars」セクションの全てのエンドポイント","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### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","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### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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#### 認証\n\nログインは**不要**です\n\n#### レスポンス\n\n##### レスポンスの例\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##### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | いいえ |\n| `result` | The result text | string | いいえ |\n| `language` | The translation languages | string | いいえ |\n| `users` | The number of users who starred the translation | | いいえ |\n\n##### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\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[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","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#### 認証\n\nログインは**不要**です\n\n#### レスポンス\n\n##### レスポンスの例\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##### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | いいえ |\n| `result` | The result text | string | いいえ |\n| `language` | The translation languages | string | いいえ |\n| `users` | The number of users who starred the translation | | いいえ |\n\n##### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\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[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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":"","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#### 認証\n\nログインは**不要**です\n\n#### レスポンス\n\n##### レスポンスの例\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##### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | いいえ |\n| `result` | The result text | string | いいえ |\n| `language` | The translation languages | string | いいえ |\n| `users` | The number of users who starred the translation | | いいえ |\n\n##### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\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[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","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":"","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#### 認証\n\nログインは**不要**です\n\n#### レスポンス\n\n##### レスポンスの例\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##### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `source` | The source text | string | いいえ |\n| `result` | The result text | string | いいえ |\n| `language` | The translation languages | string | いいえ |\n| `users` | The number of users who starred the translation | | いいえ |\n\n##### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\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[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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#### 認証\n\nログインは**不要**です\n\n##### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\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[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","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#### 認証\n\nログインは**不要**です\n\n##### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\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[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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"}]}} \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Stats.postman_collection.utils.json" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Stats.postman_collection.utils.json" new file mode 100644 index 0000000..1299b07 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Stats.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Stats","description":"translatepy APIインターフェイスでの「Stats」セクションの全てのエンドポイント","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":"","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","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":"","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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":"","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### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","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":"","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### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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"}]}} \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Translation.postman_collection.utils.json" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Translation.postman_collection.utils.json" index bfbe934..f53bbdc 100644 --- "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Translation.postman_collection.utils.json" +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Translation.postman_collection.utils.json" @@ -1 +1 @@ -{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file +{"info":{"name":"Translation","description":"translatepy APIインターフェイスでの「Translation」セクションの全てのエンドポイント","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source languages | array | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source languages | array | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The transliteration | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The transliteration | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLang` | The source language | object | いいえ |\n| `result` | The spellchecked text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLang` | The source language | object | いいえ |\n| `result` | The spellchecked text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `result` | The resulting language alpha-3 code | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `result` | The resulting language alpha-3 code | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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"}]}} \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\201\257\343\201\230\343\202\201\343\201\253.md" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\201\257\343\201\230\343\202\201\343\201\253.md" new file mode 100644 index 0000000..79117ba --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\201\257\343\201\230\343\202\201\343\201\253.md" @@ -0,0 +1,123 @@ + +# translatepy APIリファレンス + +translatepy APIリファレンスへようこそ! + +## 全体的に + +### レスポンスの形式 + +一般的に、JSONで形式されたレスポンスは以下の形に返されます(エラーが発生された時もこの形で返されます) + +```json +{ + "success": true, + "message": "出来ました!", + "error": null, + "data": {} +} +``` + +| フィールド | 詳細 | null可能 | +| ------------ | ------------------------------ | ---------------- | +| `success` | リクエストが成功したかどうか | False | +| `message` | 何があったか説明する文章 | True | +| `error` | エラーが発生した時のエラー名 | True | +| `data` | 解答のデータ、リクエストされたデータ | False | + +### エラー + +サーバー上でも、リクエストからでも、様々なエラーが発生する可能性があります。 + +特定なエラーはそれぞれのエンドポイントドキュメントで説明されていなすが、以下に一般的に発生可能のエラーを説明します + +| エラー名 | 詳細 | コード | +| --------------------------- | --------------------------------------------------------------------------------------------------------------- | ----- | +| `SERVER_ERROR` | リクエストの処理中でサーバー上のエラーが発生した時 | 500 | +| `MISSING_CONTEXT` | Nasseコンテキストに居ないのに、Nasseコンテキストのみで利用可能のデータをアクセスしようとしたとき | 500 | +| `INTERNAL_SERVER_ERROR` | システム上でエラーが発生した時 | 500 | +| `METHOD_NOT_ALLOWED` | HTTPリクエストメソッドを間違えた時 | 405 | +| `CLIENT_ERROR` | リクエストで何か足りないかダメな時 | 400 | +| `MISSING_VALUE` | リクエストから何か足りない時 | 400 | +| `MISSING_PARAM` | 必要のパラメーターが一つリクエストから不足している時 | 400 | +| `MISSING_DYNAMIC` | ダイナミックURLのパーツが一つURLから不足している時 | 400 | +| `MISSING_HEADER` | 必要のヘッダーが一つリクエストから不足している時 | 400 | +| `MISSING_COOKIE` | 必要のクッキーが一つリクエストから不足している時 | 400 | +| `AUTH_ERROR` | 認証中にエラーが発生した時 | 403 | + +### 認証されたリクエスト + +ユーザーがログインされていること + +ユーザーのログインが必要な場合、「Authorization」ヘッダーがログインの時に送られたトークンに設定されることが必要です。 + +「translatepy_token」のパラメーターと「__translatepy_token」のクッキーも利用可能ですがこれらは優先されません + +エンドポイントの認証ルールが「検証のみ」になっている場合は、アカウントがデータベースから読み込む事なく、トークンの形式や有効期限をチェックするだけです。 + +### デバッグモード + +デバッグモードが有効の時(`-d`か`--debug`)は、色々な情報が`debug`フィールドで返送されて、`DEBUG`のロギングレベルが選ばれます。 + +'debug'フィルーどは重大なエラー(`INTERNAL_SERVER_ERROR`、 `METHOD_NOT_ALLOWED`、 など)しない限り、送られます。(重大なエラーが発生したら、なるべくもう一度エラーが発生しないようにする必要があります) + +`call_stack`フィールドは`call_stack`パラメーターをリクエストで入れる時だけ送信されます。 + +```json +{ + "success": true, + "message": "リクエストが成功しませんでした", + "error": null, + "data": { + "username": "Animenosekai" + }, + "debug": { + "time": { + "global": 0.036757, + "verification": 0.033558, + "authentication": 0.003031, + "processing": 4.9e-05, + "formatting": 0.0001 + }, + "ip": "127.0.0.1", + "headers": { + "Host": "api.translatepy.com", + "Connection": "close", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Accept-Language": "fr-fr", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15" + }, + "values": {}, + "domain": "api.translatepy.com", + "logs": [ + "1636562693.036563|[INFO] [nasse.receive.Receive.__call__] → Incoming GET request to /account/name from 127.0.0.1", + "1636562693.070008|[ERROR] [nasse.exceptions.base.MissingToken.__init__] An authentication token is missing from the request" + ], + "call_stack": [ + "pass the 'call_stack' parameter to get the call stack" + ] + } +} +``` + +## インデックス + +- [Language](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language) + - [Language Details](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language-details) + - [Language Search](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language-search) + - [Language Details (dynamic)](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language-details-dynamic) +- [Stars](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Stars.md#stars) + - [Stars](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Stars.md#stars-1) + - [Translation Star](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Stars.md#translation-star) +- [Stats](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Stats.md#stats) + - [Timings Stats](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Stats.md#timings-stats) + - [Erros Stats](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Stats.md#erros-stats) +- [Translation](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translation) + - [Translate](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translate) + - [Translation Stream](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translation-stream) + - [Translate HTML](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translate-html) + - [Transliterate](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#transliterate) + - [Spellcheck](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#spellcheck) + - [Language](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#language-1) + - [Text to Speech](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#text-to-speech) diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Language.md" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Language.md" new file mode 100644 index 0000000..2e6c873 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Language.md" @@ -0,0 +1,410 @@ + +# Language セクションのAPIリファレンス + +このファイルは「Language」セクションの全てのエンドポイントを説明します。 + +# Language Details + +Retrieving details about the given language + +```http +GET /language/details +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L113) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `lang` | The language to lookup | はい | str | +| `threshold` | The similarity threshold to use when searching for similar languages | いいえ | float | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "lang=" \ + "/language/details" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/language/details?lang=${encodeURIComponent("lang")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/details") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/details, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/details", + params = { + "lang": "The language to lookup" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/details, error: " + r.json()["error"]) +print("Successfully requested for /language/details") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "id": "eng", + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + } + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `id` | The language id | str | いいえ | +| `alpha2` | The language alpha2 code | str | いいえ | +| `alpha3b` | The language alpha3b code | str | いいえ | +| `alpha3t` | The language alpha3t code | str | いいえ | +| `alpha3` | The language alpha3 code | str | いいえ | +| `name` | The language name | str | いいえ | +| `inForeignLanguages` | The language in foreign languages | object | いいえ | +| `extra` | The language extra data | object | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Language Search + +Searching for a language + +```http +GET /language/search +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L135) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `lang` | The language to lookup | はい | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | いいえ | int | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "lang=" \ + "/language/search" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/language/search?lang=${encodeURIComponent("lang")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/search") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/search, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/search", + params = { + "lang": "The language to lookup" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/search, error: " + r.json()["error"]) +print("Successfully requested for /language/search") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "languages": [ + { + "string": "English", + "similarity": 100, + "language": { + "id": "eng", + "similarity": 100, + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": { + "af": "Engels", + "sq": "Anglisht", + "am": "እንግሊዝኛ", + "ar": "الإنجليزية", + "hy": "Անգլերեն", + "...": "...", + "zh": "英语", + "he": "אנגלית", + "jv": "Inggris", + "en": "English" + }, + "extra": { + "type": "Living", + "scope": "Individual" + } + } + } + ] + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `languages` | The languages found | array | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Language Details (dynamic) + +Retrieving details about the given language + +```http +GET /language/details/ +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L184) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `threshold` | The similarity threshold to use when searching for similar languages | いいえ | float | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### ダイナミックURL + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `language` | The language to lookup | はい | str | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET "/language/details/" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch("/language/details/", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/details/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/details/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/details/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/details/, error: " + r.json()["error"]) +print("Successfully requested for /language/details/") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "id": "eng", + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + } + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `id` | The language id | str | いいえ | +| `alpha2` | The language alpha2 code | str | いいえ | +| `alpha3b` | The language alpha3b code | str | いいえ | +| `alpha3t` | The language alpha3t code | str | いいえ | +| `alpha3` | The language alpha3 code | str | いいえ | +| `name` | The language name | str | いいえ | +| `inForeignLanguages` | The language in foreign languages | object | いいえ | +| `extra` | The language extra data | object | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Stars.md" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Stars.md" new file mode 100644 index 0000000..69cd34e --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Stars.md" @@ -0,0 +1,409 @@ + +# Stars セクションのAPIリファレンス + +このファイルは「Stars」セクションの全てのエンドポイントを説明します。 + +# Stars + +Get all starred translations + +```http +GET /stars +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L49) + +### 認証 + +ログインは**不要**です + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET "/stars" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch("/stars", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stars") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars, error: " + r.json()["error"]) +print("Successfully requested for /stars") +print(r.json()["data"]) +``` + +
+ + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Translation Star + + - ### GETを使って + +Get the stars for a translation + +```http +GET /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### 認証 + +ログインは**不要**です + +#### ダイナミックURL + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to get | はい | str | + +#### 例 + + + + +
+ cURL 例 + +##### **cURL** + +```bash +curl -X GET "/stars/" +``` + +
+ + +
+ JavaScript 例 + +##### **JavaScript** + +```javascript +fetch("/stars/", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +##### **Python** + +```python +import requests +r = requests.request("GET", "/stars/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +#### レスポンス + +##### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "source": "no example", + "result": "no example", + "language": "no example", + "users": "no example" + } +} + +``` + +##### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `source` | The source text | string | いいえ | +| `result` | The result text | string | いいえ | +| `language` | The translation languages | string | いいえ | +| `users` | The number of users who starred the translation | | いいえ | + +##### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + + - ### POSTを使って + +Star a translation + +```http +POST /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### 認証 + +ログインは**不要**です + +#### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `token` | The token to authenticate the translation | はい | TranslationToken | + +#### ダイナミックURL + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to star | はい | str | + +#### 例 + + + + +
+ cURL 例 + +##### **cURL** + +```bash +curl -X POST \ + --data-urlencode "token=" \ + "/stars/" +``` + +
+ + +
+ JavaScript 例 + +##### **JavaScript** + +```javascript +fetch(`/stars/?token=${encodeURIComponent("token")}`, { + method: "POST" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +##### **Python** + +```python +import requests +r = requests.request("POST", "/stars/", + params = { + "token": "The token to authenticate the translation" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +#### レスポンス + +##### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "source": "no example", + "result": "no example", + "language": "no example", + "users": "no example" + } +} + +``` + +##### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `source` | The source text | string | いいえ | +| `result` | The result text | string | いいえ | +| `language` | The translation languages | string | いいえ | +| `users` | The number of users who starred the translation | | いいえ | + +##### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + + - ### DELETEを使って + +Unstar a translation + +```http +DELETE /stars/ +``` + +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) + +#### 認証 + +ログインは**不要**です + +#### ダイナミックURL + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `translation_id` | The ID of the translation to unstar | はい | str | + +#### 例 + + + + +
+ cURL 例 + +##### **cURL** + +```bash +curl -X DELETE "/stars/" +``` + +
+ + +
+ JavaScript 例 + +##### **JavaScript** + +```javascript +fetch("/stars/", { + method: "DELETE" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stars/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stars/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +##### **Python** + +```python +import requests +r = requests.request("DELETE", "/stars/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stars/, error: " + r.json()["error"]) +print("Successfully requested for /stars/") +print(r.json()["data"]) +``` + +
+ + +##### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `FORBIDDEN` | You are not allowed to star this translation | 403 | +| `NOT_FOUND` | The translation could not be found | 404 | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Stats.md" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Stats.md" new file mode 100644 index 0000000..bfc4320 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Stats.md" @@ -0,0 +1,172 @@ + +# Stats セクションのAPIリファレンス + +このファイルは「Stats」セクションの全てのエンドポイントを説明します。 + +# Timings Stats + +Get all timings + +```http +GET /stats/timings +``` + +> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `granularity` | The granularity of the stats | いいえ | Granularity | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET "/stats/timings" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch("/stats/timings", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stats/timings") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stats/timings, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stats/timings") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stats/timings, error: " + r.json()["error"]) +print("Successfully requested for /stats/timings") +print(r.json()["data"]) +``` + +
+ + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Erros Stats + +Get all errors count for each service + +```http +GET /stats/errors +``` + +> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `granularity` | The granularity of the stats | いいえ | Granularity | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET "/stats/errors" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch("/stats/errors", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stats/errors") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stats/errors, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stats/errors") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stats/errors, error: " + r.json()["error"]) +print("Successfully requested for /stats/errors") +print(r.json()["data"]) +``` + +
+ + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Translation.md" "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Translation.md" new file mode 100644 index 0000000..b1002e3 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/API\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Translation.md" @@ -0,0 +1,1076 @@ + +# Translation セクションのAPIリファレンス + +このファイルは「Translation」セクションの全てのエンドポイントを説明します。 + +# Translate + + + Translates the given text to the given language + + i.e Good morning (en) --> おはようございます (ja) + + +```http +GET /translate +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to translate | はい | str | +| `dest` | The destination language | はい | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text="\ + --data-urlencode "dest=" \ + "/translate" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/translate?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /translate") + console.log(response.data) + } else { + console.error("An error occured while requesting for /translate, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/translate", + params = { + "text": "The text to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /translate, error: " + r.json()["error"]) +print("Successfully requested for /translate") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "こんにちは世界" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source language | object | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The translated text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Translation Stream + + + Translates the given text to the given language + + i.e Good morning (en) --> おはようございます (ja) + This endpoint returns a stream of results. + +```http +GET /stream +``` + +> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to translate | はい | str | +| `dest` | The destination language | はい | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text="\ + --data-urlencode "dest=" \ + "/stream" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/stream?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stream") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stream, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stream", + params = { + "text": "The text to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stream, error: " + r.json()["error"]) +print("Successfully requested for /stream") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "こんにちは世界" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source language | object | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The translated text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Translate HTML + + + Translates the given HTML string or BeautifulSoup object to the given language + + i.e + English: `

Hello

everyone and welcome to my website
` + French: `

Bonjour

tout le monde etBienvenueàMon site internet
` + + Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as + "Hello everyone" with "everyone" in bold but rather "Hello" and "everyone" separately. + + Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified. + If you don't want this behavior, please make sure to pass the string version of the element: + >>> result = Translate().translate_html(str(page_element), "French") + + Parameters: + ---------- + html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup + The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element. + destination_language : str + The language the HTML string needs to be translated in. + source_language : str, default = "auto" + The language of the HTML string. + parser : str, default = "html.parser" + The parser that BeautifulSoup will use to parse the HTML string. + threads_limit : int, default = 100 + The maximum number of threads that will be spawned by translate_html + __internal_replacement_function__ : function, default = None + This is used internally, especially by the translatepy HTTP server to modify the translation step. + + Returns: + -------- + BeautifulSoup: + The result will be the same element as the input `html` parameter with the values modified if the given + input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance. + str: + The result will be a string in any other case. + + + +```http +GET /html +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `code` | The HTML snippet to translate | はい | str | +| `dest` | The destination language | はい | str | +| `source` | The source language | いいえ | str | +| `parser` | The HTML parser to use | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "code="\ + --data-urlencode "dest=" \ + "/html" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/html?code=${encodeURIComponent("code")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /html") + console.log(response.data) + } else { + console.error("An error occured while requesting for /html, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/html", + params = { + "code": "The HTML snippet to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /html, error: " + r.json()["error"]) +print("Successfully requested for /html") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "services": [ + "Google", + "Bing" + ], + "source": "

Hello, how are you today

Comment allez-vous

", + "sourceLanguage": [ + "fra", + "eng" + ], + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "

こんにちは、今日はお元気ですか

大丈夫

" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `services` | The translators used | array | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source languages | array | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The translated text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Transliterate + + + Transliterates the given text, get its pronunciation + + i.e おはよう --> Ohayou + + +```http +GET /transliterate +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to transliterate | はい | str | +| `dest` | The destination language | いいえ | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/transliterate" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/transliterate?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /transliterate") + console.log(response.data) + } else { + console.error("An error occured while requesting for /transliterate, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/transliterate", + params = { + "text": "The text to transliterate" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /transliterate, error: " + r.json()["error"]) +print("Successfully requested for /transliterate") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "おはよう", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "Ohayou" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source language | object | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The transliteration | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Spellcheck + + + Checks the spelling of a given text + + i.e God morning --> Good morning + + +```http +GET /spellcheck +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to spellcheck | はい | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/spellcheck" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/spellcheck?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /spellcheck") + console.log(response.data) + } else { + console.error("An error occured while requesting for /spellcheck, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/spellcheck", + params = { + "text": "The text to spellcheck" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /spellcheck, error: " + r.json()["error"]) +print("Successfully requested for /spellcheck") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "God morning", + "sourceLang": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "Good morning" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLang` | The source language | object | いいえ | +| `result` | The spellchecked text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Language + + + Returns the language of the given text + + i.e 皆さんおはようございます! --> Japanese + + +```http +GET /language +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to get the language of | はい | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/language" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/language?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language", + params = { + "text": "The text to get the language of" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language, error: " + r.json()["error"]) +print("Successfully requested for /language") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "result": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + } + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `result` | The resulting language alpha-3 code | object | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Text to Speech + + + Gives back the text to speech result for the given text + + Args: + text: the given text + source_language: the source language + + Returns: + the mp3 file as bytes + + Example: + >>> from translatepy import Translator + >>> t = Translator() + >>> result = t.text_to_speech("Hello, how are you?") + >>> with open("output.mp3", "wb") as output: # open a binary (b) file to write (w) + ... output.write(result.result) + # or: + result.write_to_file(output) + # Or you can just use write_to_file method: + >>> result.write_to_file("output.mp3") + >>> print("Output of Text to Speech is available in output.mp3!") + + # the result is an MP3 file with the text to speech output + + +```http +GET /tts +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to convert to speech | はい | str | +| `source` | The source language | いいえ | str | +| `speed` | The speed of the speech | いいえ | int | +| `gender` | The gender of the speech | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/tts" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/tts?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /tts") + console.log(response.data) + } else { + console.error("An error occured while requesting for /tts, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/tts", + params = { + "text": "The text to convert to speech" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /tts, error: " + r.json()["error"]) +print("Successfully requested for /tts") +print(r.json()["data"]) +``` + +
+ + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Language.postman_collection.utils.json" "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Language.postman_collection.utils.json" new file mode 100644 index 0000000..ea99dc5 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Language.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Language","description":"translatepy APIインターフェイスでの「Language」セクションの全てのエンドポイント","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | いいえ |\n| `alpha2` | The language alpha2 code | str | いいえ |\n| `alpha3b` | The language alpha3b code | str | いいえ |\n| `alpha3t` | The language alpha3t code | str | いいえ |\n| `alpha3` | The language alpha3 code | str | いいえ |\n| `name` | The language name | str | いいえ |\n| `inForeignLanguages` | The language in foreign languages | object | いいえ |\n| `extra` | The language extra data | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Translation.postman_collection.utils.json" "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Translation.postman_collection.utils.json" new file mode 100644 index 0000000..d0fef37 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/postman/Translation.postman_collection.utils.json" @@ -0,0 +1 @@ +{"info":{"name":"Translation","description":"translatepy APIインターフェイスでの「Translation」セクションの全てのエンドポイント","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source languages | array | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source languages | array | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The translated text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The transliteration | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLanguage` | The source language | object | いいえ |\n| `destinationLanguage` | The destination language | object | いいえ |\n| `result` | The transliteration | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLang` | The source language | object | いいえ |\n| `result` | The spellchecked text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `sourceLang` | The source language | object | いいえ |\n| `result` | The spellchecked text | str | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `result` | The resulting language alpha-3 code | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \n\n\n### 認証\n\nログインは**不要**です\n\n### レスポンス\n\n#### レスポンスの例\n\n```json\n{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {\n \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### 返したフィールド\n\n| フィールド | 詳細 | タイプ | null可能 |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | いいえ |\n| `source` | The source text | str | いいえ |\n| `result` | The resulting language alpha-3 code | object | いいえ |\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### 認証\n\nログインは**不要**です\n\n#### 起こりうるエラー\n\n| エラー名 | 詳細 | コード |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス)"},"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"}]}} \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\201\257\343\201\230\343\202\201\343\201\253.md" "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\201\257\343\201\230\343\202\201\343\201\253.md" new file mode 100644 index 0000000..a56d25e --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\201\257\343\201\230\343\202\201\343\201\253.md" @@ -0,0 +1,117 @@ + +# translatepy APIリファレンス + +translatepy APIリファレンスへようこそ! + +## 全体的に + +### レスポンスの形式 + +一般的に、JSONで形式されたレスポンスは以下の形に返されます(エラーが発生された時もこの形で返されます) + +```json +{ + "success": true, + "message": "出来ました!", + "error": null, + "data": {} +} +``` + +| フィールド | 詳細 | null可能 | +| ------------ | ------------------------------ | ---------------- | +| `success` | リクエストが成功したかどうか | False | +| `message` | 何があったか説明する文章 | True | +| `error` | エラーが発生した時のエラー名 | True | +| `data` | 解答のデータ、リクエストされたデータ | False | + +### エラー + +サーバー上でも、リクエストからでも、様々なエラーが発生する可能性があります。 + +特定なエラーはそれぞれのエンドポイントドキュメントで説明されていなすが、以下に一般的に発生可能のエラーを説明します + +| エラー名 | 詳細 | コード | +| --------------------------- | --------------------------------------------------------------------------------------------------------------- | ----- | +| `SERVER_ERROR` | リクエストの処理中でサーバー上のエラーが発生した時 | 500 | +| `MISSING_CONTEXT` | Nasseコンテキストに居ないのに、Nasseコンテキストのみで利用可能のデータをアクセスしようとしたとき | 500 | +| `INTERNAL_SERVER_ERROR` | システム上でエラーが発生した時 | 500 | +| `METHOD_NOT_ALLOWED` | HTTPリクエストメソッドを間違えた時 | 405 | +| `CLIENT_ERROR` | リクエストで何か足りないかダメな時 | 400 | +| `MISSING_VALUE` | リクエストから何か足りない時 | 400 | +| `MISSING_PARAM` | 必要のパラメーターが一つリクエストから不足している時 | 400 | +| `MISSING_DYNAMIC` | ダイナミックURLのパーツが一つURLから不足している時 | 400 | +| `MISSING_HEADER` | 必要のヘッダーが一つリクエストから不足している時 | 400 | +| `MISSING_COOKIE` | 必要のクッキーが一つリクエストから不足している時 | 400 | +| `AUTH_ERROR` | 認証中にエラーが発生した時 | 403 | + +### 認証されたリクエスト + +ユーザーがログインされていること + +ユーザーのログインが必要な場合、「Authorization」ヘッダーがログインの時に送られたトークンに設定されることが必要です。 + +「translatepy_token」のパラメーターと「__translatepy_token」のクッキーも利用可能ですがこれらは優先されません + +エンドポイントの認証ルールが「検証のみ」になっている場合は、アカウントがデータベースから読み込む事なく、トークンの形式や有効期限をチェックするだけです。 + +### デバッグモード + +デバッグモードが有効の時(`-d`か`--debug`)は、色々な情報が`debug`フィールドで返送されて、`DEBUG`のロギングレベルが選ばれます。 + +'debug'フィルーどは重大なエラー(`INTERNAL_SERVER_ERROR`、 `METHOD_NOT_ALLOWED`、 など)しない限り、送られます。(重大なエラーが発生したら、なるべくもう一度エラーが発生しないようにする必要があります) + +`call_stack`フィールドは`call_stack`パラメーターをリクエストで入れる時だけ送信されます。 + +```json +{ + "success": true, + "message": "リクエストが成功しませんでした", + "error": null, + "data": { + "username": "Animenosekai" + }, + "debug": { + "time": { + "global": 0.036757, + "verification": 0.033558, + "authentication": 0.003031, + "processing": 4.9e-05, + "formatting": 0.0001 + }, + "ip": "127.0.0.1", + "headers": { + "Host": "api.translatepy.com", + "Connection": "close", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Accept-Language": "fr-fr", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15" + }, + "values": {}, + "domain": "api.translatepy.com", + "logs": [ + "1636562693.036563|[INFO] [nasse.receive.Receive.__call__] → Incoming GET request to /account/name from 127.0.0.1", + "1636562693.070008|[ERROR] [nasse.exceptions.base.MissingToken.__init__] An authentication token is missing from the request" + ], + "call_stack": [ + "pass the 'call_stack' parameter to get the call stack" + ] + } +} +``` + +## インデックス + +- [Language](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language) + - [Language Details](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language-details) + - [Language Search](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language-search) + - [Language Details (dynamic)](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Language.md#language-details-dynamic) +- [Translation](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translation) + - [Translate](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translate) + - [Translation Stream](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translation-stream) + - [Translate HTML](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#translate-html) + - [Transliterate](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#transliterate) + - [Spellcheck](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#spellcheck) + - [Language](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#language-1) + - [Text to Speech](./%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3/Translation.md#text-to-speech) diff --git "a/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Language.md" "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Language.md" new file mode 100644 index 0000000..2e6c873 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Language.md" @@ -0,0 +1,410 @@ + +# Language セクションのAPIリファレンス + +このファイルは「Language」セクションの全てのエンドポイントを説明します。 + +# Language Details + +Retrieving details about the given language + +```http +GET /language/details +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L113) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `lang` | The language to lookup | はい | str | +| `threshold` | The similarity threshold to use when searching for similar languages | いいえ | float | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "lang=" \ + "/language/details" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/language/details?lang=${encodeURIComponent("lang")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/details") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/details, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/details", + params = { + "lang": "The language to lookup" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/details, error: " + r.json()["error"]) +print("Successfully requested for /language/details") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "id": "eng", + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + } + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `id` | The language id | str | いいえ | +| `alpha2` | The language alpha2 code | str | いいえ | +| `alpha3b` | The language alpha3b code | str | いいえ | +| `alpha3t` | The language alpha3t code | str | いいえ | +| `alpha3` | The language alpha3 code | str | いいえ | +| `name` | The language name | str | いいえ | +| `inForeignLanguages` | The language in foreign languages | object | いいえ | +| `extra` | The language extra data | object | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Language Search + +Searching for a language + +```http +GET /language/search +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L135) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `lang` | The language to lookup | はい | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | いいえ | int | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "lang=" \ + "/language/search" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/language/search?lang=${encodeURIComponent("lang")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/search") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/search, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/search", + params = { + "lang": "The language to lookup" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/search, error: " + r.json()["error"]) +print("Successfully requested for /language/search") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "languages": [ + { + "string": "English", + "similarity": 100, + "language": { + "id": "eng", + "similarity": 100, + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": { + "af": "Engels", + "sq": "Anglisht", + "am": "እንግሊዝኛ", + "ar": "الإنجليزية", + "hy": "Անգլերեն", + "...": "...", + "zh": "英语", + "he": "אנגלית", + "jv": "Inggris", + "en": "English" + }, + "extra": { + "type": "Living", + "scope": "Individual" + } + } + } + ] + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `languages` | The languages found | array | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Language Details (dynamic) + +Retrieving details about the given language + +```http +GET /language/details/ +``` + +> [translatepy/server/language.py](../../translatepy/server/language.py#L184) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `threshold` | The similarity threshold to use when searching for similar languages | いいえ | float | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### ダイナミックURL + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `language` | The language to lookup | はい | str | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET "/language/details/" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch("/language/details/", { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language/details/") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language/details/, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language/details/") +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language/details/, error: " + r.json()["error"]) +print("Successfully requested for /language/details/") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "id": "eng", + "alpha2": "en", + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + } + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `id` | The language id | str | いいえ | +| `alpha2` | The language alpha2 code | str | いいえ | +| `alpha3b` | The language alpha3b code | str | いいえ | +| `alpha3t` | The language alpha3t code | str | いいえ | +| `alpha3` | The language alpha3 code | str | いいえ | +| `name` | The language name | str | いいえ | +| `inForeignLanguages` | The language in foreign languages | object | いいえ | +| `extra` | The language extra data | object | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) \ No newline at end of file diff --git "a/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Translation.md" "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Translation.md" new file mode 100644 index 0000000..c4a97d9 --- /dev/null +++ "b/docs/\346\227\245\346\234\254\350\252\236/CLI\343\201\247\343\201\256\345\210\251\347\224\250/\343\202\265\343\203\274\343\203\220\343\203\274\343\201\256\343\203\211\343\202\255\343\203\245\343\203\241\343\203\263\343\203\210/\343\202\273\343\202\257\343\202\267\343\203\247\343\203\263/Translation.md" @@ -0,0 +1,1076 @@ + +# Translation セクションのAPIリファレンス + +このファイルは「Translation」セクションの全てのエンドポイントを説明します。 + +# Translate + + + Translates the given text to the given language + + i.e Good morning (en) --> おはようございます (ja) + + +```http +GET /translate +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to translate | はい | str | +| `dest` | The destination language | はい | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text="\ + --data-urlencode "dest=" \ + "/translate" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/translate?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /translate") + console.log(response.data) + } else { + console.error("An error occured while requesting for /translate, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/translate", + params = { + "text": "The text to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /translate, error: " + r.json()["error"]) +print("Successfully requested for /translate") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "こんにちは世界" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source language | object | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The translated text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Translation Stream + + + Translates the given text to the given language + + i.e Good morning (en) --> おはようございます (ja) + This endpoint returns a stream of results. + +```http +GET /stream +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to translate | はい | str | +| `dest` | The destination language | はい | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text="\ + --data-urlencode "dest=" \ + "/stream" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/stream?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /stream") + console.log(response.data) + } else { + console.error("An error occured while requesting for /stream, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/stream", + params = { + "text": "The text to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /stream, error: " + r.json()["error"]) +print("Successfully requested for /stream") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "こんにちは世界" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source language | object | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The translated text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Translate HTML + + + Translates the given HTML string or BeautifulSoup object to the given language + + i.e + English: `

Hello

everyone and welcome to my website
` + French: `

Bonjour

tout le monde etBienvenueàMon site internet
` + + Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as + "Hello everyone" with "everyone" in bold but rather "Hello" and "everyone" separately. + + Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified. + If you don't want this behavior, please make sure to pass the string version of the element: + >>> result = Translate().translate_html(str(page_element), "French") + + Parameters: + ---------- + html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup + The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element. + destination_language : str + The language the HTML string needs to be translated in. + source_language : str, default = "auto" + The language of the HTML string. + parser : str, default = "html.parser" + The parser that BeautifulSoup will use to parse the HTML string. + threads_limit : int, default = 100 + The maximum number of threads that will be spawned by translate_html + __internal_replacement_function__ : function, default = None + This is used internally, especially by the translatepy HTTP server to modify the translation step. + + Returns: + -------- + BeautifulSoup: + The result will be the same element as the input `html` parameter with the values modified if the given + input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance. + str: + The result will be a string in any other case. + + + +```http +GET /html +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `code` | The HTML snippet to translate | はい | str | +| `dest` | The destination language | はい | str | +| `source` | The source language | いいえ | str | +| `parser` | The HTML parser to use | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "code="\ + --data-urlencode "dest=" \ + "/html" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/html?code=${encodeURIComponent("code")}&dest=${encodeURIComponent("dest")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /html") + console.log(response.data) + } else { + console.error("An error occured while requesting for /html, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/html", + params = { + "code": "The HTML snippet to translate", + "dest": "The destination language" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /html, error: " + r.json()["error"]) +print("Successfully requested for /html") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "services": [ + "Google", + "Bing" + ], + "source": "

Hello, how are you today

Comment allez-vous

", + "sourceLanguage": [ + "fra", + "eng" + ], + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "

こんにちは、今日はお元気ですか

大丈夫

" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `services` | The translators used | array | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source languages | array | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The translated text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Transliterate + + + Transliterates the given text, get its pronunciation + + i.e おはよう --> Ohayou + + +```http +GET /transliterate +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to transliterate | はい | str | +| `dest` | The destination language | いいえ | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/transliterate" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/transliterate?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /transliterate") + console.log(response.data) + } else { + console.error("An error occured while requesting for /transliterate, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/transliterate", + params = { + "text": "The text to transliterate" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /transliterate, error: " + r.json()["error"]) +print("Successfully requested for /transliterate") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "おはよう", + "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "Ohayou" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLanguage` | The source language | object | いいえ | +| `destinationLanguage` | The destination language | object | いいえ | +| `result` | The transliteration | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Spellcheck + + + Checks the spelling of a given text + + i.e God morning --> Good morning + + +```http +GET /spellcheck +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to spellcheck | はい | str | +| `source` | The source language | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/spellcheck" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/spellcheck?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /spellcheck") + console.log(response.data) + } else { + console.error("An error occured while requesting for /spellcheck, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/spellcheck", + params = { + "text": "The text to spellcheck" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /spellcheck, error: " + r.json()["error"]) +print("Successfully requested for /spellcheck") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "God morning", + "sourceLang": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + }, + "result": "Good morning" + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `sourceLang` | The source language | object | いいえ | +| `result` | The spellchecked text | str | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Language + + + Returns the language of the given text + + i.e 皆さんおはようございます! --> Japanese + + +```http +GET /language +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to get the language of | はい | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | いいえ | Bool | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/language" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/language?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /language") + console.log(response.data) + } else { + console.error("An error occured while requesting for /language, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/language", + params = { + "text": "The text to get the language of" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /language, error: " + r.json()["error"]) +print("Successfully requested for /language") +print(r.json()["data"]) +``` + +
+ + +### レスポンス + +#### レスポンスの例 + +```json +{ + "success": true, + "message": "Successfully processed your request", + "error": null, + "data": { + "service": "Google", + "source": "Hello world", + "result": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", + "name": "English", + "inForeignLanguages": {}, + "extra": { + "scope": "Individual", + "type": "Living" + }, + "id": "eng", + "alpha2": "en" + } + } +} + +``` + +#### 返したフィールド + +| フィールド | 詳細 | タイプ | null可能 | +| ---------- | -------------------------------- | ------ | --------- | +| `service` | The translator used | str | いいえ | +| `source` | The source text | str | いいえ | +| `result` | The resulting language alpha-3 code | object | いいえ | + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) + +# Text to Speech + + + Gives back the text to speech result for the given text + + Args: + text: the given text + source_language: the source language + + Returns: + the mp3 file as bytes + + Example: + >>> from translatepy import Translator + >>> t = Translator() + >>> result = t.text_to_speech("Hello, how are you?") + >>> with open("output.mp3", "wb") as output: # open a binary (b) file to write (w) + ... output.write(result.result) + # or: + result.write_to_file(output) + # Or you can just use write_to_file method: + >>> result.write_to_file("output.mp3") + >>> print("Output of Text to Speech is available in output.mp3!") + + # the result is an MP3 file with the text to speech output + + +```http +GET /tts +``` + +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434) + +### 認証 + +ログインは**不要**です + +### パラメーター + +| 名前 | 詳細 | 必要 | タイプ | +| ------------ | -------------------------------- | ---------------- | ---------------- | +| `text` | The text to convert to speech | はい | str | +| `source` | The source language | いいえ | str | +| `speed` | The speed of the speech | いいえ | int | +| `gender` | The gender of the speech | いいえ | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | いいえ | TranslatorList | + +### 例 + + + + +
+ cURL 例 + +#### **cURL** + +```bash +curl -X GET \ + --data-urlencode "text=" \ + "/tts" +``` + +
+ + +
+ JavaScript 例 + +#### **JavaScript** + +```javascript +fetch(`/tts?text=${encodeURIComponent("text")}`, { + method: "GET" +}) +.then((response) => {response.json()}) +.then((response) => { + if (response.success) { + console.info("Successfully requested for /tts") + console.log(response.data) + } else { + console.error("An error occured while requesting for /tts, error: " + response.error) + } +}) +``` + +
+ + +
+ Python 例 + +#### **Python** + +```python +import requests +r = requests.request("GET", "/tts", + params = { + "text": "The text to convert to speech" + }) +if r.status_code >= 400 or not r.json()["success"]: + raise ValueError("An error occured while requesting for /tts, error: " + r.json()["error"]) +print("Successfully requested for /tts") +print(r.json()["data"]) +``` + +
+ + +#### 起こりうるエラー + +| エラー名 | 詳細 | コード | +| --------------- | -------------------------------- | ------ | +| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 | +| `NO_RESULT` | When no result is returned from the translator(s) | 500 | +| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 | +| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 | +| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 | +| `TRANSLATION_ERROR` | When a translation error occurs | 500 | +| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | +[インデックスに戻る](../%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB.md#インデックス) \ No newline at end of file diff --git a/make_docs.py b/make_docs.py index 2ef129c..bb170c6 100644 --- a/make_docs.py +++ b/make_docs.py @@ -6,6 +6,25 @@ app.make_docs("./translatepy/server/docs") +app.make_docs("./docs/English/CLI Usage/Server Documentation", localization=EnglishLocalization) +app.make_docs("./docs/Français/Utilisation par CLI/Documentation du Serveur", localization=FrenchLocalization) +app.make_docs("./docs/日本語/CLIでの利用/サーバーのドキュメント", localization=JapaneseLocalization) + +import os +os.environ["TRANSLATEPY_DB_DISABLED"] = "True" + +import sys +sys.path.append("./server") + +from server.endpoints import stars, stats +from server.endpoints.translation import stream_fix + +for path, endpoint in app.endpoints.items(): + if path == "/stream": + endpoint.handler = stream_fix + break + +app.make_docs("./server/docs", curl=False, javascript=False, python=False) app.make_docs("./docs/English/API Documentation", localization=EnglishLocalization) app.make_docs("./docs/Français/Documentation d'API", localization=FrenchLocalization) app.make_docs("./docs/日本語/APIドキュメント", localization=JapaneseLocalization) diff --git a/server/docs/Getting Started.md b/server/docs/Getting Started.md index 6b2d966..382a4b4 100644 --- a/server/docs/Getting Started.md +++ b/server/docs/Getting Started.md @@ -101,21 +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) -- [Stars](./sections/Stars.md#stars) - - [ > Nasse > Models > Hello](./sections/Stars.md#nasse-models-hello) - - [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) +- [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) diff --git a/server/docs/postman/Language.postman_collection.utils.json b/server/docs/postman/Language.postman_collection.utils.json index 90e7eea..361f945 100644 --- a/server/docs/postman/Language.postman_collection.utils.json +++ b/server/docs/postman/Language.postman_collection.utils.json @@ -1 +1 @@ -{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file +{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git a/server/docs/postman/Stars.postman_collection.utils.json b/server/docs/postman/Stars.postman_collection.utils.json index 4e21aac..7e31d44 100644 --- a/server/docs/postman/Stars.postman_collection.utils.json +++ b/server/docs/postman/Stars.postman_collection.utils.json @@ -1 +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":" > Nasse > Models > Hello","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":" > Nasse > Models > Hello","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#L81)\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 | False |\n| `result` | The result text | string | False |\n| `language` | The translation languages | string | False |\n| `users` | The number of users who starred the translation | | False |\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#L81)\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 | False |\n| `result` | The result text | string | False |\n| `language` | The translation languages | string | False |\n| `users` | The number of users who starred the translation | | False |\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":"","description":"The token to authenticate the translation"}]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L81)\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 | False |\n| `result` | The result text | string | False |\n| `language` | The translation languages | string | False |\n| `users` | The number of users who starred the translation | | False |\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":"","description":"The token to authenticate the translation"}]},"description":"\n> [server/endpoints/stars.py](../../server/endpoints/stars.py#L81)\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 | False |\n| `result` | The result text | string | False |\n| `language` | The translation languages | string | False |\n| `users` | The number of users who starred the translation | | False |\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#L81)\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#L81)\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"}]}} \ No newline at end of file +{"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 | | 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 | | 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":"","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 | | 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":"","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 | | 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"}]}} \ No newline at end of file diff --git a/server/docs/postman/Translation.postman_collection.utils.json b/server/docs/postman/Translation.postman_collection.utils.json index 7923f7c..3bbc734 100644 --- a/server/docs/postman/Translation.postman_collection.utils.json +++ b/server/docs/postman/Translation.postman_collection.utils.json @@ -1 +1 @@ -{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"destinationLanguage\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file +{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [server/endpoints/translation.py](../../server/endpoints/translation.py#L49)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file diff --git a/server/docs/sections/Language.md b/server/docs/sections/Language.md index f056cf4..e4c25ce 100644 --- a/server/docs/sections/Language.md +++ b/server/docs/sections/Language.md @@ -3,7 +3,7 @@ This file lists and explains the different endpoints available in the Language section. -## Language Details +# Language Details Retrieving details about the given language @@ -11,7 +11,7 @@ Retrieving details about the given language GET /language/details ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L113) +> [translatepy/server/language.py](../../translatepy/server/language.py#L113) ### Authentication @@ -21,57 +21,13 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "lang=" \ - "/language/details" -``` - -#### **JavaScript** - -```bash -fetch(`/language/details?lang=${encodeURIComponent("lang")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /language/details") - console.log(response.data) - } else { - console.error("An error occured while requesting for /language/details, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/language/details", - params = { - "lang": "The language to lookup" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /language/details, error: " + r.json()["error"]) -print("Successfully requested for /language/details") -print(r.json()["data"]) -``` - +| `lang` | The language to lookup | Yes | str | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -99,14 +55,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors @@ -116,7 +72,7 @@ print(r.json()["data"]) | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Language Search +# Language Search Searching for a language @@ -124,7 +80,7 @@ Searching for a language GET /language/search ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L135) +> [translatepy/server/language.py](../../translatepy/server/language.py#L135) ### Authentication @@ -134,57 +90,13 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `limit` | The limit of languages to return. (max: 100, default: 10) | False | int | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "lang=" \ - "/language/search" -``` - -#### **JavaScript** - -```bash -fetch(`/language/search?lang=${encodeURIComponent("lang")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /language/search") - console.log(response.data) - } else { - console.error("An error occured while requesting for /language/search, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/language/search", - params = { - "lang": "The language to lookup" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /language/search, error: " + r.json()["error"]) -print("Successfully requested for /language/search") -print(r.json()["data"]) -``` - +| `lang` | The language to lookup | Yes | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | No | int | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -232,7 +144,7 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `languages` | The languages found | array | False | +| `languages` | The languages found | array | No | #### Possible Errors @@ -242,7 +154,7 @@ print(r.json()["data"]) | `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Language Details (dynamic) +# Language Details (dynamic) Retrieving details about the given language @@ -250,7 +162,7 @@ Retrieving details about the given language GET /language/details/ ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/language.py#L184) +> [translatepy/server/language.py](../../translatepy/server/language.py#L184) ### Authentication @@ -260,57 +172,18 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Dynamic URL | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `language` | The language to lookup | True | str | - -### Example - - - -#### **cURL** - -```bash -curl -X GET "/language/details/" -``` - -#### **JavaScript** - -```bash -fetch("/language/details/", { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /language/details/") - console.log(response.data) - } else { - console.error("An error occured while requesting for /language/details/, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/language/details/") -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /language/details/, error: " + r.json()["error"]) -print("Successfully requested for /language/details/") -print(r.json()["data"]) -``` - +| `language` | The language to lookup | Yes | str | ### Response -#### Example Response +#### Example response ```json { @@ -338,14 +211,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors diff --git a/server/docs/sections/Stars.md b/server/docs/sections/Stars.md index 509d5d0..bb99d55 100644 --- a/server/docs/sections/Stars.md +++ b/server/docs/sections/Stars.md @@ -3,7 +3,7 @@ This file lists and explains the different endpoints available in the Stars section. -## > Nasse > Models > Hello +# Stars Get all starred translations @@ -17,45 +17,6 @@ GET /stars Login is **not** required -### Example - - - -#### **cURL** - -```bash -curl -X GET "/stars" -``` - -#### **JavaScript** - -```bash -fetch("/stars", { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /stars") - console.log(response.data) - } else { - console.error("An error occured while requesting for /stars, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/stars") -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /stars, error: " + r.json()["error"]) -print("Successfully requested for /stars") -print(r.json()["data"]) -``` - - #### Possible Errors | Exception | Description | Code | @@ -63,9 +24,9 @@ print(r.json()["data"]) | `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | [Return to the Index](../Getting%20Started.md#index) -## Translation Star +# Translation Star -- ### Using GET + - ### Using GET Get the stars for a translation @@ -73,7 +34,7 @@ Get the stars for a translation GET /stars/ ``` -> [server/endpoints/stars.py](../../server/endpoints/stars.py#L81) +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) #### Authentication @@ -83,11 +44,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `translation_id` | The ID of the translation to get | True | str | +| `translation_id` | The ID of the translation to get | Yes | str | #### Response -##### Example Response +##### Example response ```json { @@ -108,10 +69,10 @@ Login is **not** required | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `source` | The source text | string | False | -| `result` | The result text | string | False | -| `language` | The translation languages | string | False | -| `users` | The number of users who starred the translation | | False | +| `source` | The source text | string | No | +| `result` | The result text | string | No | +| `language` | The translation languages | string | No | +| `users` | The number of users who starred the translation | | No | ##### Possible Errors @@ -122,7 +83,7 @@ Login is **not** required | `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | [Return to the Index](../Getting%20Started.md#index) -- ### Using POST + - ### Using POST Star a translation @@ -130,7 +91,7 @@ Star a translation POST /stars/ ``` -> [server/endpoints/stars.py](../../server/endpoints/stars.py#L81) +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) #### Authentication @@ -140,17 +101,17 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `token` | The token to authenticate the translation | True | TranslationToken | +| `token` | The token to authenticate the translation | Yes | TranslationToken | #### Dynamic URL | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `translation_id` | The ID of the translation to star | True | str | +| `translation_id` | The ID of the translation to star | Yes | str | #### Response -##### Example Response +##### Example response ```json { @@ -171,10 +132,10 @@ Login is **not** required | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `source` | The source text | string | False | -| `result` | The result text | string | False | -| `language` | The translation languages | string | False | -| `users` | The number of users who starred the translation | | False | +| `source` | The source text | string | No | +| `result` | The result text | string | No | +| `language` | The translation languages | string | No | +| `users` | The number of users who starred the translation | | No | ##### Possible Errors @@ -185,7 +146,7 @@ Login is **not** required | `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | [Return to the Index](../Getting%20Started.md#index) -- ### Using DELETE + - ### Using DELETE Unstar a translation @@ -193,7 +154,7 @@ Unstar a translation DELETE /stars/ ``` -> [server/endpoints/stars.py](../../server/endpoints/stars.py#L81) +> [server/endpoints/stars.py](../../server/endpoints/stars.py#L82) #### Authentication @@ -203,7 +164,7 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `translation_id` | The ID of the translation to unstar | True | str | +| `translation_id` | The ID of the translation to unstar | Yes | str | ##### Possible Errors diff --git a/server/docs/sections/Stats.md b/server/docs/sections/Stats.md index f3ae3e1..309bf86 100644 --- a/server/docs/sections/Stats.md +++ b/server/docs/sections/Stats.md @@ -3,7 +3,7 @@ This file lists and explains the different endpoints available in the Stats section. -## Timings Stats +# Timings Stats Get all timings @@ -21,46 +21,7 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `granularity` | The granularity of the stats | False | Granularity | - -### Example - - - -#### **cURL** - -```bash -curl -X GET "/stats/timings" -``` - -#### **JavaScript** - -```bash -fetch("/stats/timings", { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /stats/timings") - console.log(response.data) - } else { - console.error("An error occured while requesting for /stats/timings, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/stats/timings") -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /stats/timings, error: " + r.json()["error"]) -print("Successfully requested for /stats/timings") -print(r.json()["data"]) -``` - +| `granularity` | The granularity of the stats | No | Granularity | #### Possible Errors @@ -69,7 +30,7 @@ print(r.json()["data"]) | `DATABASE_DISABLED` | When the server disabled any database interaction | 501 | [Return to the Index](../Getting%20Started.md#index) -## Erros Stats +# Erros Stats Get all errors count for each service @@ -87,46 +48,7 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `granularity` | The granularity of the stats | False | Granularity | - -### Example - - - -#### **cURL** - -```bash -curl -X GET "/stats/errors" -``` - -#### **JavaScript** - -```bash -fetch("/stats/errors", { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /stats/errors") - console.log(response.data) - } else { - console.error("An error occured while requesting for /stats/errors, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/stats/errors") -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /stats/errors, error: " + r.json()["error"]) -print("Successfully requested for /stats/errors") -print(r.json()["data"]) -``` - +| `granularity` | The granularity of the stats | No | Granularity | #### Possible Errors diff --git a/server/docs/sections/Translation.md b/server/docs/sections/Translation.md index 2c0c7cb..ec59840 100644 --- a/server/docs/sections/Translation.md +++ b/server/docs/sections/Translation.md @@ -3,7 +3,7 @@ This file lists and explains the different endpoints available in the Translation section. -## Translate +# Translate Translates the given text to the given language @@ -15,7 +15,7 @@ This file lists and explains the different endpoints available in the Translatio GET /translate ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L45) +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45) ### Authentication @@ -25,61 +25,15 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "text="\ - --data-urlencode "dest=" \ - "/translate" -``` - -#### **JavaScript** - -```bash -fetch(`/translate?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /translate") - console.log(response.data) - } else { - console.error("An error occured while requesting for /translate, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/translate", - params = { - "text": "The text to translate", - "dest": "The destination language" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /translate, error: " + r.json()["error"]) -print("Successfully requested for /translate") -print(r.json()["data"]) -``` - +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -90,7 +44,6 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -100,10 +53,10 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "destinationLanguage": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -113,7 +66,8 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "result": "こんにちは世界" } @@ -125,11 +79,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -145,7 +99,7 @@ print(r.json()["data"]) | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Translation Stream +# Translation Stream Translates the given text to the given language @@ -167,61 +121,15 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "text="\ - --data-urlencode "dest=" \ - "/stream" -``` - -#### **JavaScript** - -```bash -fetch(`/stream?text=${encodeURIComponent("text")}&dest=${encodeURIComponent("dest")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /stream") - console.log(response.data) - } else { - console.error("An error occured while requesting for /stream, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/stream", - params = { - "text": "The text to translate", - "dest": "The destination language" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /stream, error: " + r.json()["error"]) -print("Successfully requested for /stream") -print(r.json()["data"]) -``` - +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -232,7 +140,6 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -242,10 +149,10 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "destinationLanguage": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -255,7 +162,8 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "result": "こんにちは世界" } @@ -267,11 +175,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -287,7 +195,7 @@ print(r.json()["data"]) | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Translate HTML +# Translate HTML Translates the given HTML string or BeautifulSoup object to the given language @@ -332,7 +240,7 @@ print(r.json()["data"]) GET /html ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L206) +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206) ### Authentication @@ -342,62 +250,16 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `code` | The HTML snippet to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `parser` | The HTML parser to use | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "code="\ - --data-urlencode "dest=" \ - "/html" -``` - -#### **JavaScript** - -```bash -fetch(`/html?code=${encodeURIComponent("code")}&dest=${encodeURIComponent("dest")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /html") - console.log(response.data) - } else { - console.error("An error occured while requesting for /html, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/html", - params = { - "code": "The HTML snippet to translate", - "dest": "The destination language" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /html, error: " + r.json()["error"]) -print("Successfully requested for /html") -print(r.json()["data"]) -``` - +| `code` | The HTML snippet to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `parser` | The HTML parser to use | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -415,7 +277,6 @@ print(r.json()["data"]) "eng" ], "destinationLanguage": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -425,7 +286,8 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "result": "

こんにちは、今日はお元気ですか

大丈夫

" } @@ -437,11 +299,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `services` | The translators used | array | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source languages | array | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `services` | The translators used | array | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source languages | array | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -457,7 +319,7 @@ print(r.json()["data"]) | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Transliterate +# Transliterate Transliterates the given text, get its pronunciation @@ -469,7 +331,7 @@ print(r.json()["data"]) GET /transliterate ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L284) +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284) ### Authentication @@ -479,59 +341,15 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to transliterate | True | str | -| `dest` | The destination language | False | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "text=" \ - "/transliterate" -``` - -#### **JavaScript** - -```bash -fetch(`/transliterate?text=${encodeURIComponent("text")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /transliterate") - console.log(response.data) - } else { - console.error("An error occured while requesting for /transliterate, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/transliterate", - params = { - "text": "The text to transliterate" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /transliterate, error: " + r.json()["error"]) -print("Successfully requested for /transliterate") -print(r.json()["data"]) -``` - +| `text` | The text to transliterate | Yes | str | +| `dest` | The destination language | No | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -542,7 +360,6 @@ print(r.json()["data"]) "service": "Google", "source": "おはよう", "sourceLanguage": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -552,10 +369,10 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "destinationLanguage": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -565,7 +382,8 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "result": "Ohayou" } @@ -577,11 +395,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The transliteration | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The transliteration | str | No | #### Possible Errors @@ -597,7 +415,7 @@ print(r.json()["data"]) | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Spellcheck +# Spellcheck Checks the spelling of a given text @@ -609,7 +427,7 @@ print(r.json()["data"]) GET /spellcheck ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L340) +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340) ### Authentication @@ -619,58 +437,14 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to spellcheck | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "text=" \ - "/spellcheck" -``` - -#### **JavaScript** - -```bash -fetch(`/spellcheck?text=${encodeURIComponent("text")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /spellcheck") - console.log(response.data) - } else { - console.error("An error occured while requesting for /spellcheck, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/spellcheck", - params = { - "text": "The text to spellcheck" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /spellcheck, error: " + r.json()["error"]) -print("Successfully requested for /spellcheck") -print(r.json()["data"]) -``` - +| `text` | The text to spellcheck | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -681,7 +455,6 @@ print(r.json()["data"]) "service": "Google", "source": "God morning", "sourceLang": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -691,7 +464,8 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" }, "result": "Good morning" } @@ -703,10 +477,10 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLang` | The source language | object | False | -| `result` | The spellchecked text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLang` | The source language | object | No | +| `result` | The spellchecked text | str | No | #### Possible Errors @@ -722,7 +496,7 @@ print(r.json()["data"]) | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Language +# Language Returns the language of the given text @@ -734,7 +508,7 @@ print(r.json()["data"]) GET /language ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L394) +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394) ### Authentication @@ -744,57 +518,13 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to get the language of | True | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "text=" \ - "/language" -``` - -#### **JavaScript** - -```bash -fetch(`/language?text=${encodeURIComponent("text")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /language") - console.log(response.data) - } else { - console.error("An error occured while requesting for /language, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/language", - params = { - "text": "The text to get the language of" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /language, error: " + r.json()["error"]) -print("Successfully requested for /language") -print(r.json()["data"]) -``` - +| `text` | The text to get the language of | Yes | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Response -#### Example Response +#### Example response ```json { @@ -805,7 +535,6 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "result": { - "alpha2": "en", "alpha3b": "eng", "alpha3t": "eng", "alpha3": "eng", @@ -815,7 +544,8 @@ print(r.json()["data"]) "scope": "Individual", "type": "Living" }, - "id": "eng" + "id": "eng", + "alpha2": "en" } } } @@ -826,9 +556,9 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `result` | The resulting language alpha-3 code | object | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `result` | The resulting language alpha-3 code | object | No | #### Possible Errors @@ -844,7 +574,7 @@ print(r.json()["data"]) | `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 | [Return to the Index](../Getting%20Started.md#index) -## Text to Speech +# Text to Speech Gives back the text to speech result for the given text @@ -875,7 +605,7 @@ print(r.json()["data"]) GET /tts ``` -> [/opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py](../..//opt/homebrew/lib/python3.9/site-packages/translatepy/server/translation.py#L434) +> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434) ### Authentication @@ -885,55 +615,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to convert to speech | True | str | -| `source` | The source language | False | str | -| `speed` | The speed of the speech | False | int | -| `gender` | The gender of the speech | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | - -### Example - - - -#### **cURL** - -```bash -curl -X GET \ - --data-urlencode "text=" \ - "/tts" -``` - -#### **JavaScript** - -```bash -fetch(`/tts?text=${encodeURIComponent("text")}`, { - method: "GET" -}) -.then((response) => {response.json()}) -.then((response) => { - if (response.success) { - console.info("Successfully requested for /tts") - console.log(response.data) - } else { - console.error("An error occured while requesting for /tts, error: " + response.error) - } -}) -``` - -#### **Python** - -```bash -import requests -r = requests.request("GET", "/tts", - params = { - "text": "The text to convert to speech" - }) -if r.status_code >= 400 or not r.json()["success"]: - raise ValueError("An error occured while requesting for /tts, error: " + r.json()["error"]) -print("Successfully requested for /tts") -print(r.json()["data"]) -``` - +| `text` | The text to convert to speech | Yes | str | +| `source` | The source language | No | str | +| `speed` | The speed of the speech | No | int | +| `gender` | The gender of the speech | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | #### Possible Errors diff --git a/server/endpoints/stars.py b/server/endpoints/stars.py index f8b2f2e..f7ba870 100644 --- a/server/endpoints/stars.py +++ b/server/endpoints/stars.py @@ -48,6 +48,7 @@ def generate_ip_hash(ip: str): @app.route("/stars", endpoint=Endpoint( endpoint=base, + name="Stars", description="Get all starred translations" )) def stars_handler(request: Request): diff --git a/translatepy/server/docs/Getting Started.md b/translatepy/server/docs/Getting Started.md index 8afe75b..167a496 100644 --- a/translatepy/server/docs/Getting Started.md +++ b/translatepy/server/docs/Getting Started.md @@ -101,15 +101,15 @@ 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) +- [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) diff --git a/translatepy/server/docs/postman/Language.postman_collection.utils.json b/translatepy/server/docs/postman/Language.postman_collection.utils.json index 2971e58..361f945 100644 --- a/translatepy/server/docs/postman/Language.postman_collection.utils.json +++ b/translatepy/server/docs/postman/Language.postman_collection.utils.json @@ -1 +1 @@ -{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | False |\n| `alpha2` | The language alpha2 code | str | False |\n| `alpha3b` | The language alpha3b code | str | False |\n| `alpha3t` | The language alpha3t code | str | False |\n| `alpha3` | The language alpha3 code | str | False |\n| `name` | The language name | str | False |\n| `inForeignLanguages` | The language in foreign languages | object | False |\n| `extra` | The language extra data | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file +{"info":{"name":"Language","description":"All of the endpoints under the 'Language' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details?=lang&threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L113)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]},{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Search","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/search?=lang&limit&foreign","host":["{{DOMAIN}}"],"path":["language","search"],"query":[{"key":"lang","value":"","description":"The language to lookup"},{"key":"limit","value":"","description":"The limit of languages to return. (max: 100, default: 10)"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L135)\n\nSearching for a language\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `languages` | The languages found | array | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"languages\": [\n {\n \"string\": \"English\",\n \"similarity\": 100,\n \"language\": {\n \"id\": \"eng\",\n \"similarity\": 100,\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {\n \"af\": \"Engels\",\n \"sq\": \"Anglisht\",\n \"am\": \"እንግሊዝኛ\",\n \"ar\": \"الإنجليزية\",\n \"hy\": \"Անգլերեն\",\n \"...\": \"...\",\n \"zh\": \"英语\",\n \"he\": \"אנגלית\",\n \"jv\": \"Inggris\",\n \"en\": \"English\"\n },\n \"extra\": {\n \"type\": \"Living\",\n \"scope\": \"Individual\"\n }\n }\n }\n ]\n }\n}\n"}]},{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language Details (dynamic)","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language/details/{{language}}?=threshold&foreign","host":["{{DOMAIN}}"],"path":["language","details","{{language}}"],"query":[{"key":"threshold","value":"","description":"The similarity threshold to use when searching for similar languages"},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/language.py](../../translatepy/server/language.py#L184)\n\nRetrieving details about the given language\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `id` | The language id | str | No |\n| `alpha2` | The language alpha2 code | str | No |\n| `alpha3b` | The language alpha3b code | str | No |\n| `alpha3t` | The language alpha3t code | str | No |\n| `alpha3` | The language alpha3 code | str | No |\n| `name` | The language name | str | No |\n| `inForeignLanguages` | The language in foreign languages | object | No |\n| `extra` | The language extra data | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n }\n }\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}} \ No newline at end of file diff --git a/translatepy/server/docs/postman/Translation.postman_collection.utils.json b/translatepy/server/docs/postman/Translation.postman_collection.utils.json index bfbe934..a208c93 100644 --- a/translatepy/server/docs/postman/Translation.postman_collection.utils.json +++ b/translatepy/server/docs/postman/Translation.postman_collection.utils.json @@ -1 +1 @@ -{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source languages | array | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The translated text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLanguage` | The source language | object | False |\n| `destinationLanguage` | The destination language | object | False |\n| `result` | The transliteration | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"destinationLanguage\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `sourceLang` | The source language | object | False |\n| `result` | The spellchecked text | str | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | False |\n| `source` | The source text | str | False |\n| `result` | The resulting language alpha-3 code | object | False |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\",\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file +{"info":{"name":"Translation","description":"All of the endpoints under the 'Translation' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/translate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["translate"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L45)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translation Stream","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stream?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["stream"],"query":[{"key":"text","value":"","description":"The text to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L101)\n\n\n Translates the given text to the given language\n\n i.e Good morning (en) --> おはようございます (ja)\n This endpoint returns a stream of results.\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"こんにちは世界\"\n }\n}\n"}]},{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Translate HTML","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/html?=code&dest&source&parser&translators&foreign","host":["{{DOMAIN}}"],"path":["html"],"query":[{"key":"code","value":"","description":"The HTML snippet to translate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"parser","value":"","description":"The HTML parser to use"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L206)\n\n\n Translates the given HTML string or BeautifulSoup object to the given language\n\n i.e\n English: `

Hello

everyone and welcome to my website
`\n French: `

Bonjour

tout le monde etBienvenueàMon site internet
`\n\n Note: This method is not perfect since it is not tag/context aware. Example: `Hello everyone` will not be understood as\n \"Hello everyone\" with \"everyone\" in bold but rather \"Hello\" and \"everyone\" separately.\n\n Warning: If you give a `bs4.BeautifulSoup`, `bs4.element.PageElement` or `bs4.element.Tag` input (which are mutable), they will be modified.\n If you don't want this behavior, please make sure to pass the string version of the element:\n >>> result = Translate().translate_html(str(page_element), \"French\")\n\n Parameters:\n ----------\n html : str | bs4.element.PageElement | bs4.element.Tag | bs4.BeautifulSoup\n The HTML string to be translated. This can also be an instance of BeautifulSoup's `BeautifulSoup` element, `PageElement` or `Tag` element.\n destination_language : str\n The language the HTML string needs to be translated in.\n source_language : str, default = \"auto\"\n The language of the HTML string.\n parser : str, default = \"html.parser\"\n The parser that BeautifulSoup will use to parse the HTML string.\n threads_limit : int, default = 100\n The maximum number of threads that will be spawned by translate_html\n __internal_replacement_function__ : function, default = None\n This is used internally, especially by the translatepy HTTP server to modify the translation step.\n\n Returns:\n --------\n BeautifulSoup:\n The result will be the same element as the input `html` parameter with the values modified if the given\n input is of bs4.BeautifulSoup, bs4.element.PageElement or bs4.element.Tag instance.\n str:\n The result will be a string in any other case.\n\n \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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `services` | The translators used | array | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source languages | array | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The translated text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"services\": [\n \"Google\",\n \"Bing\"\n ],\n \"source\": \"

Hello, how are you today

Comment allez-vous

\",\n \"sourceLanguage\": [\n \"fra\",\n \"eng\"\n ],\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"

こんにちは、今日はお元気ですか

大丈夫

\"\n }\n}\n"}]},{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Transliterate","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/transliterate?=text&dest&source&translators&foreign","host":["{{DOMAIN}}"],"path":["transliterate"],"query":[{"key":"text","value":"","description":"The text to transliterate"},{"key":"dest","value":"","description":"The destination language"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L284)\n\n\n Transliterates the given text, get its pronunciation\n\n i.e おはよう --> Ohayou\n \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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLanguage` | The source language | object | No |\n| `destinationLanguage` | The destination language | object | No |\n| `result` | The transliteration | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"おはよう\",\n \"sourceLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"destinationLanguage\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Ohayou\"\n }\n}\n"}]},{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Spellcheck","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/spellcheck?=text&source&translators&foreign","host":["{{DOMAIN}}"],"path":["spellcheck"],"query":[{"key":"text","value":"","description":"The text to spellcheck"},{"key":"source","value":"","description":"The source language"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L340)\n\n\n Checks the spelling of a given text\n\n i.e God morning --> Good morning\n \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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `sourceLang` | The source language | object | No |\n| `result` | The spellchecked text | str | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"God morning\",\n \"sourceLang\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n },\n \"result\": \"Good morning\"\n }\n}\n"}]},{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Language","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/language?=text&translators&foreign","host":["{{DOMAIN}}"],"path":["language"],"query":[{"key":"text","value":"","description":"The text to get the language of"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."},{"key":"foreign","value":"","description":"Whether to include the language in foreign languages"}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L394)\n\n\n Returns the language of the given text\n\n i.e 皆さんおはようございます! --> Japanese\n \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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n\n```\n\n#### Returns\n\n| Field | Description | Type | Nullable |\n| ---------- | -------------------------------- | ------ | --------- |\n| `service` | The translator used | str | No |\n| `source` | The source text | str | No |\n| `result` | The resulting language alpha-3 code | object | No |\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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 \"service\": \"Google\",\n \"source\": \"Hello world\",\n \"result\": {\n \"alpha3b\": \"eng\",\n \"alpha3t\": \"eng\",\n \"alpha3\": \"eng\",\n \"name\": \"English\",\n \"inForeignLanguages\": {},\n \"extra\": {\n \"scope\": \"Individual\",\n \"type\": \"Living\"\n },\n \"id\": \"eng\",\n \"alpha2\": \"en\"\n }\n }\n}\n"}]},{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Text to Speech","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/tts?=text&source&speed&gender&translators","host":["{{DOMAIN}}"],"path":["tts"],"query":[{"key":"text","value":"","description":"The text to convert to speech"},{"key":"source","value":"","description":"The source language"},{"key":"speed","value":"","description":"The speed of the speech"},{"key":"gender","value":"","description":"The gender of the speech"},{"key":"translators","value":"","description":"The translator(s) to use. When providing multiple translators, the names should be comma-separated."}]},"description":"\n> [translatepy/server/translation.py](../../translatepy/server/translation.py#L434)\n\n\n Gives back the text to speech result for the given text\n\n Args:\n text: the given text\n source_language: the source language\n\n Returns:\n the mp3 file as bytes\n\n Example:\n >>> from translatepy import Translator\n >>> t = Translator()\n >>> result = t.text_to_speech(\"Hello, how are you?\")\n >>> with open(\"output.mp3\", \"wb\") as output: # open a binary (b) file to write (w)\n ... output.write(result.result)\n # or:\n result.write_to_file(output)\n # Or you can just use write_to_file method:\n >>> result.write_to_file(\"output.mp3\")\n >>> print(\"Output of Text to Speech is available in output.mp3!\")\n\n # the result is an MP3 file with the text to speech output\n \n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `TRANSLATEPY_EXCEPTION` | Generic exception raised when an error occured on translatepy. This is the base class for the other exceptions raised by translatepy. | 500 |\n| `NO_RESULT` | When no result is returned from the translator(s) | 500 |\n| `PARAMETER_ERROR` | When a parameter is missing or invalid | 500 |\n| `PARAMETER_TYPE_ERROR` | When a parameter is of the wrong type | 500 |\n| `PARAMETER_VALUE_ERROR` | When a parameter is of the wrong value | 500 |\n| `TRANSLATION_ERROR` | When a translation error occurs | 500 |\n| `UNKNOWN_LANGUAGE` | When one of the provided language could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\n| `UNKNOWN_TRANSLATOR` | When one of the provided translator/service could not be understood by translatepy. Extra information like the string similarity and the most similar string are provided in `data`. | 400 |\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"}]}} \ No newline at end of file diff --git a/translatepy/server/docs/sections/Language.md b/translatepy/server/docs/sections/Language.md index 7f40bd2..6caf94e 100644 --- a/translatepy/server/docs/sections/Language.md +++ b/translatepy/server/docs/sections/Language.md @@ -21,9 +21,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Yes | str | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -117,14 +117,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors @@ -152,9 +152,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `lang` | The language to lookup | True | str | -| `limit` | The limit of languages to return. (max: 100, default: 10) | False | int | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `lang` | The language to lookup | Yes | str | +| `limit` | The limit of languages to return. (max: 100, default: 10) | No | int | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -268,7 +268,7 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `languages` | The languages found | array | False | +| `languages` | The languages found | array | No | #### Possible Errors @@ -296,14 +296,14 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `threshold` | The similarity threshold to use when searching for similar languages | False | float | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `threshold` | The similarity threshold to use when searching for similar languages | No | float | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Dynamic URL | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `language` | The language to lookup | True | str | +| `language` | The language to lookup | Yes | str | ### Example @@ -392,14 +392,14 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `id` | The language id | str | False | -| `alpha2` | The language alpha2 code | str | False | -| `alpha3b` | The language alpha3b code | str | False | -| `alpha3t` | The language alpha3t code | str | False | -| `alpha3` | The language alpha3 code | str | False | -| `name` | The language name | str | False | -| `inForeignLanguages` | The language in foreign languages | object | False | -| `extra` | The language extra data | object | False | +| `id` | The language id | str | No | +| `alpha2` | The language alpha2 code | str | No | +| `alpha3b` | The language alpha3b code | str | No | +| `alpha3t` | The language alpha3t code | str | No | +| `alpha3` | The language alpha3 code | str | No | +| `name` | The language name | str | No | +| `inForeignLanguages` | The language in foreign languages | object | No | +| `extra` | The language extra data | object | No | #### Possible Errors diff --git a/translatepy/server/docs/sections/Translation.md b/translatepy/server/docs/sections/Translation.md index 8fa88f2..a54ff6a 100644 --- a/translatepy/server/docs/sections/Translation.md +++ b/translatepy/server/docs/sections/Translation.md @@ -25,11 +25,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -108,6 +108,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -115,12 +118,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -128,10 +131,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -143,11 +143,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -185,11 +185,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -268,6 +268,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -275,12 +278,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -288,10 +291,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "こんにちは世界" } @@ -303,11 +303,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -378,12 +378,12 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `code` | The HTML snippet to translate | True | str | -| `dest` | The destination language | True | str | -| `source` | The source language | False | str | -| `parser` | The HTML parser to use | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `code` | The HTML snippet to translate | Yes | str | +| `dest` | The destination language | Yes | str | +| `source` | The source language | No | str | +| `parser` | The HTML parser to use | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -469,6 +469,9 @@ print(r.json()["data"]) "eng" ], "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -476,10 +479,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "

こんにちは、今日はお元気ですか

大丈夫

" } @@ -491,11 +491,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `services` | The translators used | array | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source languages | array | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The translated text | str | False | +| `services` | The translators used | array | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source languages | array | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The translated text | str | No | #### Possible Errors @@ -533,11 +533,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to transliterate | True | str | -| `dest` | The destination language | False | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to transliterate | Yes | str | +| `dest` | The destination language | No | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -614,6 +614,9 @@ print(r.json()["data"]) "service": "Google", "source": "おはよう", "sourceLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -621,12 +624,12 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "destinationLanguage": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -634,10 +637,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Ohayou" } @@ -649,11 +649,11 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLanguage` | The source language | object | False | -| `destinationLanguage` | The destination language | object | False | -| `result` | The transliteration | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLanguage` | The source language | object | No | +| `destinationLanguage` | The destination language | object | No | +| `result` | The transliteration | str | No | #### Possible Errors @@ -691,10 +691,10 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to spellcheck | True | str | -| `source` | The source language | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to spellcheck | Yes | str | +| `source` | The source language | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -771,6 +771,9 @@ print(r.json()["data"]) "service": "Google", "source": "God morning", "sourceLang": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -778,10 +781,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" }, "result": "Good morning" } @@ -793,10 +793,10 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `sourceLang` | The source language | object | False | -| `result` | The spellchecked text | str | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `sourceLang` | The source language | object | No | +| `result` | The spellchecked text | str | No | #### Possible Errors @@ -834,9 +834,9 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to get the language of | True | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | -| `foreign` | Whether to include the language in foreign languages | False | Bool | +| `text` | The text to get the language of | Yes | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | +| `foreign` | Whether to include the language in foreign languages | No | Bool | ### Example @@ -913,6 +913,9 @@ print(r.json()["data"]) "service": "Google", "source": "Hello world", "result": { + "alpha3b": "eng", + "alpha3t": "eng", + "alpha3": "eng", "name": "English", "inForeignLanguages": {}, "extra": { @@ -920,10 +923,7 @@ print(r.json()["data"]) "type": "Living" }, "id": "eng", - "alpha2": "en", - "alpha3b": "eng", - "alpha3t": "eng", - "alpha3": "eng" + "alpha2": "en" } } } @@ -934,9 +934,9 @@ print(r.json()["data"]) | Field | Description | Type | Nullable | | ---------- | -------------------------------- | ------ | --------- | -| `service` | The translator used | str | False | -| `source` | The source text | str | False | -| `result` | The resulting language alpha-3 code | object | False | +| `service` | The translator used | str | No | +| `source` | The source text | str | No | +| `result` | The resulting language alpha-3 code | object | No | #### Possible Errors @@ -993,11 +993,11 @@ Login is **not** required | Name | Description | Required | Type | | ------------ | -------------------------------- | ---------------- | ---------------- | -| `text` | The text to convert to speech | True | str | -| `source` | The source language | False | str | -| `speed` | The speed of the speech | False | int | -| `gender` | The gender of the speech | False | str | -| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | False | TranslatorList | +| `text` | The text to convert to speech | Yes | str | +| `source` | The source language | No | str | +| `speed` | The speed of the speech | No | int | +| `gender` | The gender of the speech | No | str | +| `translators` | The translator(s) to use. When providing multiple translators, the names should be comma-separated. | No | TranslatorList | ### Example