1
0
Fork 0
freesewing/markdown/dev/reference/backend/recipes/en.md

79 lines
1.2 KiB
Markdown
Raw Normal View History

2021-10-17 17:34:55 +02:00
***
## title: Recipes
## Create Recipe
2021-10-17 17:34:55 +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
}
},
'pattern': 'aaron',
'model': 'dvqye'
}
2021-10-17 17:34:55 +02:00
}
On success:
2021-10-17 17:34:55 +02:00
200
{
'handle': 'abxda'
}
On failure:
2021-10-17 17:34:55 +02:00
400
Creates a recipe and returns its data.
## Read recipe
2021-10-17 17:34:55 +02:00
GET /recipes/:handle
On success: The recipe data
On failure:
2021-10-17 17:34:55 +02:00
400
Loads a recipe's data
## Update recipe
2021-10-17 17:34:55 +02:00
PUT /recipes/:handle
{
'notes': "5 stars, would make again"
}
Updates the recipe and returns the (updated) recipe data.
## Remove recipe
2021-10-17 17:34:55 +02:00
DELETE /recipes/:handle
On success:
2021-10-17 17:34:55 +02:00
200
On failure:
2021-10-17 17:34:55 +02:00
400
Removes the recipe