Menu API - mini/git-brunching GitHub Wiki
/menu/{menuID}
Method: GET
Description: This method is used to get a menu object
| Parameters | Format |
|---|---|
| menuID | Integer |
Response
example request URL: https://localhost:5001/api/menu/1
STATUS CODE: 200
{
"id": 1,
"url": "img.jpg",
"restaurantID": 2,
"height": "500",
"width": "600",
},
/menu/restaurant/{restaurantID}
Method: GET
Description: This method is used to get all the menus for a restaurant
Response
example request URL: https://localhost:5001/menu/restaurant/1
STATUS CODE: 200 OK
[{
"id": 1,
"url": "img.jpg",
"restaurantID": 2,
"height": "500",
"width": "600",
},
{
"id": 2,
"url": "img2.jpg",
"restaurantID": 2,
"height": "500",
"width": "600",
},}]
/api/menu
Method: POST
Description: This method is used to add a new menu for a restaurant
Body Input
| Parameters | Format |
|---|---|
| url | String |
| restaurantID | Integer |
| height | String |
| width | Integer |
Request Body example
{
"id": 2,
"url": "img2.jpg",
"restaurantID": 2,
"height": "500",
"width": "600",
},
Response
example request URL: https://localhost:5001/menu
STATUS CODE: 200 OK
{
"added"
},
/api/menu/{menuID}
Method: DELETE
Description: This method is used to delete a menu object
Input
Path Parameters
| Parameters | Format |
|---|---|
| menuID | Integer |
Response
example request URL: https://localhost:5001/api/menu/1
STATUS CODE: 200 OK
{
"deleted"
},