diff --git a/engine.py b/engine.py index 3c4dcdf..0f811d9 100755 --- a/engine.py +++ b/engine.py @@ -7,8 +7,11 @@ BRANDS: dict[str, str] = { "greggs": "[\"brand:wikidata\"=\"Q3403981\"]", } +EncodedLocation = list[float, list[float]] + def fetch_data(brand: str) -> list[tuple[float | None, float | None]]: + """Fetch a list of locations from OSM.""" api = overpy.Overpass() filters = BRANDS[brand] @@ -29,7 +32,22 @@ def fetch_data(brand: str) -> list[tuple[float | None, float | None]]: return result +def encode(location: tuple[float, float]) -> EncodedLocation: + """Encode a location.""" + + # Stub + return [] + + +def decode(location: EncodedLocation) -> tuple[float, float]: + """Decode into a location.""" + + # Stub + return (0.091659, 52.210796) + + def main(): + """Testing.""" print("Running query...") greggs = fetch_data("greggs") print(f"Query done - got {len(greggs)} Greggs!")