from flask import Flask
from flask_caching import Cache

import main


app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})

@app.route('/')
def display_available():
    content = ('<html>' +
               '<head>' +
               '<title>Restaurant Menu Parser</title>' +
               '</head>' +
               '<body>' +
               '<p><a href="ki">Campus Solna (KI)</a></p>' +
               '<p><a href="uu">Campus Uppsala (BMC)</a></p>' +
               '</body>' +
               '</html>')
    return content

@app.route('/api/restaurants')
@cache.cached(timeout=3600)
def api_list_restaurants():
    return main.list_restaurants()

@app.route('/ki')
@cache.cached(timeout=3600)
def make_menu_ki():
    return main.gen_ki_menu()

@app.route('/uu')
@cache.cached(timeout=3600)
def make_menu_uu():
    return main.gen_uu_menu()

@@ -139,16 +139,17 @@
 ple'%7D)%0A%0A
+%0A
 @app.rou
@@ -541,16 +541,17 @@
 ontent%0A%0A
+%0A
 @app.rou
@@ -661,24 +661,211 @@
 taurants()%0A%0A
+%0A@app.route('/api/restaurant/%3Cname%3E')%0A@cache.cached(timeout=3600)%0Adef api_get_restaurant(name):%0A    data = main.get_restaurant(name)%0A    if not data:%0A        abort(404)%0A    return data%0A%0A%0A
 @app.route('
@@ -914,24 +914,24 @@
 _menu_ki():%0A
-
     return m
@@ -949,16 +949,17 @@
 menu()%0A%0A
+%0A
 @app.rou

Add request handler for specific restaurant.