feat: Implement Phase 1C.2: Multi-Format Support

This commit is contained in:
2025-09-18 15:04:09 -07:00
parent f7acfd7c78
commit ea96430ed4
4 changed files with 60 additions and 11 deletions

View File

@@ -331,9 +331,13 @@ func (c *Client) Upload(filePath string) error {
}
// Download retrieves a file from Garmin Connect
func (c *Client) Download(activityID string, filePath string) error {
func (c *Client) Download(activityID string, format string, filePath string) error {
params := url.Values{}
params.Add("activityId", activityID)
// Add format parameter if provided and not empty
if format != "" {
params.Add("format", format)
}
resp, err := c.ConnectAPI("/download-service/export", "GET", params, nil)
if err != nil {