Docs - add 'fr' translation + fixes

This commit is contained in:
Sam
2023-06-18 20:45:39 +02:00
parent bf1e12f35d
commit 4491b8f8de
69 changed files with 3783 additions and 3385 deletions

View File

@@ -185,13 +185,13 @@ def get_workouts_by_time(
**Example requests**:
- without parameters
- without parameters:
.. sourcecode:: http
GET /api/stats/admin/by_time HTTP/1.1
- with parameters
- with parameters:
.. sourcecode:: http
@@ -200,7 +200,7 @@ def get_workouts_by_time(
**Example responses**:
- success
- success:
.. sourcecode:: http
@@ -243,7 +243,7 @@ def get_workouts_by_time(
"status": "success"
}
- no workouts
- no workouts:
.. sourcecode:: http
@@ -270,13 +270,12 @@ def get_workouts_by_time(
:reqheader Authorization: OAuth 2.0 Bearer Token
:statuscode 200: success
:statuscode 200: ``success``
:statuscode 401:
- provide a valid auth token
- signature expired, please log in again
- invalid token, please log in again
:statuscode 404:
- user does not exist
- ``provide a valid auth token``
- ``signature expired, please log in again``
- ``invalid token, please log in again``
:statuscode 404: ``user does not exist``
"""
return get_workouts(user_name, 'by_time')
@@ -294,13 +293,13 @@ def get_workouts_by_sport(
**Example requests**:
- without parameters (get stats for all sports with workouts)
- without parameters (get stats for all sports with workouts):
.. sourcecode:: http
GET /api/stats/admin/by_sport HTTP/1.1
- with sport id
- with sport id:
.. sourcecode:: http
@@ -308,7 +307,7 @@ def get_workouts_by_sport(
**Example responses**:
- success
- success:
.. sourcecode:: http
@@ -347,7 +346,7 @@ def get_workouts_by_sport(
"status": "success"
}
- no workouts
- no workouts:
.. sourcecode:: http
@@ -367,14 +366,14 @@ def get_workouts_by_sport(
:reqheader Authorization: OAuth 2.0 Bearer Token
:statuscode 200: success
:statuscode 200: ``success``
:statuscode 401:
- provide a valid auth token
- signature expired, please log in again
- invalid token, please log in again
- ``provide a valid auth token``
- ``signature expired, please log in again``
- ``invalid token, please log in again``
:statuscode 404:
- user does not exist
- sport does not exist
- ``user does not exist``
- ``sport does not exist``
"""
return get_workouts(user_name, 'by_sport')
@@ -414,12 +413,12 @@ def get_application_stats(auth_user: User) -> Dict:
:reqheader Authorization: OAuth 2.0 Bearer Token
:statuscode 200: success
:statuscode 200: ``success``
:statuscode 401:
- provide a valid auth token
- signature expired, please log in again
- invalid token, please log in again
:statuscode 403: you do not have permissions
- ``provide a valid auth token``
- ``signature expired, please log in again``
- ``invalid token, please log in again``
:statuscode 403: ``you do not have permissions``
"""
nb_workouts = Workout.query.filter().count()