Add update weather command to itctl

This commit is contained in:
2022-02-23 21:22:03 -08:00
parent 2f14e70721
commit 9e63401db3
7 changed files with 107 additions and 2 deletions

17
api/weather.go Normal file
View File

@@ -0,0 +1,17 @@
package api
import (
"go.arsenm.dev/itd/internal/types"
)
// UpdateWeather sends the update weather signal,
// immediately sending current weather data
func (c *Client) UpdateWeather() error {
_, err := c.request(types.Request{
Type: types.ReqTypeWeatherUpdate,
})
if err != nil {
return err
}
return nil
}