Skip to content

Commit

Permalink
Add information url (#8)
Browse files Browse the repository at this point in the history
* Add parking information url

* Forgot to remove print
  • Loading branch information
klaasnicolaas authored Jul 13, 2022
1 parent 73c86c2 commit 6c3e812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion hamburg/hamburg.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ async def park_and_ride(
"p_und_r/collections/p_und_r/items",
params={"limit": limit, "bulk": bulk},
)
print(locations)
for item in locations["features"]:
results.append(ParkAndRide.from_json(item))
return results
Expand Down
2 changes: 2 additions & 0 deletions hamburg/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class ParkAndRide:
occupancy_percentage: float
disabled_parking_spaces: int
tickets: dict[str, int]
url: str
longitude: float
latitude: float
updated_at: datetime
Expand Down Expand Up @@ -101,6 +102,7 @@ def from_json(cls, data: dict[str, Any]) -> ParkAndRide:
"month": attr.get("ticket_30_tage"),
"year": attr.get("ticket_1_jahr"),
},
url=attr.get("homepage"),
longitude=geo[0],
latitude=geo[1],
updated_at=datetime.strptime(
Expand Down

0 comments on commit 6c3e812

Please sign in to comment.