diff options
author | siddharth ravikumar <s@ricketyspace.net> | 2022-06-07 01:05:31 -0400 |
---|---|---|
committer | siddharth ravikumar <s@ricketyspace.net> | 2022-06-07 01:05:41 -0400 |
commit | 55fc4b89102c9c19dc8d0ee59bc92ea58ce287c8 (patch) | |
tree | 23621f5c3e0813711d58d7a313a75225c5354d39 | |
parent | 521c07cbb8aa350939b21b569aa88ecd58978911 (diff) |
nws: add `CacheWeather`
-rw-r--r-- | nws/nws.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |