2023-01-23 05:34:13 +01:00
|
|
|
# Dokumentation
|
|
|
|
|
|
|
|
Eine auflistung von allen Funktionen und API-Endpunkten mit Erklärung.
|
|
|
|
|
|
|
|
- User
|
|
|
|
- Einkaufsliste
|
|
|
|
- Zutaten
|
|
|
|
- Einheiten
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## User
|
|
|
|
|
|
|
|
### User erstellen
|
|
|
|
```shell
|
2023-01-25 08:02:59 +01:00
|
|
|
POST 127.0.0.1/DirektiveDesDons/signup
|
2023-01-23 05:34:13 +01:00
|
|
|
|
|
|
|
BODY
|
|
|
|
{
|
|
|
|
"username": "Benutzername",
|
2023-01-25 08:02:59 +01:00
|
|
|
"email": "email",
|
|
|
|
"password": "Passwort"
|
2023-01-23 05:34:13 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Aktueller User ausgeben
|
|
|
|
```shell
|
|
|
|
GET 127.0.0.1/DirektiveDesDons/user
|
|
|
|
```
|
|
|
|
|
|
|
|
### Login
|
|
|
|
```shell
|
|
|
|
POST 127.0.0.1/DirektiveDesDons/login
|
|
|
|
|
|
|
|
BODY
|
|
|
|
{
|
|
|
|
"username": "Benutzername",
|
|
|
|
"password": "Passwort"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## Einkaufsliste
|
|
|
|
|
|
|
|
### Einkaufsliste erstellen
|
|
|
|
```shell
|
2023-01-24 09:01:42 +01:00
|
|
|
POST 127.0.0.1/DirektiveDesDons/list
|
2023-01-23 05:34:13 +01:00
|
|
|
|
|
|
|
BODY
|
|
|
|
{
|
2023-01-25 08:02:59 +01:00
|
|
|
"name": "Einkaufsliste 1",
|
|
|
|
"backgoundColor": "#123"
|
2023-01-23 05:34:13 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Einkauslisten ausgeben
|
|
|
|
```shell
|
2023-01-24 09:01:42 +01:00
|
|
|
GET 127.0.0.1/DirektiveDesDons/list
|
2023-01-23 05:34:13 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Einkaufsliste ausgeben
|
|
|
|
```shell
|
2023-01-24 09:01:42 +01:00
|
|
|
GET 127.0.0.1/DirektiveDesDons/list/1
|
|
|
|
```
|
|
|
|
|
|
|
|
### Einkaufsliste löschen
|
|
|
|
```shell
|
|
|
|
DELETE 127.0.0.1/DirektiveDesDons/list/1
|
2023-01-23 05:34:13 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Zutat zu Einkaufsliste hinzufügen
|
|
|
|
```shell
|
2023-01-24 09:01:42 +01:00
|
|
|
POST 127.0.0.1/DirektiveDesDons/list/1
|
2023-01-23 05:34:13 +01:00
|
|
|
|
|
|
|
BODY
|
|
|
|
{
|
2023-01-24 08:47:05 +01:00
|
|
|
"ingredientId": 1
|
2023-01-23 05:34:13 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-01-24 09:01:42 +01:00
|
|
|
### Zutat von Liste löschen
|
|
|
|
```shell
|
|
|
|
DELETE 127.0.0.1/DirektiveDesDons/list/1/4
|
|
|
|
```
|
|
|
|
|
2023-01-23 05:34:13 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
## Zutaten
|
|
|
|
|
|
|
|
### Zutaten erstellen
|
|
|
|
```shell
|
|
|
|
POST 127.0.0.1/DirektiveDesDons/ingredient
|
|
|
|
|
|
|
|
BODY
|
|
|
|
{
|
|
|
|
"name": "Nüsse",
|
|
|
|
"calories": "123",
|
|
|
|
"quantity": "5",
|
|
|
|
"unit": "st",
|
|
|
|
"price": "12.5"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Zutaten ausgeben
|
|
|
|
```shell
|
|
|
|
GET 127.0.0.1/DirektiveDesDons/ingredient
|
|
|
|
```
|
|
|
|
|
|
|
|
### Zutat ausgeben
|
|
|
|
```shell
|
|
|
|
GET 127.0.0.1/DirektiveDesDons/ingredient/1
|
|
|
|
```
|
|
|
|
|
2023-01-24 09:01:42 +01:00
|
|
|
### Zutat löschen
|
|
|
|
```shell
|
|
|
|
DELETE 127.0.0.1/DirektiveDesDons/ingredient/1
|
|
|
|
```
|
|
|
|
|
2023-01-25 08:02:59 +01:00
|
|
|
### Zutat ändern
|
|
|
|
```shell
|
|
|
|
POST 127.0.0.1/DirektiveDesDons/ingredient/3
|
|
|
|
|
|
|
|
BODY
|
|
|
|
{
|
|
|
|
"name": "Nüsse",
|
|
|
|
"calories": "123",
|
|
|
|
"quantity": "5",
|
|
|
|
"unit": "st",
|
|
|
|
"price": "13.5"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-01-23 05:34:13 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
## MengenEinheiten
|
|
|
|
|
|
|
|
### Einheiten auflisten
|
|
|
|
```shell
|
|
|
|
GET 127.0.0.1/DirektiveDesDons/unit
|
|
|
|
```
|
2023-01-24 09:01:42 +01:00
|
|
|
|
2023-01-23 05:34:13 +01:00
|
|
|
### Einheit Erstellen
|
|
|
|
```shell
|
|
|
|
POST 127.0.0.1/DirektiveDesDons/unit
|
|
|
|
|
|
|
|
BODY
|
|
|
|
{
|
|
|
|
"name": "lbs"
|
|
|
|
}
|
2023-01-24 09:01:42 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Einheit löschen
|
|
|
|
```shell
|
|
|
|
DELETE 127.0.0.1/DirektiveDesDons/unit/4
|
2023-01-23 05:34:13 +01:00
|
|
|
```
|