allieIsOkay / allieIsOkay/quantified-self-api
Add meal show endpoint
- 主要言語
- JavaScript
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
As a user,
I should be able to request the information for a specific meal in the system by submitting a GET request to the endpoint '/api/v1/meals/:meal_id/foods' where :meal_id is the ID of a meal in the system.
A valid response should carry a 200 status code and be formatted as follows:
```
{
"id": 1,
"name": "Breakfast",
"foods": [
{
"id": 1,
"name": "Banana",
"calories": 150
},
{
"id": 6,
"name": "Yogurt",
"calories": 550
},
{
"id": 12,
"name": "Apple",
"calories": 220
}
]
}
```
In the event that an invalid meal id is provided, the response should carry a 404 status, and indicate that the meal was not found:
```
{
"error": "Meal not found"
}
```
- [x] Tested
- [x] Documented
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。