mirror of
https://github.com/sstent/go-garth.git
synced 2026-02-08 15:31:52 +00:00
sync - build broken
This commit is contained in:
25
python-garmin-connect/LifetimeTotals.go
Normal file
25
python-garmin-connect/LifetimeTotals.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package connect
|
||||
|
||||
// LifetimeTotals is ligetime statistics for the Connect user.
|
||||
type LifetimeTotals struct {
|
||||
ProfileID int `json:"userProfileId"`
|
||||
ActiveDays int `json:"totalActiveDays"`
|
||||
Calories float64 `json:"totalCalories"`
|
||||
Distance int `json:"totalDistance"`
|
||||
GoalsMetInDays int `json:"totalGoalsMetInDays"`
|
||||
Steps int `json:"totalSteps"`
|
||||
}
|
||||
|
||||
// LifetimeTotals returns some lifetime statistics for displayName.
|
||||
func (c *Client) LifetimeTotals(displayName string) (*LifetimeTotals, error) {
|
||||
URL := "https://connect.garmin.com/modern/proxy/usersummary-service/stats/connectLifetimeTotals/" + displayName
|
||||
|
||||
totals := new(LifetimeTotals)
|
||||
|
||||
err := c.getJSON(URL, totals)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return totals, err
|
||||
}
|
||||
Reference in New Issue
Block a user