Documentation ¶
Index ¶
- Variables
- type WundergroundApiClient
- func (api *WundergroundApiClient) CachedForecast() (WundergroundForecast, error)
- func (api WundergroundApiClient) Endpoint() string
- func (backend *WundergroundApiClient) GetForecastDay(_ context.Context, request *pb.GetForecastDayRequest) (*pb.ForecastDayInfo, error)
- func (backend *WundergroundApiClient) GetForecastWeek(_ context.Context, _ *pb.GetForecastWeekRequest) (*pb.ForecastWeekInfo, error)
- func (api *WundergroundApiClient) WundergroundForecast() (WundergroundForecast, error)
- type WundergroundForecast
Constants ¶
This section is empty.
Variables ¶
View Source
var DaysOfTheWeek = map[string]pb.DayOfWeek{ "Monday": pb.DayOfWeek_Mon, "Tuesday": pb.DayOfWeek_Tue, "Wednesday": pb.DayOfWeek_Wed, "Thursday": pb.DayOfWeek_Thu, "Friday": pb.DayOfWeek_Fri, "Saturday": pb.DayOfWeek_Sat, "Sunday": pb.DayOfWeek_Sun, }
Functions ¶
This section is empty.
Types ¶
type WundergroundApiClient ¶
type WundergroundApiClient struct {
ApiKeyId string
}
func NewApiClient ¶
func NewApiClient(wundergroundApiKeyId string) (*WundergroundApiClient, error)
func (*WundergroundApiClient) CachedForecast ¶
func (api *WundergroundApiClient) CachedForecast() (WundergroundForecast, error)
func (WundergroundApiClient) Endpoint ¶
func (api WundergroundApiClient) Endpoint() string
func (*WundergroundApiClient) GetForecastDay ¶
func (backend *WundergroundApiClient) GetForecastDay(_ context.Context, request *pb.GetForecastDayRequest) (*pb.ForecastDayInfo, error)
func (*WundergroundApiClient) GetForecastWeek ¶
func (backend *WundergroundApiClient) GetForecastWeek(_ context.Context, _ *pb.GetForecastWeekRequest) (*pb.ForecastWeekInfo, error)
func (*WundergroundApiClient) WundergroundForecast ¶
func (api *WundergroundApiClient) WundergroundForecast() (WundergroundForecast, error)
type WundergroundForecast ¶
type WundergroundForecast struct { Forecast struct { Simple struct { Days []struct { Date struct { Weekday string `json:"weekday"` } `json:"date"` High struct { Fahrenheit string `json:"fahrenheit"` Celsius string `json:"celsius"` } `json:"high"` Low struct { Fahrenheit string `json:"fahrenheit"` Celsius string `json:"celsius"` } `json:"low"` Conditions string `json:"conditions"` } `json:"forecastday"` } `json:"simpleforecast"` } `json:"forecast"` }
Click to show internal directories.
Click to hide internal directories.