diff --git a/garagesamsterdam/__init__.py b/garagesamsterdam/__init__.py index baaa0b9..0849043 100644 --- a/garagesamsterdam/__init__.py +++ b/garagesamsterdam/__init__.py @@ -11,12 +11,12 @@ class AmsterdamCase: NAME = "Garages Amsterdam" id: str - garageName: str + garage_name: str state: str - freeSpaceShort: int - freeSpaceLong: int - shortCapacity: int - longCapacity: int + free_space_short: int + free_space_long: int + short_capacity: int + long_capacity: int @staticmethod def from_json(item): @@ -24,17 +24,17 @@ def from_json(item): id = item return AmsterdamCase( id=id["Id"], - garageName=correctName(attrs["Name"]), + garage_name=correct_name(attrs["Name"]), state=attrs["State"], - freeSpaceShort=attrs["FreeSpaceShort"], - freeSpaceLong=attrs["FreeSpaceLong"], - shortCapacity=attrs["ShortCapacity"], - longCapacity=attrs["LongCapacity"], + free_space_short=attrs["FreeSpaceShort"], + free_space_long=attrs["FreeSpaceLong"], + short_capacity=attrs["ShortCapacity"], + long_capacity=attrs["LongCapacity"], ) DEFAULT_SOURCE = AmsterdamCase -def correctName(name): +def correct_name(name): """Change parking garage name for consistency if needed.""" filter = ["CE-","ZD-","ZO-","ZU-"] corrections = ["P1 ", "P3 "] diff --git a/setup.py b/setup.py index fdaf540..89cb140 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,6 @@ def read(*parts): name="garagesamsterdam", packages=find_packages(include=["garagesamsterdam"]), url="https://github.com/klaasnicolaas/garagesamsterdam", - version="1.0.1", + version="1.0.2", zip_safe=False, ) \ No newline at end of file