sync - build broken

This commit is contained in:
2025-09-20 15:21:49 -07:00
parent c1993ba022
commit 626c473b01
94 changed files with 8471 additions and 1053 deletions

View File

@@ -0,0 +1,34 @@
package connect
import (
"fmt"
)
// ActivityWeather describes the weather during an activity.
type ActivityWeather struct {
Temperature int `json:"temp"`
ApparentTemperature int `json:"apparentTemp"`
DewPoint int `json:"dewPoint"`
RelativeHumidity int `json:"relativeHumidity"`
WindDirection int `json:"windDirection"`
WindDirectionCompassPoint string `json:"windDirectionCompassPoint"`
WindSpeed int `json:"windSpeed"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}
// ActivityWeather returns the reported weather for an activity.
func (c *Client) ActivityWeather(activityID int) (*ActivityWeather, error) {
URL := fmt.Sprintf("https://connect.garmin.com/modern/proxy/weather-service/weather/%d",
activityID,
)
weather := new(ActivityWeather)
err := c.getJSON(URL, weather)
if err != nil {
return nil, err
}
return weather, nil
}