summaryrefslogtreecommitdiffstats
path: root/nws/nws.go
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2022-05-21 17:51:45 -0400
committersiddharth <s@ricketyspace.net>2022-05-21 17:51:45 -0400
commit7afe0925dbd6905cb3b64b72181c9f04c8ff7be1 (patch)
tree6ea1e9b06dab49b34603bbd5a57162b3aeacd188 /nws/nws.go
parenta4caaf7c0ea5b7495df9a9aeb91936e635000061 (diff)
nws: add todos
Diffstat (limited to 'nws/nws.go')
-rw-r--r--nws/nws.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/nws/nws.go b/nws/nws.go
index 4fc1727..93c57ef 100644
--- a/nws/nws.go
+++ b/nws/nws.go
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: ISC
// Functions for accessing the National Weather Service API.
+// TODO: remove NWS prefix from all types.
package nws
import (
@@ -69,6 +70,8 @@ func (e NWSError) Error() string {
}
// NWS `/points` endpoint.
+//
+// TODO: return NWSError instead of error
func Points(lat, lng float32) (*NWSPoint, error) {
url := fmt.Sprintf("https://api.weather.gov/points/%.4f,%.4f", lat, lng)
resp, err := client.Get(url)
@@ -108,6 +111,8 @@ func Points(lat, lng float32) (*NWSPoint, error) {
}
// NWS forecast endpoint.
+//
+// TODO: return NWSError instead of error.
func Forecast(point *NWSPoint) (*NWSForecast, error) {
if point == nil {
return nil, fmt.Errorf("forecast: point nil")
@@ -151,6 +156,8 @@ func Forecast(point *NWSPoint) (*NWSForecast, error) {
}
// NWS forecast hourly endpoint.
+//
+// TODO: return NWSError instead of error
func ForecastHourly(point *NWSPoint) (*NWSForecast, error) {
if point == nil {
return nil, fmt.Errorf("forecast hourly: point nil")