summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nws/nws.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/nws/nws.go b/nws/nws.go
index 8fec6ed..42317ac 100644
--- a/nws/nws.go
+++ b/nws/nws.go
@@ -80,6 +80,15 @@ func (e Error) Error() string {
return fmt.Sprintf("%d: %s: %s", e.Status, e.Type, e.Detail)
}
+func CacheWeather(lat, lng float32) {
+ p, err := Points(lat, lng)
+ if err != nil {
+ return
+ }
+ GetForecast(p)
+ GetForecastHourly(p)
+}
+
// NWS `/points` endpoint.
//
// TODO: return Error instead of error