Commit 8a2eaabf authored by thibaut-felten's avatar thibaut-felten

Doc

parent 5d763bdc
......@@ -11,7 +11,7 @@
### Précisions importantes
Afin de pouvoir aborder la majeure partie des fonctionnalités demandées pour le projet, nous avons décidé de remplacer le mahjong par un shifumi.
Cela nous a permis de gagner un temps important et de pouvoir mettre en place les parties privées et publiques, de faire plus attention à la partie login...
Cela nous a permis de gagner un temps important et de pouvoir mettre en place les parties privées et publiques, de faire plus attention à la partie login, d'écrire une documentation qui nous paraît propre...
De notre point de vue, réaliser un jeu de mahjong nous aurait demandé au moins 3 jours de travail supplémentaires ce qui ne pouvait pas être possible au vu du calendrier serré que demandait l'UV.
......
......@@ -4,11 +4,45 @@
Open endpoints require no Authentication.
### User
* [Show data of a user](/user/get_user.md) : `GET /api.php/user/{id}`
* [Create a new user](/user/post_user.md) : `POST /api.php/user/`
* [Delete a user](/user/delete_user.md) : `DELETE /api.php/user/{id}` Should be a closed endpoint.
### Users
* [Get all users data](/users/get_users.md) : `GET /api.php/users/`
### Login
* [Login](login.md) : `POST /api/login/`
* [Get all users data](get_users.md) : `GET /api.php/users/`
* [Show data of a user](get_user.md) : `GET /api.php/user/{id}`
* [Create a new user](post_user.md) : `POST /api.php/user/`
* [Delete a user](delete_user.md) : `DELETE /api.php/user/{id}` Should be a closed endpoint.
### Game
* [Retrieve game data](/game/get_game.md) : `GET /api.php/game/{id}`
* [Delete one game](/game/get_game.md) : `DELETE /api.php/game/{id}`
* [Create a game](/game/get_game.md) : `POST /api.php/game/{id}`
### GameUser
* [Retrieve all users in one game](/gameUser/get_gameuser_game.md) : `GET /api.php/gameuser/game/{game.id}`
* [Retrieve the information of all games for one user](/gameUser/get_gameuser_user.md) : `GET /api.php/gameuser/user/{user.id}`
* [Add a user in a game](/gameUser/post_gameuser.md) : `POST /api.php/gameuser`
* [Delete a user in a game](/gameUser/delete_gameuser.md) : `DELETE /api.php/gameuser`
### Online
* [Get a public game id](/online/get_online.md) : `GET /api.php/online/{user.id}`
* [Add a user in the queue for public game](/online/post_online.md) : `POST /api.php/online/{user.id}`
* [Delete someone from the queue fo public game](/online/delete_online.md) : `DELETE /api.php/online/{user.id}`
### Result
* [Get the result of a round](/result/get_result.md) : `GET /api.php/result/{game.id}`
* [Store the result of a round](/result/post_result.md) : `POST /api.php/result/{game.id}`
* [Delete the result of a round](/result/delete_result.md) : `DELETE /api.php/result`
## Endpoints that require Authentication
......
......@@ -6,7 +6,7 @@ Used to delete a user in a game.
**Method** : `DELETE`
**Auth required** : NOT FOR THE MOMENT BUT WORKING ON IT
**Auth required** : NO
**Data constraints**
......
# POST Gameuser
Used to add a user in a gme.
Used to add a user in a game.
**URL** : `/api.php/gameuser`
**Method** : `POST`
**Auth required** : NOT FOR THE MOMENT BUT WORKING ON IT
**Auth required** : NO
**Data constraints**
......
......@@ -6,7 +6,7 @@ Used to delete a online user.
**Method** : `DELETE`
**Auth required** : NOT FOR THE MOMENT BUT WORKING ON IT
**Auth required** : NO
## Success Response
......
# GET Online
RETURN GAME ID FOR THE USER OR NOTHING IN CASE OF NO ASSIGMENT
Get a public game id
**URL** : `/api.php/online/{user.id}`
**Method** : `GET`
**Auth required** : NOT FOR THE MOMENT BUT WORKING ON IT
**Auth required** : No
## Success Response
......
# POST Online
Used to add a online user.
Used to add a online user to a public game.
**URL** : `/api.php/online/{user.id}`
**Method** : `POST`
**Auth required** : NOT FOR THE MOMENT BUT WORKING ON IT
**Auth required** : NO
## Success Response
......
# GET Result
Used to delete a round result.
Used to get a round result.
**URL** : `/api.php/result/{game.id}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment