wunderground

package
v0.0.0-...-37de074 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2018 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

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 (*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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL