Skip to content

Commit 7aabff8

Browse files
Add name to Forecast
1 parent 7e1dd82 commit 7aabff8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/datapoint/Forecast.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ def __init__(self, frequency, api_data):
118118
self.distance_from_requested_location = api_data["features"][0]["properties"][
119119
"requestPointDistance"
120120
]
121+
self.name = api_data["features"][0]["properties"]["location"]["name"]
122+
121123
# N.B. Elevation is in metres above or below the WGS 84 reference
122124
# ellipsoid as per GeoJSON spec.
123125
self.elevation = api_data["features"][0]["geometry"]["coordinates"][2]

0 commit comments

Comments
 (0)