Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Darksky ¶
type Darksky struct {
// contains filtered or unexported fields
}
Darksky forecasts weather based on darksky APIs. https://darksky.net/
func NewDarksky ¶
NewDarksky creates new instance of darksky APIs
func (Darksky) ForecastRequest ¶
func (d Darksky) ForecastRequest(latt float64, long float64) (ForecastResponse, error)
ForecastRequest returns the current weather conditions, a minute-by-minute forecast for the next hour (where available), an hour-by-hour forecast for the next 48 hours, and a day-by-day forecast for the next week.
type ForecastData ¶
type ForecastData struct { Time int64 `json:"time"` Summary string `json:"summary"` Icon string `json:"icon"` SunriseTime int64 `json:"sunriseTime"` SunsetTime int64 `json:"sunsetTime"` MoonPhase float64 `json:"moonPhase"` Temperature float64 `json:"temperature"` TemperatureLow float64 `json:"temperatureLow"` TemperatureLowTime int64 `json:"temperatureLowTime"` TemperatureHigh float64 `json:"temperatureHigh"` TemperatureHighTime int64 `json:"temperatureHighTime"` Humidity float64 `json:"humidity"` WindBearing float64 `json:"windBearing"` WindSpeed float64 `json:"windSpeed"` }
ForecastData represents dark sky forecast data.
type ForecastResponse ¶
type ForecastResponse struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Timezone string `json:"timezone"` Currently ForecastData `json:"currently"` Daily struct { Summery string `json:"summery"` Icon string `json:"icon"` Data []ForecastData `json:"data"` } `json:"daily"` }
ForecastResponse represents dark sky forecast response that contains ForecastData in its fields.
Click to show internal directories.
Click to hide internal directories.