This repository was archived by the owner on May 8, 2020. It is now read-only.
forked from SE701ProjectGroup4/git-brunching
-
Notifications
You must be signed in to change notification settings - Fork 0
Menu API
Hong edited this page Apr 28, 2020
·
1 revision
Method: GET
Description: This method is used to get a menu object
Parameters | Format |
---|---|
menuID | Integer |
example request URL: https://localhost:5001/api/menu/1
STATUS CODE: 200
{
"id": 1,
"url": "img.jpg",
"restaurantID": 2,
"height": "500",
"width": "600",
},
Method: GET
Description: This method is used to get all the menus for a restaurant
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",
},}]
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",
},
example request URL: https://localhost:5001/menu
STATUS CODE: 200 OK
{
"added"
},
Method: DELETE
Description: This method is used to delete a menu object
Path Parameters
Parameters | Format |
---|---|
menuID | Integer |
example request URL: https://localhost:5001/api/menu/1
STATUS CODE: 200 OK
{
"deleted"
},