Skip to content

Commit

Permalink
[update] fixing typos in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Jun 28, 2022
1 parent d887610 commit 3b24a9f
Show file tree
Hide file tree
Showing 31 changed files with 381 additions and 381 deletions.
14 changes: 7 additions & 7 deletions docs/English/API Documentation/Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ Globally, JSON responses should be formatted as follows (even when critical erro

| Field | Description | Nullable |
| ------------ | ------------------------------------------------ | ---------------- |
| `success` | Wether the request was a success or not | False |
| `success` | Whether the request was a success or not | False |
| `message` | A message describing what happened | True |
| `error` | The exception name if an error occured | True |
| `error` | The exception name if an error occurred | True |
| `data` | The extra data, information asked in the request | False |

### Errors

Multiple Errors can occur, server side or request side.

Specific errors are documented in each endpoint but these are the general errors that can occur on any endpoint:
Specific errors are documented in each endpoint, but these are the general errors that can occur on any endpoint:

| Exception | Description | Code |
| --------------------------- | --------------------------------------------------------------------------------------------------------------- | ----- |
Expand All @@ -43,15 +43,15 @@ Specific errors are documented in each endpoint but these are the general errors
| `MISSING_DYNAMIC` | When a dynamic routing value is missing from the requested URL | 400 |
| `MISSING_HEADER` | When a header is missing from the request | 400 |
| `MISSING_COOKIE` | When a cookie is missing from the request | 400 |
| `AUTH_ERROR` | When an error occured while authenticating the request | 403 |
| `AUTH_ERROR` | When an error occurred while authenticating the request | 403 |

### Authenticated Requests

When a user needs to be logged in, the "Authorization" header needs to be set to the login token provided when logging in.

Alternatively, the "translatepy_token" parameter and "__translatepy_token" cookie can be used but these won't be prioritized.
Alternatively, the "translatepy_token" parameter and "__translatepy_token" cookie can be used, but these won't be prioritized.

If the endpoint is flagged for a "verified only" login, the account won't be fetched from any database but the token will be checked.
If the endpoint is flagged for a "verified only" login, the account won't be fetched from any database, but the token will be checked.

### Debug Mode

Expand Down Expand Up @@ -110,7 +110,7 @@ The "call_stack" attribute is enabled only when an error occurs or the `call_sta
- [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)
- [Errors Stats](./Sections/Stats.md#errors-stats)
- [Translation](./Sections/Translation.md#translation)
- [Translate](./Sections/Translation.md#translate)
- [Translation Stream](./Sections/Translation.md#translation-stream)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":{"name":"Stats","description":"All of the endpoints under the 'Stats' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Timings Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/timings?=granularity","host":["{{DOMAIN}}"],"path":["stats","timings"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Timings Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/timings?=granularity","host":["{{DOMAIN}}"],"path":["stats","timings"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]},{"name":"Erros Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/errors?=granularity","host":["{{DOMAIN}}"],"path":["stats","errors"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28)\n\nGet all errors count for each service\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Erros Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/errors?=granularity","host":["{{DOMAIN}}"],"path":["stats","errors"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28)\n\nGet all errors count for each service\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}}
{"info":{"name":"Stats","description":"All of the endpoints under the 'Stats' section of the translatepy API Interface","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Timings Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/timings?=granularity","host":["{{DOMAIN}}"],"path":["stats","timings"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Timings Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/timings?=granularity","host":["{{DOMAIN}}"],"path":["stats","timings"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L17)\n\nGet all timings\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]},{"name":"Errors Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/errors?=granularity","host":["{{DOMAIN}}"],"path":["stats","errors"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28)\n\nGet all errors count for each service\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)","auth":{"type":"noauth"}},"response":[{"name":"Errors Stats","event":[],"request":{"method":"GET","header":[],"url":{"raw":"{{DOMAIN}}/stats/errors?=granularity","host":["{{DOMAIN}}"],"path":["stats","errors"],"query":[{"key":"granularity","value":"<granularity:Granularity>","description":"The granularity of the stats"}]},"description":"\n> [server/endpoints/stats.py](../../server/endpoints/stats.py#L28)\n\nGet all errors count for each service\n\n\n### Authentication\n\nLogin is **not** required\n\n#### Possible Errors\n\n| Exception | Description | Code |\n| --------------- | -------------------------------- | ------ |\n| `DATABASE_DISABLED` | When the server disabled any database interaction | 501 |\n[Return to the Index](../Getting%20Started.md#index)"},"response":[],"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"body":"{\n \"success\": true,\n \"message\": \"Successfully processed your request\",\n \"error\": null,\n \"data\": {}\n}\n"}]}],"auth":{"type":"apikey","apikey":[{"key":"value","value":"{{TRANSLATEPY_TOKEN}}","type":"string"},{"key":"key","value":"Authorization","type":"string"}]}}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/English/API Documentation/sections/Stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,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
# Errors Stats

Get all errors count for each service

Expand Down
84 changes: 42 additions & 42 deletions docs/English/API Documentation/sections/Translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,30 +108,30 @@ print(r.json()["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": {
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English",
"name": "English"
},
"destinationLanguage": {
"inForeignLanguages": {},
"extra": {
"scope": "Individual",
"type": "Living"
},
"id": "eng",
"alpha2": "en"
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English"
},
"result": "こんにちは世界"
}
Expand Down Expand Up @@ -268,30 +268,30 @@ print(r.json()["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": {
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English",
"name": "English"
},
"destinationLanguage": {
"inForeignLanguages": {},
"extra": {
"scope": "Individual",
"type": "Living"
},
"id": "eng",
"alpha2": "en"
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English"
},
"result": "こんにちは世界"
}
Expand Down Expand Up @@ -469,17 +469,17 @@ print(r.json()["data"])
"eng"
],
"destinationLanguage": {
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English",
"inForeignLanguages": {},
"extra": {
"scope": "Individual",
"type": "Living"
},
"id": "eng",
"alpha2": "en"
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English"
},
"result": "<div><p>こんにちは、今日はお元気ですか</p><p>大丈夫</p></div>"
}
Expand Down Expand Up @@ -614,30 +614,30 @@ print(r.json()["data"])
"service": "Google",
"source": "おはよう",
"sourceLanguage": {
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English",
"inForeignLanguages": {},
"extra": {
"scope": "Individual",
"type": "Living"
},
"id": "eng",
"alpha2": "en"
},
"destinationLanguage": {
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English",
"name": "English"
},
"destinationLanguage": {
"inForeignLanguages": {},
"extra": {
"scope": "Individual",
"type": "Living"
},
"id": "eng",
"alpha2": "en"
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English"
},
"result": "Ohayou"
}
Expand Down Expand Up @@ -771,17 +771,17 @@ print(r.json()["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"
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English"
},
"result": "Good morning"
}
Expand Down Expand Up @@ -913,17 +913,17 @@ print(r.json()["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"
"alpha2": "en",
"alpha3b": "eng",
"alpha3t": "eng",
"alpha3": "eng",
"name": "English"
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions docs/English/CLI Usage/Server Documentation/Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ Globally, JSON responses should be formatted as follows (even when critical erro

| Field | Description | Nullable |
| ------------ | ------------------------------------------------ | ---------------- |
| `success` | Wether the request was a success or not | False |
| `success` | Whether the request was a success or not | False |
| `message` | A message describing what happened | True |
| `error` | The exception name if an error occured | True |
| `error` | The exception name if an error occurred | True |
| `data` | The extra data, information asked in the request | False |

### Errors

Multiple Errors can occur, server side or request side.

Specific errors are documented in each endpoint but these are the general errors that can occur on any endpoint:
Specific errors are documented in each endpoint, but these are the general errors that can occur on any endpoint:

| Exception | Description | Code |
| --------------------------- | --------------------------------------------------------------------------------------------------------------- | ----- |
Expand All @@ -43,15 +43,15 @@ Specific errors are documented in each endpoint but these are the general errors
| `MISSING_DYNAMIC` | When a dynamic routing value is missing from the requested URL | 400 |
| `MISSING_HEADER` | When a header is missing from the request | 400 |
| `MISSING_COOKIE` | When a cookie is missing from the request | 400 |
| `AUTH_ERROR` | When an error occured while authenticating the request | 403 |
| `AUTH_ERROR` | When an error occurred while authenticating the request | 403 |

### Authenticated Requests

When a user needs to be logged in, the "Authorization" header needs to be set to the login token provided when logging in.

Alternatively, the "translatepy_token" parameter and "__translatepy_token" cookie can be used but these won't be prioritized.
Alternatively, the "translatepy_token" parameter and "__translatepy_token" cookie can be used, but these won't be prioritized.

If the endpoint is flagged for a "verified only" login, the account won't be fetched from any database but the token will be checked.
If the endpoint is flagged for a "verified only" login, the account won't be fetched from any database, but the token will be checked.

### Debug Mode

Expand Down
Loading

1 comment on commit 3b24a9f

@vercel
Copy link

@vercel vercel bot commented on 3b24a9f Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.