Documentation
¶
Overview ¶
Package weatherapi provides a client for the WeatherAPI.com API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCurrent ¶
type QueryOption ¶
type QueryOption func(*query)
func WithAutoIP ¶
func WithAutoIP() QueryOption
func WithCity ¶
func WithCity(city string) QueryOption
func WithUSZip ¶
func WithUSZip(zip string) QueryOption
type Weather ¶
type Weather struct {
LastUpdatedEpoch int `json:"last_updated_epoch"`
LastUpdated string `json:"last_updated"`
TempC float64 `json:"temp_c"`
TempF float64 `json:"temp_f"`
IsDay int `json:"is_day"`
Condition Condition `json:"condition"`
WindMPH float64 `json:"wind_mph"`
WindKPH float64 `json:"wind_kph"`
WindDegree int `json:"wind_degree"`
WindDir string `json:"wind_dir"`
PressureMB float64 `json:"pressure_mb"`
PressureIN float64 `json:"pressure_in"`
PrecipMM float64 `json:"precip_mm"`
PrecipIN float64 `json:"precip_in"`
Humidity int `json:"humidity"`
Cloud int `json:"cloud"`
FeelslikeC float64 `json:"feelslike_c"`
FeelslikeF float64 `json:"feelslike_f"`
WindchillC float64 `json:"windchill_c"`
WindchillF float64 `json:"windchill_f"`
HeatindexC float64 `json:"heatindex_c"`
HeatindexF float64 `json:"heatindex_f"`
DewpointC float64 `json:"dewpoint_c"`
DewpointF float64 `json:"dewpoint_f"`
VisKM float64 `json:"vis_km"`
VisMiles float64 `json:"vis_miles"`
UV float64 `json:"uv"`
GustMPH float64 `json:"gust_mph"`
GustKPH float64 `json:"gust_kph"`
}
Click to show internal directories.
Click to hide internal directories.