Add entity ident comments

This commit is contained in:
David Eder 2021-06-18 12:09:49 +02:00
parent dfca25e2e0
commit 0ccaa27e7e

View File

@ -42,6 +42,9 @@ mongo.db.cars.update_one({"vin": "5GZCZ43D13S812716"}, {"$set": {"startingTime":
@app.route('/api/v1/resources/cars', methods=['GET']) @app.route('/api/v1/resources/cars', methods=['GET'])
def get_cars(): def get_cars():
"""
Get all cars stored in entity ident database or filter by vin.
"""
query_parameters = request.args query_parameters = request.args
vin = query_parameters.get('vin') vin = query_parameters.get('vin')
@ -55,6 +58,10 @@ def get_cars():
@app.route('/api/v1/resources/traffic_lights', methods=['GET']) @app.route('/api/v1/resources/traffic_lights', methods=['GET'])
def get_traffic_lights(): def get_traffic_lights():
"""
Get all traffic lights stored in entity ident database or filter by id.
"""
query_parameters = request.args query_parameters = request.args
tl_id = query_parameters.get('id') tl_id = query_parameters.get('id')
@ -69,6 +76,10 @@ def get_traffic_lights():
@app.route('/api/v1/resources/traffic_lights_geo', methods=['GET']) @app.route('/api/v1/resources/traffic_lights_geo', methods=['GET'])
def get_traffic_lights_geo(): def get_traffic_lights_geo():
"""
Get traffic light which is in range and south of coordinates (lat, lon).
"""
query_parameters = request.args query_parameters = request.args
lat = float(query_parameters.get('lat')) lat = float(query_parameters.get('lat'))