ZeevG / python-forecast.io

A thin Python Wrapper for the Dark Sky (formerly forecast.io) weather API
http://zeevgilovitz.com/python-forecast.io/
Other
424 stars 88 forks source link

Flags Object #64

Open kqi914 opened 5 years ago

kqi914 commented 5 years ago

What is the correct way to create a Flag Object so that I can then proceed to gather the following data:

nearest-station required The distance to the nearest weather station that contributed data to this response. Note, however, that many other stations may have also been used; this value is primarily for debugging purposes. This property's value is in miles (if US units are selected) or kilometers (if SI units are selected). sources required This property contains an array of IDs for each data source utilized in servicing this request. units required Indicates the units which were used for the data in this request.

I have been successful at creating DataPoint Objects, DataBlock Objects, and Alerts Arrays; but so far I have been unable to create a flag object. I cant find any documentation as to how to properly create one, I have been trying this:

forecast = forecastio.load_forecast(api_key, lat, lng)
ws = forecast.flags()

but it yields:

AttributeError: 'Forecast' object has no attribute 'flags'

I need it to find out from what weather station is being used.

Thanks!!!