add and implement cotality_client

This commit is contained in:
Daniel Roth 2026-03-23 10:29:42 +00:00
parent b8c0c9ea65
commit cd514b6e5d

View file

@ -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")