diff --git a/app/routes/account.py b/app/routes/account.py index ae4780a..cafb537 100644 --- a/app/routes/account.py +++ b/app/routes/account.py @@ -1,4 +1,4 @@ -from flask import url_for, redirect, render_template +from flask import url_for, redirect, render_template, request from flask_security import login_required from flask_security.core import current_user from sqlalchemy.exc import IntegrityError @@ -129,3 +129,20 @@ def delete_account(): return render_template('deleteAccountForm.html', form=form) + +@app.route('/filling_stations', methods=['GET']) +#@login_required +def query_filling_stations(): + api_key = app.config['TANKERKOENIG_API_KEY'] + lat = request.args.get('latitude') + lon = request.args.get('longitude') + rad = request.args.get('radius', default=10) + type = request.args.get('type', default='all') + sort = request.args.get('sort', default='price') + return lat + +@app.route('/filling_stations/', methods=['GET']) +#@login_required +def query_filling_station_details(fsid): + api_key = app.config['TANKERKOENIG_API_KEY'] + return fsid diff --git a/config.py b/config.py index fd66ba5..9149abf 100644 --- a/config.py +++ b/config.py @@ -18,6 +18,7 @@ class Config: MAIL_USERNAME = os.environ.get('MAIL_USERNAME') MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') ADMIN_MAIL = 'joachim@lusiardi.de' + TANKERKOENIG_API_KEY = os.environ.get('TANKERKOENIG_API_KEY') @staticmethod def init_app(app):