Skip to content

Commit

Permalink
add missing radius variable to update function (#7)
Browse files Browse the repository at this point in the history
* update tests

* fix test

* fix test round 2

* add missing radius variable to update function
  • Loading branch information
firstof9 authored Sep 8, 2021
1 parent c130f93 commit 9caee90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions openeihttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}&sector=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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9caee90

Please sign in to comment.