mirror of
https://github.com/sstent/go-garth.git
synced 2026-01-26 00:52:40 +00:00
feat: Implement Phase 1C.2: Multi-Format Support
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user