This commit is contained in:
2025-09-18 05:40:45 -07:00
parent 030ad360c2
commit 7da16e55a9
20 changed files with 843 additions and 219 deletions

View File

@@ -64,6 +64,8 @@ Available data types with Get() methods:
## Stats Types
Available stats with List() methods:
### Daily Stats
- `DailySteps`
- `DailyStress`
- `DailyHRV`
@@ -71,6 +73,11 @@ Available stats with List() methods:
- `DailyIntensityMinutes`
- `DailySleep`
### Weekly Stats
- `WeeklySteps`
- `WeeklyStress`
- `WeeklyHRV`
## Error Handling
All methods return errors implementing:
```go
@@ -98,7 +105,12 @@ BenchmarkSleepList-8 50000 35124 ns/op (7 days)
Full API docs: [https://pkg.go.dev/garmin-connect/garth](https://pkg.go.dev/garmin-connect/garth)
## CLI Tool
Includes `cmd/garth` CLI for data export:
Includes `cmd/garth` CLI for data export. Supports both daily and weekly stats:
```bash
go run cmd/garth/main.go --email user@example.com --password pass \
--data bodybattery --start 2023-01-01 --end 2023-01-07
# Daily steps
go run cmd/garth/main.go --data steps --period daily --start 2023-01-01 --end 2023-01-07
# Weekly stress
go run cmd/garth/main.go --data stress --period weekly --start 2023-01-01 --end 2023-01-28
```