This API serves the lunch of some restaurants / canteens placed in Oststadt in Karlsruhe.
Take a look at mensa-moltke.js or zwiebel.js and write your own script crawling the lunch of your favorite place.
There are only four things your file should export:
- A
name
, preferable the one of the restaurant (it has to be unique!) - A
website
URL of the restaurant - The
latitude and longitude
as object like this:{ lat: 49.004956, lng: 8.425534 }
- A
get()
function returning the lunch as string
Done!
/getAll
Serves a JSON object with all restaurants and their dishes.
/get?restaurants=Mensa,MRI-Casino,...
Serves a JSON object containing all restaurants and their dishes which are set in the PATH-Param.
/restaurants
Serves a list of supported restaurants as Objects with properties name and website.
/menu
Serve all from /getAll but as html
We use this API to load the daily lunch for our Slack-Lunchbot.
Try it out!