2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: Recipes
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
## Create Recipe
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
POST /recipes
|
|
|
|
{
|
|
|
|
'name': 'The recipe name',
|
|
|
|
'notes': 'Some notes',
|
|
|
|
'recipe': {
|
|
|
|
'settings': {
|
|
|
|
'sa': 10,
|
|
|
|
'complete': true,
|
|
|
|
'paperless': false,
|
|
|
|
'units': 'metric',
|
|
|
|
'measurements': {
|
|
|
|
'bicepsCircumference': 335,
|
|
|
|
'centerBackNeckToWaist': 520,
|
|
|
|
'chestCircumference': 1080,
|
|
|
|
'"naturalWaistToHip': 145,
|
|
|
|
'neckCircumference': 420,
|
|
|
|
'shoulderSlope': 55,
|
|
|
|
'shoulderToShoulder': 465,
|
|
|
|
'hipsCircumference': 990
|
2021-08-25 16:09:31 +02:00
|
|
|
}
|
2021-10-17 18:26:00 +02:00
|
|
|
},
|
|
|
|
'pattern': 'aaron',
|
|
|
|
'model': 'dvqye'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
On success:
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
200
|
|
|
|
{
|
|
|
|
'handle': 'abxda'
|
|
|
|
}
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
On failure:
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
400
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
Creates a recipe and returns its data.
|
|
|
|
|
|
|
|
## Read recipe
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
GET /recipes/:handle
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
On success: The recipe data
|
|
|
|
On failure:
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
400
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
Loads a recipe's data
|
|
|
|
|
|
|
|
## Update recipe
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
PUT /recipes/:handle
|
|
|
|
{
|
|
|
|
'notes': "5 stars, would make again"
|
|
|
|
}
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
Updates the recipe and returns the (updated) recipe data.
|
|
|
|
|
|
|
|
## Remove recipe
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
DELETE /recipes/:handle
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
On success:
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
200
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
On failure:
|
2021-10-17 18:26:00 +02:00
|
|
|
```
|
|
|
|
400
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
Removes the recipe
|