-
Notifications
You must be signed in to change notification settings - Fork 0
Sprint 3
Dylan Havelock edited this page Mar 16, 2020
·
7 revisions
edit date & time of meal entry
query meal entries by macronutrients
Remove an existing user// Request
{
"email:" "user.to.delete@aol.com"
}
// Response
{
"message": "User user.to.delete@aol.com is deleted"
}// Request
{
"meal": 76,
"fooditem": 724
}
// Response
{
"meal": {
"id": 76,
"fooditems": [
{
"id": 723,
"name": "Apple",
"protein": 1,
"carb": 19,
"fat": 0,
"user": 1332
},
{
"id": 724,
"name": "Avocado",
"protein": 3,
"carb": 4,
"fat": 21,
"user": 1332
}
],
"name": "fruits",
"protein": 4,
"carb": 23,
"fat": 21,
"user": 1332
}
}
//request
{
"fooditems": [724] // or could do something like [723, 724]
}
// response
{
"meals": [
{
"id": 76,
"fooditems": [
{
"id": 723,
"name": "Apple",
"protein": 1,
"carb": 19,
"fat": 0,
"user": 1332
},
{
"id": 724,
"name": "Avocado",
"protein": 3,
"carb": 4,
"fat": 21,
"user": 1332
}
],
"name": "fruits",
"protein": 4,
"carb": 23,
"fat": 21,
"user": 1332
},
{
"id": 78,
"fooditems": [
{
"id": 724,
"name": "Avocado",
"protein": 3,
"carb": 4,
"fat": 21,
"user": 1332
}
],
"name": "keto",
"protein": 3,
"carb": 4,
"fat": 21,
"user": 1332
}
]
}
// request
{
fat_low: 12, ... // each of these params is optional and defaults to 0 or MAX_VALUE
fat_high
carb_low
carb_high
protein_low
protein_high
}
// response
{
list of meals, same as query by fooditem
}
// request
{
"meal_entry": 9,
"timestamp": "2020-01-06T21:49:23.699442Z"
}
// response
{
"mealentry": {
"id": 9,
"timestamp": "2020-01-06T21:49:23.699442Z",
"user": 1332,
"meal": 76
}
}
// request
{
// same as query meal by macro
"carb_low": 20
...
carb_high
fat_low
fat_high
protein_low
protein_high
}
// response
{
"mealentries": [
{
"id": 9,
"timestamp": "2020-01-06T21:49:23.699442Z",
"user": 1332,
"meal": 76
},
{
"id": 10,
"timestamp": "2020-03-16T21:51:06.799247Z",
"user": 1332,
"meal": 76
}
]
}