From cd514b6e5d630e4a9a665eee54b8a3994067c061 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 23 Mar 2026 10:29:42 +0000 Subject: [PATCH] add and implement cotality_client --- backend/pashub_fetcher/handler/handler.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/pashub_fetcher/handler/handler.py b/backend/pashub_fetcher/handler/handler.py index 11f457a6..a9288783 100644 --- a/backend/pashub_fetcher/handler/handler.py +++ b/backend/pashub_fetcher/handler/handler.py @@ -1,5 +1,6 @@ -from typing import Any, Mapping +from typing import Any, List, Mapping +from backend.pashub_fetcher.cotality_client import CotalityClient from backend.pashub_fetcher.token_getter import get_token_from_local_storage from utils.logger import setup_logger @@ -17,3 +18,9 @@ def handler(event: Mapping[str, Any], context: Any) -> None: except: logger.error("Error getting auth token from Pas Hub") raise + + client = CotalityClient(token=token) + uprn = "100061885568" # TODO: get from request body + + saved_files: List[str] = client.get_evidence_files(uprn=uprn) + print(f"saved {len(saved_files)} files")