forked from Elara6331/itd
		
	Add update weather command to itctl
This commit is contained in:
		
							
								
								
									
										17
									
								
								api/weather.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								api/weather.go
									
									
									
									
									
										Normal 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 | ||||
| } | ||||
		Reference in New Issue
	
	Block a user