https://github.com/morgandbs/javaapi
School project
https://github.com/morgandbs/javaapi
Last synced: over 1 year ago
JSON representation
School project
- Host: GitHub
- URL: https://github.com/morgandbs/javaapi
- Owner: MorganDbs
- Created: 2018-02-04T17:59:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-27T13:25:08.000Z (about 8 years ago)
- Last Synced: 2025-01-22T00:25:32.730Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 34.6 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JavaAPI
# Contributors
- Dubois Morgan
https://github.com/MorganDbs/JavaAPI
# Swagger
```
url-of-your-server/apiee
```
# Template request
``` bash
# Request (PUT)
/commandes/{id}/livraison?token={token}
# Description
Change les informations de livraison d'une commande à partir du JSON fourni
# Body
"livraison":{
"date": "15-2-2018",
"heure": "4:45"
}
```
``` bash
# Request (PUT)
/commandes/{id}/payer?token={token}
# Description
Change l'état d'une commande à 'payer'
# Body
{
"numero": "4641 1517 4230 3736",
"date": "05-19",
"cvv": "445"
}
```
``` bash
# Request (PUT)
/commandes/{id}/etat?token={token}
# Description
Change l'état d'une commande en fonction du JSON fourni
# Body
{
"etat": "attente"
}
```
``` bash
# Request (POST)
/commandes?token={token}
# Description
Crée une commande à partir du JSON fourni
# Body
{
"nom_client": "qsd",
"prenom_client": "jl",
"mail_client": "qq@mail.fr",
"livraison":{
"date": "20-3-2019",
"heure": "23:59"
}
}
```
``` bash
# Request (POST)
/commandes/{id}/sandwichs?token={token}
# Description
Ajoute un sandwich à une commande à partir du JSON fourni
# Body
{
"sandwich": "ab-fuga",
"quantity": "4",
"taille": "complet"
}
```
``` bash
# Request (PUT)
/commandes/{id}/sandwichs?token={token}
# Descrption
Modifie un sandwich d'une commande à partir du JSON fourni
# Body
{
"id": "834f81fb-2234-4118-ac8f-183704b981ef",
"quantity": "8",
"taille": "complet"
}
```
``` bash
# Request (DELETE)
/commandes/{id}/sandwichs?token={token}
# Description
Supprime le sandwich d'une commande dont l'ID est fourni et le JSON est fourni
# Body
{
"sandwich": "ab-fuga",
"taille": "complet"
}
```