start implementing a proxy layer for the API of creativecommons.tankerkoenig.de
This commit is contained in:
		
							parent
							
								
									af6f271b29
								
							
						
					
					
						commit
						47e81c7517
					
				| @ -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/<fsid>', methods=['GET']) | ||||
| #@login_required | ||||
| def query_filling_station_details(fsid): | ||||
|     api_key = app.config['TANKERKOENIG_API_KEY'] | ||||
|     return fsid | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user