From 9caee903a3c89d7a68b37a6eacd4ecbd6c1acb31 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 7 Sep 2021 18:46:45 -0700 Subject: [PATCH] add missing radius variable to update function (#7) * update tests * fix test * fix test round 2 * add missing radius variable to update function --- openeihttp/__init__.py | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openeihttp/__init__.py b/openeihttp/__init__.py index 5ab640d..76067a1 100644 --- a/openeihttp/__init__.py +++ b/openeihttp/__init__.py @@ -76,6 +76,8 @@ def update(self) -> None: url = f"{BASE_URL}version=latest&format=json" url = f"{url}&api_key={self._api}&lat={self._lat}&lon={self._lon}" url = f"{url}§or=Residential&detail=full&getpage={self._plan}" + if self._radius is not None: + url = f"{url}&radius={self._radius}" result = requests.get(url) if result.status_code == 404: diff --git a/setup.py b/setup.py index c3daebb..0650abe 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ PROJECT_DIR = Path(__file__).parent.resolve() README_FILE = PROJECT_DIR / "README.md" -VERSION = "0.1.6" +VERSION = "0.1.7" setup(