From af1c2301a9424af29fe35a9e7ceb6274b771bcf4 Mon Sep 17 00:00:00 2001 From: mmaurostoffel <166130318+mmaurostoffel@users.noreply.github.com> Date: Sun, 12 Jan 2025 20:38:16 +0100 Subject: [PATCH] Added Enpoint for movAvg --- etl/src/api/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etl/src/api/main.py b/etl/src/api/main.py index 5f737a0..60eec87 100644 --- a/etl/src/api/main.py +++ b/etl/src/api/main.py @@ -82,3 +82,12 @@ def region_capacities_data(id_1: int, id_2: int): capacities = etl_rcc.region_capacities_comparison(id_1, id_2) return capacities +@app.get("/region/{id}/movingAverage/{startDate}") +def region_capacities_data(id: int, startDate: str): + result = etl_rmA.region_movingAverage(id, startDate) + return result + +@app.get("/region/{id}/properties/capacities") +def region_property_capacities_data(id: int): + capacities = etl_rpc.region_properties_capacities(id) + return capacities