Skip to content

Latest commit

 

History

History
79 lines (46 loc) · 1.86 KB

README.md

File metadata and controls

79 lines (46 loc) · 1.86 KB

This is the hackhealth image

This is the HackHealth2019 repo of Jason, Ajay, Gaurav and Sam.

©2019 All rights reserved.

Link to our discord Home /menu /sort /search

/menu /sort /search

API Reference

Get Started

/menu

This is the main endpoint for the application. All queries related to the whole menu goes here.
  • -/api/menu/all

  • Returns all menu items in a list

  • -/api/menu/reset

  • Sets the temporary menu to the full menu

  • -/api/menu/update

  • Updates the menu

/sort

This it the endpoint for all queries relating to sorting based on the parameters specified.
  • -/api/sort/all/price

  • Updates the list and sorts all of the menu items

  • -api/sort/all/{field}

  • {field} can be of the following:

  • calories

  • carbs

  • protein

  • fat

  • saturated fat

  • sugar

  • name

  • price

  • -api/sort/lessthanequalto/{field}/int:amount

  • {field} can be the same as -/api/sort/all. The menu items are sorted and only the items less than the amount specified are returned.

  • -api/sort/greaterthan/{field}/int:amount

  • {field} can be the same as -/api/sort/all. The menu items are sorted and only the items greater than the amount specified are returned

/search

This is the endpoint for all queries relating to searching based on the parameters specified.
  • -/api/search/name/{name}

  • Filter by {name} of a menu item

  • -/api/search/location/{location}

  • Filter by {location}

  • -/api/search/mealtype/{mealtype}

  • Filter by {mealtype}, valid replacements are: {"Breakfast", "Lunch", "Dinner"}