git clone https://github.com/Rijenth/ColocAppcd ColocApp && docker-compose up -d --build
| Nom de famille | Prénom | Github |
|---|---|---|
| VIDEAU | Ethan | @Setsudan |
| HA | Adrien | @JinSu77 |
| ARUMAINATHAN | Rijenth | @Rijenth |
| LEVENEUR | Louis | @LFLeveeur |
| PIVERT | Fabrice | @Fabpiv |
| BAKAYOKO | Kader | @gaoubak |
-
Testing Endpoint
- Endpoint :
/- Method: GET
- Status code: 200 OK
- Data: None
- Response: {"message"}
- Endpoint :
-
Authentication
-
Register
- Endpoint :
/api/auth/register - Method: POST
- Status code: 200 (OK) || 422 (UNPROCESSABLE ENTITY)
- Data: { uid: str, firstName: str, lastName: str, email: str, password: str, gender: str, phone: str, birthdate: str, picture: str, income: int }
- Response: {"type", "token"}
- Endpoint :
-
Login
- Endpoint :
/api/auth/login - Method: POST
- Status code: 200 (OK) || 422 (UNPROCESSABLE ENTITY)
- Data: { email: str, password: str }
- Response: {"type", "token"}
- Endpoint :
-
-
Colocation
-
Get All Colocations
- Endpoint :
/api/colocation - Method: GET
- Status code: 200 (OK)
- Data: None
- Response: {...[colocation]}
- Endpoint :
-
Get Colocation by ID
- Endpoint :
/api/colocation/<string:id> - Method: GET
- Status code: 200 (OK) || 404 (NOT FOUND)
- Data: { uid: str }
- Response: {[colocation]}
- Endpoint :
-
Create Colocation
- Endpoint :
/api/colocation - Method: POST
- Status code: 201 (CREATED) || 422 (UNPROCESSABLE ENTITY)
- Data: { name: str, rentDue: int, rentPaid: int }
- Response: {"message"}
- Endpoint :
-
Update Colocation
- Endpoint :
/api/colocation/<string:id> - Method: PUT
- Status code: 201 (CREATED)) || 422 (UNPROCESSABLE ENTITY)
- Data: { name: str, rentDue: int, rentPaid: int }
- Response: {"message"}
- Endpoint :
-
Delete Colocation
- Endpoint :
/api/colocation/<string:id> - Method: DELETE
- Status code: 204 (NO CONTENT)
- Data: None
- Response: None
- Endpoint :
-
-
Expense
-
Get All Expenses
- Endpoint :
/api/expense - Method: GET
- Status code: 200 (OK)
- Data: None
- Response: {...[Expense]}
- Endpoint :
-
Get all Expenses for colocation by Colocation ID
- Endpoint :
/api/expense/colocation/<string:id> - Method: GET
- Status code: 200 (OK) || 422 (UNPROCESSABLE ENTITY)
- Data: None
- Response: {[Expense]}
- Endpoint :
-
Get all Expenses for a colocation by UID
- Endpoint :
/api/expense/user/<string:uid> - Method: GET
- Status code: 200 (OK) || 422 (UNPROCESSABLE ENTITY)
- Data: None
- Response: {[Expense]}
- Endpoint :
-
Create Expense
- Endpoint :
/api/expense - Method: POST
- Status code: 201 (CREATED)) || 422 (UNPROCESSABLE ENTITY)
- Data: { amount: int, colocataireId: int, paidFor: enumerate(['loyer', 'electricite', 'eau', 'nourriture', 'autre']), description: str, colocation.id: int }
- Response: {"message"}
- Endpoint :
-
Update Expense
- Endpoint :
/api/expense/<string:id> - Method: PUT
- Status code: 204 (NO CONTENT)) || 422 (UNPROCESSABLE ENTITY)
- Data: None
- Response: None
- Endpoint :
-
Delete Expense
- Endpoint :
/api/expense/<string:id> - Method: DELETE
- Status code: 204 (NO CONTENT)
- Data: None
- Response: None
- Endpoint :
-
-
Colocataire
-
Get All Colocataires
- Endpoint :
/api/colocataire - Method: GET
- Status code: 200 (OK)
- Data: None
- Response: {...[colocataire]}
- Endpoint :
-
Get Colocataire by User ID
- Endpoint :
/api/colocataire/user/<string:id> - Method: GET
- Status code: 200 (OK) || 422 (UNPROCESSABLE ENTITY)
- Data: None
- Response: {...[colocataire]}
- Endpoint :
-
Get Colocataire by Colocation ID
- Endpoint :
/api/colocataire/colocation/<string:id> - Method: GET
- Status code: 200 (OK) || 422 (UNPROCESSABLE ENTITY)
- Data: None
- Response: {[colocataire]}
- Endpoint :
-
Create Colocataire
- Endpoint :
/api/colocataire - Method: POST
- Status code: 201 (CREATED) || 422 (UNPROCESSABLE ENTITY)
- Data: {
userId: int,
colocationId: int
} - Response: {"message"}
- Endpoint :
-
Update Colocataire
- Endpoint :
/api/colocataire/<string:id> - Method: PUT
- Status code: 201 (CREATED)
- Endpoint :
-
Delete Colocataire
- Endpoint :
/api/colocataire/<string:id> - Method: DELETE
- Status code: 204 (NO CONTENT)
- Data: None
- Response: None
- Endpoint :
-
Update Colocataire
- Endpoint :
/api/Colocataire/<string:id> - Method: PUT
- Status code: 201 (CREATED)) || 422 (UNPROCESSABLE ENTITY)
- Data: None
- Response: {"message"}
- Endpoint :
-
-
Users
-
Get All Users
- Endpoint :
/api/users - Method: GET
- Status code: 200 (OK)
- Data: None
- Response: {...[User]}
- Endpoint :
-
Get User by UID
- Endpoint :
/api/users/<string:uid> - Method: GET
- Status code: 200 (OK) || 404 (NOT FOUND)
- Data: None
- Response: {[User]}
- Endpoint :
-
Update User
- Endpoint :
/api/users/<string:uid> - Method: PUT
- Status code: 201 (CREATED)) || 422 (UNPROCESSABLE ENTITY)
- Data: { firstName: str, lastName: str, email: str, password: str, gender: str, phone: str, birthdate: str, picture: str, income: int }
- Response: {[User]}
- Endpoint :
-
Delete User
- Endpoint :
/api/users/<int:uid> - Method: DELETE
- Status code: 204 (NO CONTENT)
- Data: None
- Response: None
- Endpoint :
-