mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
add and implement cotality_client
This commit is contained in:
parent
b8c0c9ea65
commit
cd514b6e5d
1 changed files with 8 additions and 1 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue