-
Notifications
You must be signed in to change notification settings - Fork 0
REST End Points
Rachit Garg edited this page Jan 9, 2016
·
11 revisions
GET /api/v1/menus - Returns all the menus and their details(populated with example data) :
[
{
"id" : 1,
"chef_id" : 1,
"name" : "Mughlai Cuisine - Chef Tabrez",
"max_capacity" : 16,
"min_capacity" : 4,
"menu_items" : [{
"id" : 1,
"menu_id" : 1,
"menu_items_category_id" : 1,
"name" : "Shikampur Kebabs"
},
{
"id" : 2,
"menu_id" : 1,
"menu_items_category_id" : 2,
"name" : "Mutton Dum Fusion Biryani"
},
{
"id" : 3,
"menu_id" : 1,
"menu_items_category_id" : 3,
"name" : "Shahi Sheer Kurma"
}]
},
{
"id" : 2,
"chef_id" : 2,
"name" : "Chocolaty Bites By Sher E Diwan",
"max_capacity" : 20,
"min_capacity" : 4,
"menu_items" : [{
"id" : 4,
"menu_id" : 2,
"menu_items_category_id" : 4,
"name" : "Molded white chocolate with Nutella filling"
},
{
"id" : 5,
"menu_id" : 2,
"menu_items_category_id" : 4,
"name" : "Molded milk chocolate with caramel filling"
},
{
"id" : 6,
"menu_id" : 2,
"menu_items_category_id" : 4,
"name" : "Molded dark chocolate with mint"
},
{
"id" : 7,
"menu_id" : 2,
"menu_items_category_id" : 4,
"name" : "Covered dark chocolate with marzipan & bounty"
}]
}
]
GET /api/v1/menus/menu_id/{menu_id} - Returns the menus with {menu_id} along with it's details(populated with example data) :
{
"id" : 1,
"chef_id" : 1,
"name" : "Mughlai Cuisine - Chef Tabrez",
"max_capacity" : 16,
"min_capacity" : 4,
"menu_items" : [{
"id" : 1,
"menu_id" : 1,
"menu_items_category_id" : 1,
"name" : "Shikampur Kebabs"
},
{
"id" : 2,
"menu_id" : 1,
"menu_items_category_id" : 2,
"name" : "Mutton Dum Fusion Biryani"
},
{
"id" : 3,
"menu_id" : 1,
"menu_items_category_id" : 3,
"name" : "Shahi Sheer Kurma"
}]
}
GET /api/v1/chefs - Returns all the chefs(populated with example data) :
{
"chefs" : [{
"id" : 1,
"name" : "Chef Tabrez",
"email" : "[email protected]",
"rating" : 4.2,
"address" : "Pearl Nacre Apartments, Boopasandra, Bangalore - Karnataka"
},
{
"id" : 2,
"name" : "Chef Sher",
"email" : "[email protected]",
"rating" : 4.6,
"address" : "Near Indiranagar Metro station, Bangalore - Karnataka"
}]
}
GET /api/v1/chefs/chef_id/{chef_id} - Returns the chefs bearing the {chef_id} along with his menus(populated with example data) :
{
"id" : 1,
"name" : "Chef Tabrez",
"email" : "[email protected]",
"rating" : 4.2,
"address" : "Pearl Nacre Apartments, Boopasandra, Bangalore - Karnataka"
"menus" : [{
"id" : 1,
"chef_id" : 2,
"name" : "Mughlai Cuisine - Chef Tabrez",
"max_capacity" : 16,
"min_capacity" : 4,
"menu_items" : [{
"id" : 1,
"menu_id" : 1,
"menu_items_category_id" : 1,
"name" : "Shikampur Kebabs"
},
{
"id" : 2,
"menu_id" : 1,
"menu_items_category_id" : 2,
"name" : "Mutton Dum Fusion Biryani"
},
{
"id" : 3,
"menu_id" : 1,
"menu_items_category_id" : 3,
"name" : "Shahi Sheer Kurma"
}]
}]
}