Documentation ¶
Index ¶
- Constants
- Variables
- func GramsToPounds(g float64) float64
- func PoundsToGrams(lbs float64) float64
- func TokenCacheOk(cache TokenCacher) bool
- type API
- type AccessControlRule
- type AccessToken
- type Activity
- type ActivityDetails
- type ActivityListService
- type ActivityMetadataDTO
- type ActivitySearch
- func (as *ActivitySearch) WithActivityType(typ string) *ActivitySearch
- func (as *ActivitySearch) WithExcludeChildren(v bool) *ActivitySearch
- func (as *ActivitySearch) WithFavorites() *ActivitySearch
- func (as *ActivitySearch) WithLimit(lim int) *ActivitySearch
- func (as *ActivitySearch) WithSearch(search string) *ActivitySearch
- func (as *ActivitySearch) WithStart(start int) *ActivitySearch
- type ActivityService
- func (as *ActivityService) Activities(req *ActivitySearch) ([]ListedActivity, error)
- func (as *ActivityService) Details(id int64) (*ActivityDetails, error)
- func (as *ActivityService) EventTypes() (et []EventType, err error)
- func (as *ActivityService) Get(id int64) (*Activity, error)
- func (as *ActivityService) HeartRateTimeInZones(id int64) (res []TimeInZone, err error)
- func (as *ActivityService) PowerTimeInZones(id int64) (res []TimeInZone, e error)
- func (as *ActivityService) SplitSummaries(id int64) (*SplitSummaries, error)
- func (as *ActivityService) Splits(id int64) (*Splits, error)
- func (as *ActivityService) TypedSplits(id int64) (*ActivityTypedSplits, error)
- func (as *ActivityService) Types() (at []ActivityType, err error)
- func (as *ActivityService) Weather(id int64) (*ActivityWeather, error)
- func (as *ActivityService) Workouts(id int64)
- type ActivitySummaryDTO
- type ActivityType
- type ActivityTypedSplit
- type ActivityTypedSplits
- type ActivityUUID
- type ActivityUserInfo
- type ActivityWeather
- type Badge
- type BadgeAttributes
- type BadgeLeaderboard
- type BadgeLeaderboardConnection
- type BadgeService
- func (b *BadgeService) ActivityBadges(userUUID string, activityID int64) (res []BadgeSparse, e error)
- func (b *BadgeService) Attributes() (*BadgeAttributes, error)
- func (b *BadgeService) Available() (res []Badge, e error)
- func (b *BadgeService) Badge(id int64) (*Badge, error)
- func (b *BadgeService) Earned() (res []Badge, e error)
- func (b *BadgeService) Leaderboard(limit int) (*BadgeLeaderboard, error)
- type BadgeSparse
- type BodyBatteryEvent
- type BodyBatteryMessagingToday
- type BodyBatteryStat
- type Calendar
- type CalendarItem
- type CalendarPreferences
- type CalendarService
- func (c *CalendarService) GetMonth(year int, month time.Month) (*Calendar, error)
- func (c *CalendarService) GetMonthByDate(date time.Time) (*Calendar, error)
- func (c *CalendarService) GetWeek(year int, month time.Month, startDay int) (*Calendar, error)
- func (c *CalendarService) GetWeekByDate(date time.Time) (*Calendar, error)
- func (c *CalendarService) GetYear(year int) (*YearCalendar, error)
- func (c *CalendarService) Preferences() (*CalendarPreferences, error)
- func (c *CalendarService) RaceEventProviders() (res []RaceEventProvider, e error)
- func (c *CalendarService) Upcoming(days, limit int) (res []UpcomingEvent, e error)
- type Client
- type ClientOpt
- func WithCacher(cacher TokenCacher) ClientOpt
- func WithClock(clock Clock) ClientOpt
- func WithCookieOpts(opts *cookiejar.Options) ClientOpt
- func WithDomain(domain string) ClientOpt
- func WithMFAHandler(fn func() (string, error)) ClientOpt
- func WithTransport(transport rt.RoundTripper) ClientOpt
- func WithUserAgent(ua string) ClientOpt
- type Clock
- type ConsolidatedWellnessGoal
- type Course
- type CourseMetadata
- type CourseService
- type DailyFitnessAge
- type DailyHeartRate
- type DailyIntensityMinutes
- type DailySleep
- type DailySleepAverages
- type DailySleepDTO
- type DailySleepStat
- type DailySleepStats
- type DailySteps
- type DailyStepsStat
- type DailyStress
- type DailySummaryChartValue
- type DailyWeightSummary
- type Device
- type DeviceLastUsed
- type DeviceMessage
- type DeviceMessages
- type DeviceService
- func (d *DeviceService) DeviceMessageCount() (c int, e error)
- func (d *DeviceService) DeviceMessages() (*DeviceMessages, error)
- func (d *DeviceService) Devices() (res []Device, e error)
- func (d *DeviceService) DevicesByUser(userUUID string) (res []Device, e error)
- func (d *DeviceService) LastUsed() (*DeviceLastUsed, error)
- func (d *DeviceService) PrimaryTrainingDevice() (*PrimaryTrainingDevice, error)
- func (d *DeviceService) SendCourceToDevice(deviceID, courseID int64, courseName string) error
- func (d *DeviceService) SendDeviceMessages(msgs []DeviceMessage) (res []UploadedDeviceMessage, err error)
- func (d *DeviceService) UserDevice(deviceID int64) (*UserDevice, error)
- type DurationLevel
- type EventRequest
- type EventType
- type FileTokenCacher
- func (ftc *FileTokenCacher) DelAccessToken() (err error)
- func (ftc *FileTokenCacher) DelOAuth1Token() (err error)
- func (ftc *FileTokenCacher) GetAccessToken() (*AccessToken, error)
- func (ftc *FileTokenCacher) GetOAuth1Token() (*OAuth1Token, error)
- func (ftc *FileTokenCacher) SaveAccessToken(at *AccessToken) error
- func (ftc *FileTokenCacher) SaveOAuth1Token(token *OAuth1Token) error
- type FitnessAge
- type FitnessAgeBMI
- type FitnessAgeComponents
- type FitnessAgeRHR
- type FitnessAgeService
- type FitnessAgeVigorousDaysAvg
- type FitnessAgeVigorousMinutesAvg
- type FitnessStatsService
- type HeartRateStat
- type HourlyIntensityMinutes
- type InMemTokenCacher
- func (imtc *InMemTokenCacher) DelAccessToken() error
- func (imtc *InMemTokenCacher) DelOAuth1Token() error
- func (imtc *InMemTokenCacher) GetAccessToken() (*AccessToken, error)
- func (imtc *InMemTokenCacher) GetOAuth1Token() (*OAuth1Token, error)
- func (imtc *InMemTokenCacher) SaveAccessToken(at *AccessToken) error
- func (imtc *InMemTokenCacher) SaveOAuth1Token(token *OAuth1Token) error
- type IntensityMinutesStat
- type LapDTO
- type ListedActivity
- type ListedActivitySplitSummary
- type MonthlyStepsStat
- type OAuth1Token
- type PersonalInformation
- type PersonalRecord
- type PersonalRecordService
- type PersonalRecordType
- type PrimaryTrainingDevice
- type ProfileStatus
- type PublicSocialProfile
- type PulseOxCapable
- type RaceEventProvider
- type RaceSearchRequest
- type RaceSearchResult
- type Refresher
- type SegmentLeaderboard
- type Settings
- type SharableEvent
- type SleepNeed
- type SleepScorePercentage
- type SleepScoreRangedRating
- type SleepScoreValueRating
- type SleepScores
- type SleepService
- type SocialProfile
- type SplitEventDTO
- type SplitSummaries
- type SplitSummary
- type Splits
- type Stat
- type StepsAggregations
- type StressStat
- type SuggestedUserFocus
- type TimeInZone
- type TimeZoneUnit
- type TimestampedValue
- type TokenCacher
- type URLBuilder
- func (ub *URLBuilder) Clear() *URLBuilder
- func (ub *URLBuilder) Fragment(f string) *URLBuilder
- func (ub *URLBuilder) HTTPS() *URLBuilder
- func (ub *URLBuilder) Host(h string, domain ...string) *URLBuilder
- func (ub *URLBuilder) MapQuery(q map[string]string) *URLBuilder
- func (ub *URLBuilder) Path(p string) *URLBuilder
- func (ub *URLBuilder) Pathf(p string, v ...any) *URLBuilder
- func (ub *URLBuilder) Query(q url.Values) *URLBuilder
- func (ub *URLBuilder) Scheme(s string) *URLBuilder
- func (ub *URLBuilder) String() string
- func (ub *URLBuilder) Subdomain(sub, domain string) *URLBuilder
- func (ub *URLBuilder) URL() *url.URL
- type UnixTS
- func (uts UnixTS) Add(d time.Duration) UnixTS
- func (uts UnixTS) AddDate(y, m, d int) UnixTS
- func (uts UnixTS) After(ts UnixTS) bool
- func (uts UnixTS) Before(ts UnixTS) bool
- func (uts UnixTS) Clock() (int, int, int)
- func (uts UnixTS) Compare(ts UnixTS) int
- func (uts UnixTS) Date() (int, time.Month, int)
- func (uts UnixTS) Day() int
- func (uts UnixTS) Equal(ts UnixTS) bool
- func (uts UnixTS) Format(format string) string
- func (uts UnixTS) Hour() int
- func (uts UnixTS) ISOWeek() (int, int)
- func (uts UnixTS) In(loc *time.Location) UnixTS
- func (uts UnixTS) IsDST() bool
- func (uts UnixTS) IsZero() bool
- func (uts UnixTS) Local() UnixTS
- func (uts UnixTS) Location() *time.Location
- func (uts UnixTS) Minute() int
- func (uts UnixTS) Month() time.Month
- func (uts UnixTS) Nanosecond() int
- func (uts UnixTS) Round(d time.Duration) UnixTS
- func (uts UnixTS) Second() int
- func (uts UnixTS) Sub(t UnixTS) time.Duration
- func (uts UnixTS) Truncate(d time.Duration) UnixTS
- func (uts UnixTS) UTC() UnixTS
- func (uts UnixTS) Unix() int64
- func (uts UnixTS) UnixMicro() int64
- func (uts UnixTS) UnixMilli() int64
- func (uts UnixTS) UnixNano() int64
- func (uts *UnixTS) UnmarshalJSON(b []byte) error
- func (uts *UnixTS) UnmarshalText(b []byte) error
- func (uts UnixTS) Weekday() time.Weekday
- func (uts UnixTS) Year() int
- func (uts UnixTS) YearDay() int
- func (uts UnixTS) Zone() (string, int)
- type UpcomingEvent
- type UploadedDeviceMessage
- type UserCourses
- type UserDataUpdate
- type UserDevice
- type UserFocus
- type UserFocusAvailablePrimaryStat
- type UserFocusDashboard
- type UserFocusService
- type UserProfileBase
- type UserProfileService
- func (up *UserProfileService) PersonalInformation(userUUID string) (*PersonalInformation, error)
- func (up *UserProfileService) ProfileStatus(displayName string) (*ProfileStatus, error)
- func (up *UserProfileService) PublicSocialProfile(displayName string) (*PublicSocialProfile, error)
- func (up *UserProfileService) PulseOxCapable() (*PulseOxCapable, error)
- func (up *UserProfileService) SegmentLeaderboard() (*SegmentLeaderboard, error)
- func (up *UserProfileService) Settings() (*Settings, error)
- func (up *UserProfileService) SocialProfile(displayName string) (*SocialProfile, error)
- func (up *UserProfileService) StravaSegments() (*SegmentLeaderboard, error)
- func (up *UserProfileService) UpdateSettings(usu *UserSettingsUpdate) error
- func (up *UserProfileService) UpdateSocialProfile(displayName string, profile *SocialProfile) (*SocialProfile, error)
- func (up *UserProfileService) UserProfileBase() (*UserProfileBase, error)
- func (up *UserProfileService) UserSettings() (*UserSettings, error)
- type UserSettings
- type UserSettingsFormat
- type UserSettingsSleep
- type UserSettingsSleepWindows
- type UserSettingsUpdate
- type UserSettingsUserData
- type UserSummaryService
- func (uss *UserSummaryService) DailyBodyBattery(start, end time.Time) (s []Stat[BodyBatteryStat], err error)
- func (uss *UserSummaryService) DailyHeartRate(start, end time.Time) (s []Stat[HeartRateStat], err error)
- func (uss *UserSummaryService) DailyIntensityMinutes(start, end time.Time) (s []IntensityMinutesStat, err error)
- func (uss *UserSummaryService) DailySteps(start, end time.Time) (s *DailySteps, err error)
- func (uss *UserSummaryService) DailyStress(start, end time.Time) (s []Stat[StressStat], err error)
- func (uss *UserSummaryService) MonthlyPushes(months int, end time.Time) ([]any, error)
- func (uss *UserSummaryService) MonthlySteps(months int, end time.Time) (s []Stat[MonthlyStepsStat], err error)
- func (uss *UserSummaryService) WeeklyHeartRate(weeks int, end time.Time) (s []Stat[HeartRateStat], err error)
- func (uss *UserSummaryService) WeeklyIntensityMinutes(start, end time.Time) (s []IntensityMinutesStat, err error)
- func (uss *UserSummaryService) WeeklyPushes(weeks int, end time.Time) ([]any, error)
- func (uss *UserSummaryService) WeeklySteps(weeks int, end time.Time) (s []Stat[WeeklyStepsStat], err error)
- func (uss *UserSummaryService) WeeklyStress(weeks int, end time.Time) (s []WeeklyStressStat, err error)
- type WeeklyFitnessAge
- type WeeklySleepAverages
- type WeeklySleepIndividualStat
- type WeeklySleepStatValue
- type WeeklySleepStats
- type WeeklyStepsStat
- type WeeklyStressStat
- type WeighIn
- type WeightAverage
- type WeightDayView
- type WeightRange
- type WeightService
- func (ws *WeightService) DayView(date time.Time) (*WeightDayView, error)
- func (ws *WeightService) DeleteWeight(date time.Time, version int64) error
- func (ws *WeightService) First() (*WeighIn, error)
- func (ws *WeightService) Latest(date time.Time) (*WeighIn, error)
- func (ws *WeightService) Range(start, end time.Time) (*WeightRange, error)
- func (ws *WeightService) UpdateWeight(weight float64, unit WeightUnit) error
- type WeightUnit
- type WellnessEpochRespirationDataDTOList
- type WellnessService
- func (w *WellnessService) BodyBatteryEvents(date time.Time) (res []BodyBatteryEvent, e error)
- func (w *WellnessService) BodyBatteryMessagingToday() (*BodyBatteryMessagingToday, error)
- func (w *WellnessService) DailyEvents(userUUID string, date time.Time)
- func (ws *WellnessService) DailyHeartRate(date time.Time) (hr *DailyHeartRate, err error)
- func (w *WellnessService) DailyIntensityMinutes(date time.Time) (*DailyIntensityMinutes, error)
- func (ws *WellnessService) DailySleep(userUUID string, date time.Time) (*DailySleep, error)
- func (w *WellnessService) DailyStress(date time.Time) (*DailyStress, error)
- func (w *WellnessService) DailySummaryChart(date time.Time) (res []DailySummaryChartValue, e error)
- func (w *WellnessService) HourlyIntensityMinutes(days int, end time.Time) (*HourlyIntensityMinutes, error)
- func (w *WellnessService) PushesGoal(date time.Time) (*ConsolidatedWellnessGoal, error)
- func (w *WellnessService) StepsGoal(date time.Time) (*ConsolidatedWellnessGoal, error)
- type YearCalendar
Constants ¶
const UserAgent = "com.garmin.android.apps.connectmobile"
Variables ¶
var ( ErrTokenCacheNotFound = errors.New("could not find token in cache") ErrTokenCacheExpired = errors.New("token saved in cache is expired") )
var ( BaseDomain = "garmin.com" DefaultClient = NewClient() )
var ( ErrNoCSRF = errors.New("could not get csrf token") ErrNoTitle = errors.New("could not find page title") ErrNoTicket = errors.New("could not find ticket") ErrNotSuccessful = errors.New("page title was not \"Success\"") ErrExpiredRefreshToken = errors.New("refresh token has expired") ErrAccessTokenExpired = errors.New("access_token has expired") )
var DefaultClock clock
Functions ¶
func GramsToPounds ¶
func PoundsToGrams ¶
func TokenCacheOk ¶
func TokenCacheOk(cache TokenCacher) bool
Types ¶
type API ¶
type API struct { Activity *ActivityService ActivityList *ActivityListService Course *CourseService Device *DeviceService FitnessAge *FitnessAgeService FitnessStats *FitnessStatsService PersonalRecord *PersonalRecordService Sleep *SleepService UserFocus *UserFocusService UserProfile *UserProfileService UserSummary *UserSummaryService Weight *WeightService Wellness *WellnessService }
API holds all the services.
type AccessControlRule ¶
type AccessToken ¶
type AccessToken struct { Scope string `json:"scope"` // JTI is a JWT ID. JTI string `json:"jti"` AccessToken string `json:"access_token"` TokenType string `json:"token_type"` RefreshToken string `json:"refresh_token"` Expires int64 `json:"expires"` ExpiresIn int `json:"expires_in"` RefreshTokenExpires int64 `json:"refresh_token_expires"` RefreshTokenExpiresIn int `json:"refresh_token_expires_in"` }
func (*AccessToken) ExpiresAt ¶
func (at *AccessToken) ExpiresAt() time.Time
func (*AccessToken) RefreshTokenExpiresAt ¶
func (at *AccessToken) RefreshTokenExpiresAt() time.Time
type Activity ¶
type Activity struct { ID int64 `json:"activityId"` UUID ActivityUUID `json:"activityUUID"` Name string `json:"activityName"` UserProfileID int `json:"userProfileId"` IsMultiSportParent bool `json:"isMultiSportParent"` Type ActivityType `json:"activityTypeDTO"` EventType EventType `json:"eventTypeDTO"` AccessControlRule AccessControlRule `json:"accessControlRuleDTO"` TimeZoneUnit TimeZoneUnit `json:"timeZoneUnitDTO"` MetadataDTO ActivityMetadataDTO `json:"metadataDTO"` SummaryDTO ActivitySummaryDTO `json:"summaryDTO"` LocationName string `json:"locationName"` SplitSummaries []SplitSummary `json:"splitSummaries"` }
type ActivityDetails ¶
type ActivityDetails struct { ActivityID int64 `json:"activityId"` MeasurementCount int `json:"measurementCount"` MetricsCount int `json:"metricsCount"` MetricDescriptors []struct { MetricsIndex int `json:"metricsIndex"` Key string `json:"key"` Unit struct { ID int `json:"id"` Key string `json:"key"` Factor float64 `json:"factor"` } `json:"unit"` } `json:"metricDescriptors"` ActivityDetailMetrics []struct { Metrics []any `json:"metrics"` } `json:"activityDetailMetrics"` GeoPolylineDTO struct { StartPoint struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` Altitude any `json:"altitude"` Time int64 `json:"time"` TimerStart bool `json:"timerStart"` TimerStop bool `json:"timerStop"` DistanceFromPreviousPoint any `json:"distanceFromPreviousPoint"` DistanceInMeters any `json:"distanceInMeters"` Speed float64 `json:"speed"` CumulativeAscent any `json:"cumulativeAscent"` CumulativeDescent any `json:"cumulativeDescent"` ExtendedCoordinate bool `json:"extendedCoordinate"` Valid bool `json:"valid"` } `json:"startPoint"` EndPoint struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` Altitude any `json:"altitude"` Time int64 `json:"time"` TimerStart bool `json:"timerStart"` TimerStop bool `json:"timerStop"` DistanceFromPreviousPoint any `json:"distanceFromPreviousPoint"` DistanceInMeters any `json:"distanceInMeters"` Speed float64 `json:"speed"` CumulativeAscent any `json:"cumulativeAscent"` CumulativeDescent any `json:"cumulativeDescent"` ExtendedCoordinate bool `json:"extendedCoordinate"` Valid bool `json:"valid"` } `json:"endPoint"` MinLat float64 `json:"minLat"` MaxLat float64 `json:"maxLat"` MinLon float64 `json:"minLon"` MaxLon float64 `json:"maxLon"` Polyline []struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` Altitude any `json:"altitude"` Time int64 `json:"time"` TimerStart bool `json:"timerStart"` TimerStop bool `json:"timerStop"` DistanceFromPreviousPoint any `json:"distanceFromPreviousPoint"` DistanceInMeters any `json:"distanceInMeters"` Speed float64 `json:"speed"` CumulativeAscent any `json:"cumulativeAscent"` CumulativeDescent any `json:"cumulativeDescent"` ExtendedCoordinate bool `json:"extendedCoordinate"` Valid bool `json:"valid"` } `json:"polyline"` } `json:"geoPolylineDTO"` HeartRateDTOs any `json:"heartRateDTOs"` PendingData any `json:"pendingData"` DetailsAvailable bool `json:"detailsAvailable"` }
type ActivityListService ¶
type ActivityListService service
func (*ActivityListService) Activities ¶
func (al *ActivityListService) Activities(req *ActivitySearch) (list []ListedActivity, e error)
type ActivityMetadataDTO ¶
type ActivityMetadataDTO struct { IsOriginal bool `json:"isOriginal"` DeviceApplicationInstallationID int `json:"deviceApplicationInstallationId"` AgentApplicationInstallationID any `json:"agentApplicationInstallationId"` AgentString any `json:"agentString"` FileFormat struct { FormatID int `json:"formatId"` FormatKey string `json:"formatKey"` } `json:"fileFormat"` AssociatedCourseID any `json:"associatedCourseId"` LastUpdateDate string `json:"lastUpdateDate"` UploadedDate string `json:"uploadedDate"` VideoURL any `json:"videoUrl"` HasPolyline bool `json:"hasPolyline"` HasChartData bool `json:"hasChartData"` HasHrTimeInZones bool `json:"hasHrTimeInZones"` HasPowerTimeInZones bool `json:"hasPowerTimeInZones"` UserInfoDTO ActivityUserInfo `json:"userInfoDto"` ChildIds []any `json:"childIds"` ChildActivityTypes []any `json:"childActivityTypes"` Sensors any `json:"sensors"` ActivityImages []any `json:"activityImages"` Manufacturer string `json:"manufacturer"` DiveNumber any `json:"diveNumber"` LapCount int `json:"lapCount"` AssociatedWorkoutID any `json:"associatedWorkoutId"` IsAtpActivity any `json:"isAtpActivity"` DeviceMetaDataDTO struct { DeviceID string `json:"deviceId"` DeviceTypePk int `json:"deviceTypePk"` DeviceVersionPk int `json:"deviceVersionPk"` } `json:"deviceMetaDataDTO"` HasIntensityIntervals bool `json:"hasIntensityIntervals"` HasSplits bool `json:"hasSplits"` EBikeMaxAssistModes any `json:"eBikeMaxAssistModes"` EBikeBatteryUsage any `json:"eBikeBatteryUsage"` EBikeBatteryRemaining any `json:"eBikeBatteryRemaining"` EBikeAssistModeInfoDTOList any `json:"eBikeAssistModeInfoDTOList"` HasRunPowerWindData bool `json:"hasRunPowerWindData"` CalendarEventInfo any `json:"calendarEventInfo"` GroupRideUUID any `json:"groupRideUUID"` AutoCalcCalories bool `json:"autoCalcCalories"` Favorite bool `json:"favorite"` ManualActivity bool `json:"manualActivity"` RunPowerWindDataEnabled bool `json:"runPowerWindDataEnabled"` Trimmed bool `json:"trimmed"` GCJ02 bool `json:"gcj02"` PersonalRecord bool `json:"personalRecord"` ElevationCorrected bool `json:"elevationCorrected"` }
type ActivitySearch ¶
type ActivitySearch struct { Limit *int Start *int Search *string ExcludeChildren *bool ActivityType *string Favorite *int }
func (*ActivitySearch) WithActivityType ¶
func (as *ActivitySearch) WithActivityType(typ string) *ActivitySearch
func (*ActivitySearch) WithExcludeChildren ¶
func (as *ActivitySearch) WithExcludeChildren(v bool) *ActivitySearch
func (*ActivitySearch) WithFavorites ¶
func (as *ActivitySearch) WithFavorites() *ActivitySearch
func (*ActivitySearch) WithLimit ¶
func (as *ActivitySearch) WithLimit(lim int) *ActivitySearch
func (*ActivitySearch) WithSearch ¶
func (as *ActivitySearch) WithSearch(search string) *ActivitySearch
func (*ActivitySearch) WithStart ¶
func (as *ActivitySearch) WithStart(start int) *ActivitySearch
type ActivityService ¶
type ActivityService service
func (*ActivityService) Activities ¶
func (as *ActivityService) Activities(req *ActivitySearch) ([]ListedActivity, error)
func (*ActivityService) Details ¶
func (as *ActivityService) Details(id int64) (*ActivityDetails, error)
Details gets an activities details given the activity ID.
func (*ActivityService) EventTypes ¶
func (as *ActivityService) EventTypes() (et []EventType, err error)
func (*ActivityService) HeartRateTimeInZones ¶
func (as *ActivityService) HeartRateTimeInZones(id int64) (res []TimeInZone, err error)
func (*ActivityService) PowerTimeInZones ¶
func (as *ActivityService) PowerTimeInZones(id int64) (res []TimeInZone, e error)
func (*ActivityService) SplitSummaries ¶
func (as *ActivityService) SplitSummaries(id int64) (*SplitSummaries, error)
func (*ActivityService) TypedSplits ¶
func (as *ActivityService) TypedSplits(id int64) (*ActivityTypedSplits, error)
func (*ActivityService) Types ¶
func (as *ActivityService) Types() (at []ActivityType, err error)
func (*ActivityService) Weather ¶
func (as *ActivityService) Weather(id int64) (*ActivityWeather, error)
func (*ActivityService) Workouts ¶
func (as *ActivityService) Workouts(id int64)
type ActivitySummaryDTO ¶
type ActivitySummaryDTO struct { StartTimeLocal string `json:"startTimeLocal"` StartTimeGMT string `json:"startTimeGMT"` StartLatitude float64 `json:"startLatitude"` StartLongitude float64 `json:"startLongitude"` Distance float64 `json:"distance"` Duration float64 `json:"duration"` MovingDuration float64 `json:"movingDuration"` ElapsedDuration float64 `json:"elapsedDuration"` ElevationGain float64 `json:"elevationGain"` ElevationLoss float64 `json:"elevationLoss"` MaxElevation float64 `json:"maxElevation"` MinElevation float64 `json:"minElevation"` AverageSpeed float64 `json:"averageSpeed"` AverageMovingSpeed float64 `json:"averageMovingSpeed"` MaxSpeed float64 `json:"maxSpeed"` Calories float64 `json:"calories"` BmrCalories float64 `json:"bmrCalories"` AverageHR float64 `json:"averageHR"` MaxHR float64 `json:"maxHR"` AverageRunCadence float64 `json:"averageRunCadence"` MaxRunCadence float64 `json:"maxRunCadence"` AveragePower float64 `json:"averagePower"` MaxPower float64 `json:"maxPower"` MinPower float64 `json:"minPower"` NormalizedPower float64 `json:"normalizedPower"` TotalWork float64 `json:"totalWork"` GroundContactTime float64 `json:"groundContactTime"` StrideLength float64 `json:"strideLength"` VerticalOscillation float64 `json:"verticalOscillation"` TrainingEffect float64 `json:"trainingEffect"` AnaerobicTrainingEffect float64 `json:"anaerobicTrainingEffect"` AerobicTrainingEffectMessage string `json:"aerobicTrainingEffectMessage"` AnaerobicTrainingEffectMessage string `json:"anaerobicTrainingEffectMessage"` VerticalRatio float64 `json:"verticalRatio"` EndLatitude float64 `json:"endLatitude"` EndLongitude float64 `json:"endLongitude"` MaxVerticalSpeed float64 `json:"maxVerticalSpeed"` WaterEstimated float64 `json:"waterEstimated"` TrainingEffectLabel string `json:"trainingEffectLabel"` ActivityTrainingLoad float64 `json:"activityTrainingLoad"` MinActivityLapDuration float64 `json:"minActivityLapDuration"` DirectWorkoutFeel int `json:"directWorkoutFeel"` DirectWorkoutRpe int `json:"directWorkoutRpe"` ModerateIntensityMinutes int `json:"moderateIntensityMinutes"` VigorousIntensityMinutes int `json:"vigorousIntensityMinutes"` Steps int `json:"steps"` RecoveryHeartRate int `json:"recoveryHeartRate"` AvgGradeAdjustedSpeed float64 `json:"avgGradeAdjustedSpeed"` DifferenceBodyBattery int `json:"differenceBodyBattery"` }
type ActivityType ¶
type ActivityTypedSplit ¶
type ActivityTypedSplit struct { StartTimeLocal string `json:"startTimeLocal"` StartTimeGMT string `json:"startTimeGMT"` StartLatitude float64 `json:"startLatitude"` StartLongitude float64 `json:"startLongitude"` Distance float64 `json:"distance"` Duration float64 `json:"duration"` MovingDuration float64 `json:"movingDuration"` ElapsedDuration float64 `json:"elapsedDuration"` ElevationGain float64 `json:"elevationGain"` ElevationLoss float64 `json:"elevationLoss"` AverageSpeed float64 `json:"averageSpeed"` AverageMovingSpeed float64 `json:"averageMovingSpeed,omitempty"` MaxSpeed float64 `json:"maxSpeed"` Calories float64 `json:"calories"` BmrCalories float64 `json:"bmrCalories"` AverageHR float64 `json:"averageHR"` MaxHR float64 `json:"maxHR"` AverageRunCadence float64 `json:"averageRunCadence"` MaxRunCadence float64 `json:"maxRunCadence"` AveragePower float64 `json:"averagePower"` MaxPower float64 `json:"maxPower"` NormalizedPower float64 `json:"normalizedPower,omitempty"` GroundContactTime float64 `json:"groundContactTime,omitempty"` StrideLength float64 `json:"strideLength,omitempty"` VerticalOscillation float64 `json:"verticalOscillation,omitempty"` VerticalRatio float64 `json:"verticalRatio,omitempty"` TotalExerciseReps int `json:"totalExerciseReps"` EndLatitude float64 `json:"endLatitude"` EndLongitude float64 `json:"endLongitude"` AvgVerticalSpeed float64 `json:"avgVerticalSpeed"` AvgGradeAdjustedSpeed float64 `json:"avgGradeAdjustedSpeed"` AvgElapsedDurationVerticalSpeed float64 `json:"avgElapsedDurationVerticalSpeed"` Type string `json:"type"` MessageIndex int `json:"messageIndex"` EndTimeGMT string `json:"endTimeGMT"` StartElevation float64 `json:"startElevation"` }
type ActivityTypedSplits ¶
type ActivityTypedSplits struct { ActivityID int64 `json:"activityId"` ActivityUUID ActivityUUID `json:"activityUUID"` Splits []ActivityTypedSplit `json:"splits"` }
type ActivityUUID ¶
type ActivityUUID struct {
UUID string `json:"uuid"`
}
func (*ActivityUUID) String ¶
func (au *ActivityUUID) String() string
type ActivityUserInfo ¶
type ActivityUserInfo struct { UserProfileID int64 `json:"userProfilePk"` Displayname string `json:"displayname"` Fullname string `json:"fullname"` ProfileImageURLLarge string `json:"profileImageUrlLarge"` ProfileImageURLMedium string `json:"profileImageUrlMedium"` ProfileImageURLSmall string `json:"profileImageUrlSmall"` UserPro bool `json:"userPro"` }
type ActivityWeather ¶
type ActivityWeather struct { IssueDate string `json:"issueDate"` Temp int `json:"temp"` ApparentTemp int `json:"apparentTemp"` DewPoint int `json:"dewPoint"` RelativeHumidity int `json:"relativeHumidity"` WindDirection int `json:"windDirection"` WindDirectionCompassPoint string `json:"windDirectionCompassPoint"` WindSpeed int `json:"windSpeed"` WindGust any `json:"windGust"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` WeatherStationDTO struct { ID string `json:"id"` Name string `json:"name"` Timezone any `json:"timezone"` } `json:"weatherStationDTO"` WeatherTypeDTO struct { WeatherTypePk any `json:"weatherTypePk"` Desc string `json:"desc"` Image any `json:"image"` } `json:"weatherTypeDTO"` }
type Badge ¶
type Badge struct { ID int `json:"badgeId"` Key string `json:"badgeKey"` Name string `json:"badgeName"` UUID any `json:"badgeUuid"` CategoryID int `json:"badgeCategoryId"` DifficultyID int `json:"badgeDifficultyId"` Points int `json:"badgePoints"` TypeIds []int `json:"badgeTypeIds"` SeriesID int `json:"badgeSeriesId"` StartDate string `json:"badgeStartDate"` EndDate any `json:"badgeEndDate"` UserProfileID int `json:"userProfileId"` FullName string `json:"fullName"` DisplayName string `json:"displayName"` EarnedDate string `json:"badgeEarnedDate"` EarnedNumber int `json:"badgeEarnedNumber"` LimitCount any `json:"badgeLimitCount"` IsViewed bool `json:"badgeIsViewed"` ProgressValue float64 `json:"badgeProgressValue"` TargetValue any `json:"badgeTargetValue"` UnitID any `json:"badgeUnitId"` AssocTypeID int `json:"badgeAssocTypeId"` AssocDataID string `json:"badgeAssocDataId"` AssocDataName any `json:"badgeAssocDataName"` EarnedByMe bool `json:"earnedByMe"` CurrentPlayerType any `json:"currentPlayerType"` UserJoined any `json:"userJoined"` ChallengeStatusID any `json:"badgeChallengeStatusId"` PromotionCodeTypeList []any `json:"badgePromotionCodeTypeList"` PromotionCodeStatus any `json:"promotionCodeStatus"` CreateDate string `json:"createDate"` RelatedBadges []BadgeSparse `json:"relatedBadges"` ConnectionNumber any `json:"connectionNumber"` Connections any `json:"connections"` }
type BadgeAttributes ¶
type BadgeAttributes struct { BadgeTypes []struct { BadgeTypeID int `json:"badgeTypeId"` BadgeTypeKey string `json:"badgeTypeKey"` } `json:"badgeTypes"` BadgeCategories []struct { BadgeCategoryID int `json:"badgeCategoryId"` BadgeCategoryKey string `json:"badgeCategoryKey"` } `json:"badgeCategories"` BadgeDifficulties []struct { BadgeDifficultyID int `json:"badgeDifficultyId"` BadgeDifficultyKey string `json:"badgeDifficultyKey"` BadgePoints int `json:"badgePoints"` } `json:"badgeDifficulties"` BadgeUnits []struct { BadgeUnitID int `json:"badgeUnitId"` BadgeUnitKey string `json:"badgeUnitKey"` } `json:"badgeUnits"` BadgeAssocTypes []struct { BadgeAssocTypeID int `json:"badgeAssocTypeId"` BadgeAssocTypeKey string `json:"badgeAssocTypeKey"` } `json:"badgeAssocTypes"` }
type BadgeLeaderboard ¶
type BadgeLeaderboard struct { Connections []BadgeLeaderboardConnection `json:"connections"` PublicConnectionCount int `json:"publicConnectionCount"` PrivateConnectionCount int `json:"privateConnectionCount"` }
type BadgeLeaderboardConnection ¶
type BadgeLeaderboardConnection struct { UserProfileID int `json:"userProfileId"` FullName string `json:"fullName"` DisplayName string `json:"displayName"` UserPro bool `json:"userPro"` ProfileImageURLLarge any `json:"profileImageUrlLarge"` ProfileImageURLMedium string `json:"profileImageUrlMedium"` ProfileImageURLSmall string `json:"profileImageUrlSmall"` UserLevel int `json:"userLevel"` UserPoint int `json:"userPoint"` LevelPointThreshold any `json:"levelPointThreshold"` LevelUpdateDate any `json:"levelUpdateDate"` LevelIsViewed any `json:"levelIsViewed"` HasPrivate bool `json:"hasPrivate"` Badges any `json:"badges"` }
type BadgeService ¶
type BadgeService service
func (*BadgeService) ActivityBadges ¶
func (b *BadgeService) ActivityBadges(userUUID string, activityID int64) (res []BadgeSparse, e error)
func (*BadgeService) Attributes ¶
func (b *BadgeService) Attributes() (*BadgeAttributes, error)
func (*BadgeService) Available ¶
func (b *BadgeService) Available() (res []Badge, e error)
func (*BadgeService) Earned ¶
func (b *BadgeService) Earned() (res []Badge, e error)
func (*BadgeService) Leaderboard ¶
func (b *BadgeService) Leaderboard(limit int) (*BadgeLeaderboard, error)
type BadgeSparse ¶
type BadgeSparse struct { ID int `json:"badgeId"` Key string `json:"badgeKey"` UUID any `json:"badgeUuid"` Name string `json:"badgeName"` DifficultyID int `json:"badgeDifficultyId"` Points int `json:"badgePoints"` TypeIds []int `json:"badgeTypeIds"` EarnedByMe bool `json:"earnedByMe"` CategoryID int `json:"badgeCategoryId"` }
type BodyBatteryEvent ¶
type BodyBatteryEvent struct { Event struct { EventType string `json:"eventType"` EventStartTimeGmt string `json:"eventStartTimeGmt"` TimezoneOffset int `json:"timezoneOffset"` DurationInMilliseconds int `json:"durationInMilliseconds"` BodyBatteryImpact int `json:"bodyBatteryImpact"` FeedbackType string `json:"feedbackType"` ShortFeedback string `json:"shortFeedback"` } `json:"event"` ActivityName any `json:"activityName"` ActivityType any `json:"activityType"` ActivityID any `json:"activityId"` AverageStress float64 `json:"averageStress"` StressValueDescriptorsDTOList []struct { Key string `json:"key"` Index int `json:"index"` } `json:"stressValueDescriptorsDTOList"` StressValuesArray [][]any `json:"stressValuesArray"` BodyBatteryValueDescriptorsDTOList []struct { BodyBatteryValueDescriptorIndex int `json:"bodyBatteryValueDescriptorIndex"` BodyBatteryValueDescriptorKey string `json:"bodyBatteryValueDescriptorKey"` } `json:"bodyBatteryValueDescriptorsDTOList"` BodyBatteryValuesArray [][]any `json:"bodyBatteryValuesArray"` }
type BodyBatteryMessagingToday ¶
type BodyBatteryMessagingToday struct { UserProfilePK int `json:"userProfilePK"` CalendarDate string `json:"calendarDate"` StartTimestampGMT string `json:"startTimestampGMT"` EndTimestampGMT string `json:"endTimestampGMT"` StartTimestampLocal string `json:"startTimestampLocal"` EndTimestampLocal string `json:"endTimestampLocal"` DeltaValue int `json:"deltaValue"` TimeOfDay string `json:"timeOfDay"` ConfirmedTotalSleepSeconds int `json:"confirmedTotalSleepSeconds"` BodyBatteryVersion float64 `json:"bodyBatteryVersion"` }
type BodyBatteryStat ¶
type Calendar ¶
type Calendar struct { StartDayOfMonth int `json:"startDayOfMonth"` NumOfDaysInMonth int `json:"numOfDaysInMonth"` NumOfDaysInPrevMonth int `json:"numOfDaysInPrevMonth"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` Month int `json:"month"` Year int `json:"year"` CalendarItems []CalendarItem `json:"calendarItems"` }
type CalendarItem ¶
type CalendarItem struct { ID any `json:"id"` GroupID any `json:"groupId"` TrainingPlanID any `json:"trainingPlanId"` ItemType string `json:"itemType"` ActivityTypeID int `json:"activityTypeId"` WellnessActivityUUID any `json:"wellnessActivityUuid"` Title string `json:"title"` Date string `json:"date"` Duration any `json:"duration"` Distance any `json:"distance"` Calories any `json:"calories"` FloorsClimbed any `json:"floorsClimbed"` AvgRespirationRate any `json:"avgRespirationRate"` UnitOfPoolLength any `json:"unitOfPoolLength"` Weight any `json:"weight"` Difference any `json:"difference"` CourseID any `json:"courseId"` CourseName any `json:"courseName"` SportTypeKey any `json:"sportTypeKey"` URL string `json:"url"` IsStart any `json:"isStart"` IsRace bool `json:"isRace"` RecurrenceID any `json:"recurrenceId"` IsParent any `json:"isParent"` ParentID any `json:"parentId"` UserBadgeID any `json:"userBadgeId"` BadgeCategoryTypeID any `json:"badgeCategoryTypeId"` BadgeCategoryTypeDesc any `json:"badgeCategoryTypeDesc"` BadgeAwardedDate any `json:"badgeAwardedDate"` BadgeViewed any `json:"badgeViewed"` HideBadge any `json:"hideBadge"` StartTimestampLocal any `json:"startTimestampLocal"` EventTimeLocal struct { StartTimeHhMm string `json:"startTimeHhMm"` TimeZoneID string `json:"timeZoneId"` } `json:"eventTimeLocal"` DiveNumber any `json:"diveNumber"` MaxDepth any `json:"maxDepth"` AvgDepth any `json:"avgDepth"` SurfaceInterval any `json:"surfaceInterval"` ElapsedDuration any `json:"elapsedDuration"` LapCount any `json:"lapCount"` BottomTime any `json:"bottomTime"` AtpPlanID any `json:"atpPlanId"` WorkoutID any `json:"workoutId"` ProtectedWorkoutSchedule bool `json:"protectedWorkoutSchedule"` ActiveSets any `json:"activeSets"` Strokes any `json:"strokes"` NoOfSplits any `json:"noOfSplits"` MaxGradeValue any `json:"maxGradeValue"` TotalAscent any `json:"totalAscent"` DifferenceStress any `json:"differenceStress"` ClimbDuration any `json:"climbDuration"` MaxSpeed any `json:"maxSpeed"` AverageHR any `json:"averageHR"` ActiveSplitSummaryDuration any `json:"activeSplitSummaryDuration"` MaxSplitDistance any `json:"maxSplitDistance"` MaxSplitSpeed any `json:"maxSplitSpeed"` Location string `json:"location"` SplitSummaryMode any `json:"splitSummaryMode"` CompletionTarget struct { Value float64 `json:"value"` Unit string `json:"unit"` UnitType string `json:"unitType"` } `json:"completionTarget"` WorkoutUUID any `json:"workoutUuid"` NapStartTimeLocal any `json:"napStartTimeLocal"` PhasedTrainingPlan any `json:"phasedTrainingPlan"` PrimaryEvent bool `json:"primaryEvent"` Subscribed bool `json:"subscribed"` AutoCalcCalories any `json:"autoCalcCalories"` DecoDive any `json:"decoDive"` }
type CalendarPreferences ¶
type CalendarPreferences struct { View int `json:"view"` ShowEvent bool `json:"showEvent"` ShowGoal bool `json:"showGoal"` ShowOptions bool `json:"showOptions"` ShowWorkout bool `json:"showWorkout"` ShowWeeklyTotal bool `json:"showWeeklyTotal"` EventColor int `json:"eventColor"` GoalColor int `json:"goalColor"` WorkoutColor int `json:"workoutColor"` ExpandActivity bool `json:"expandActivity"` ExpandGoal bool `json:"expandGoal"` ExpandCalendar bool `json:"expandCalendar"` ExpandTrainingPlan bool `json:"expandTrainingPlan"` ExpandGroups bool `json:"expandGroups"` Groups any `json:"groups"` TrainingPlans []any `json:"trainingPlans"` ActivityTypes []struct { Key string `json:"key"` Color int `json:"color"` Show bool `json:"show"` } `json:"activityTypes"` HealthTypes []struct { Key string `json:"key"` Show bool `json:"show"` } `json:"healthTypes"` HideJetLag bool `json:"hideJetLag"` }
type CalendarService ¶
type CalendarService service
func (*CalendarService) GetMonthByDate ¶
func (c *CalendarService) GetMonthByDate(date time.Time) (*Calendar, error)
func (*CalendarService) GetWeekByDate ¶
func (c *CalendarService) GetWeekByDate(date time.Time) (*Calendar, error)
func (*CalendarService) GetYear ¶
func (c *CalendarService) GetYear(year int) (*YearCalendar, error)
func (*CalendarService) Preferences ¶
func (c *CalendarService) Preferences() (*CalendarPreferences, error)
func (*CalendarService) RaceEventProviders ¶
func (c *CalendarService) RaceEventProviders() (res []RaceEventProvider, e error)
func (*CalendarService) Upcoming ¶
func (c *CalendarService) Upcoming(days, limit int) (res []UpcomingEvent, e error)
type Client ¶
type ClientOpt ¶
type ClientOpt func(*clientOpts)
func WithCacher ¶
func WithCacher(cacher TokenCacher) ClientOpt
func WithCookieOpts ¶
func WithDomain ¶
func WithMFAHandler ¶
func WithTransport ¶
func WithTransport(transport rt.RoundTripper) ClientOpt
func WithUserAgent ¶
type Course ¶
type Course struct { CourseID int `json:"courseId"` UserProfileID int `json:"userProfileId"` DisplayName string `json:"displayName"` UserGroupID any `json:"userGroupId"` GeoRoutePk any `json:"geoRoutePk"` ActivityType struct { TypeID int `json:"typeId"` TypeKey string `json:"typeKey"` ParentTypeID int `json:"parentTypeId"` IsHidden bool `json:"isHidden"` Restricted bool `json:"restricted"` Trimmable bool `json:"trimmable"` } `json:"activityType"` CourseName string `json:"courseName"` CourseDescription any `json:"courseDescription"` CreatedDate int64 `json:"createdDate"` UpdatedDate int64 `json:"updatedDate"` PrivacyRule struct { TypeID int `json:"typeId"` TypeKey string `json:"typeKey"` } `json:"privacyRule"` DistanceInMeters float64 `json:"distanceInMeters"` ElevationGainInMeters float64 `json:"elevationGainInMeters"` ElevationLossInMeters float64 `json:"elevationLossInMeters"` StartLatitude float64 `json:"startLatitude"` StartLongitude float64 `json:"startLongitude"` SpeedInMetersPerSecond float64 `json:"speedInMetersPerSecond"` SourceTypeID int `json:"sourceTypeId"` SourcePk any `json:"sourcePk"` ElapsedSeconds any `json:"elapsedSeconds"` CoordinateSystem string `json:"coordinateSystem"` OriginalCoordinateSystem string `json:"originalCoordinateSystem"` Consumer any `json:"consumer"` ElevationSource int `json:"elevationSource"` HasPaceBand bool `json:"hasPaceBand"` HasPowerGuide bool `json:"hasPowerGuide"` Favorite bool `json:"favorite"` HasTurnDetectionDisabled bool `json:"hasTurnDetectionDisabled"` CuratedCourseID any `json:"curatedCourseId"` Public bool `json:"public"` ActivityTypeID struct { TypeID int `json:"typeId"` TypeKey string `json:"typeKey"` ParentTypeID int `json:"parentTypeId"` IsHidden bool `json:"isHidden"` Restricted bool `json:"restricted"` Trimmable bool `json:"trimmable"` } `json:"activityTypeId"` CreatedDateFormatted string `json:"createdDateFormatted"` UpdatedDateFormatted string `json:"updatedDateFormatted"` }
type CourseMetadata ¶
type CourseMetadata struct { CourseID int `json:"courseId"` UserProfileID int `json:"userProfileId"` Name string `json:"name"` Description any `json:"description"` ActivityType struct { TypeID int `json:"typeId"` TypeKey string `json:"typeKey"` ParentTypeID int `json:"parentTypeId"` IsHidden bool `json:"isHidden"` Restricted bool `json:"restricted"` Trimmable bool `json:"trimmable"` } `json:"activityType"` PrivacyRule struct { TypeID int `json:"typeId"` TypeKey string `json:"typeKey"` } `json:"privacyRule"` DistanceInMeters float64 `json:"distanceInMeters"` }
type CourseService ¶
type CourseService service
func (*CourseService) Courses ¶
func (cs *CourseService) Courses() (*UserCourses, error)
func (*CourseService) List ¶
func (cs *CourseService) List(userDisplayName string) (*UserCourses, error)
func (*CourseService) Metadata ¶
func (cs *CourseService) Metadata(id int64) (*CourseMetadata, error)
type DailyFitnessAge ¶
type DailyHeartRate ¶
type DailyHeartRate struct { UserProfilePK int `json:"userProfilePK"` CalendarDate string `json:"calendarDate"` StartTimestampGMT string `json:"startTimestampGMT"` EndTimestampGMT string `json:"endTimestampGMT"` StartTimestampLocal string `json:"startTimestampLocal"` EndTimestampLocal string `json:"endTimestampLocal"` MaxHeartRate int `json:"maxHeartRate"` MinHeartRate int `json:"minHeartRate"` RestingHeartRate int `json:"restingHeartRate"` LastSevenDaysAvgRestingHeartRate int `json:"lastSevenDaysAvgRestingHeartRate"` HeartRateValueDescriptors []struct { Key string `json:"key"` Index int `json:"index"` } `json:"heartRateValueDescriptors"` // HeartRateValues is an array of integer pairs that look like [timestamp, heartrate] HeartRateValues [][2]uint64 `json:"heartRateValues"` }
type DailyIntensityMinutes ¶
type DailyIntensityMinutes struct { UserProfilePK int `json:"userProfilePK"` CalendarDate string `json:"calendarDate"` StartTimestampGMT string `json:"startTimestampGMT"` EndTimestampGMT string `json:"endTimestampGMT"` StartTimestampLocal string `json:"startTimestampLocal"` EndTimestampLocal string `json:"endTimestampLocal"` WeeklyModerate int `json:"weeklyModerate"` WeeklyVigorous int `json:"weeklyVigorous"` WeeklyTotal int `json:"weeklyTotal"` WeekGoal int `json:"weekGoal"` DayOfGoalMet string `json:"dayOfGoalMet"` StartDayMinutes int `json:"startDayMinutes"` EndDayMinutes int `json:"endDayMinutes"` ModerateMinutes int `json:"moderateMinutes"` VigorousMinutes int `json:"vigorousMinutes"` ImValueDescriptorsDTOList any `json:"imValueDescriptorsDTOList"` ImValuesArray any `json:"imValuesArray"` }
type DailySleep ¶
type DailySleep struct { DailySleepDTO DailySleepDTO `json:"dailySleepDTO"` RemSleepData bool `json:"remSleepData"` SleepMovement []DurationLevel `json:"sleepMovement"` SleepLevels []DurationLevel `json:"sleepLevels"` SleepRestlessMoments []TimestampedValue `json:"sleepRestlessMoments"` RestlessMomentsCount int `json:"restlessMomentsCount"` WellnessEpochRespirationDataDTOList []WellnessEpochRespirationDataDTOList `json:"wellnessEpochRespirationDataDTOList"` SleepHeartRate []TimestampedValue `json:"sleepHeartRate"` SleepStress []TimestampedValue `json:"sleepStress"` SleepBodyBattery []TimestampedValue `json:"sleepBodyBattery"` HrvData []TimestampedValue `json:"hrvData"` SkinTempDataExists bool `json:"skinTempDataExists"` AvgOvernightHrv float64 `json:"avgOvernightHrv"` HrvStatus string `json:"hrvStatus"` BodyBatteryChange int `json:"bodyBatteryChange"` RestingHeartRate int `json:"restingHeartRate"` }
type DailySleepAverages ¶
type DailySleepAverages struct { SpO2 any `json:"averageSpO2"` LocalSleepStartTime float64 `json:"averageLocalSleepStartTime"` Respiration float64 `json:"averageRespiration"` BodyBatteryChange float64 `json:"averageBodyBatteryChange"` SkinTempF any `json:"averageSkinTempF"` SleepScore float64 `json:"averageSleepScore"` LocalSleepEndTime float64 `json:"averageLocalSleepEndTime"` SkinTempC any `json:"averageSkinTempC"` SleepSeconds float64 `json:"averageSleepSeconds"` SleepNeed float64 `json:"averageSleepNeed"` RestingHeartRate float64 `json:"averageRestingHeartRate"` }
type DailySleepDTO ¶
type DailySleepDTO struct { ID int64 `json:"id"` UserProfilePK int `json:"userProfilePK"` CalendarDate string `json:"calendarDate"` SleepTimeSeconds int `json:"sleepTimeSeconds"` NapTimeSeconds int `json:"napTimeSeconds"` SleepWindowConfirmed bool `json:"sleepWindowConfirmed"` SleepWindowConfirmationType string `json:"sleepWindowConfirmationType"` SleepStartTimestampGMT int64 `json:"sleepStartTimestampGMT"` SleepEndTimestampGMT int64 `json:"sleepEndTimestampGMT"` SleepStartTimestampLocal int64 `json:"sleepStartTimestampLocal"` SleepEndTimestampLocal int64 `json:"sleepEndTimestampLocal"` AutoSleepStartTimestampGMT any `json:"autoSleepStartTimestampGMT"` AutoSleepEndTimestampGMT any `json:"autoSleepEndTimestampGMT"` SleepQualityTypePK any `json:"sleepQualityTypePK"` SleepResultTypePK any `json:"sleepResultTypePK"` UnmeasurableSleepSeconds int `json:"unmeasurableSleepSeconds"` DeepSleepSeconds int `json:"deepSleepSeconds"` LightSleepSeconds int `json:"lightSleepSeconds"` RemSleepSeconds int `json:"remSleepSeconds"` AwakeSleepSeconds int `json:"awakeSleepSeconds"` DeviceRemCapable bool `json:"deviceRemCapable"` Retro bool `json:"retro"` SleepFromDevice bool `json:"sleepFromDevice"` AverageRespirationValue float64 `json:"averageRespirationValue"` LowestRespirationValue float64 `json:"lowestRespirationValue"` HighestRespirationValue float64 `json:"highestRespirationValue"` AwakeCount int `json:"awakeCount"` AvgSleepStress float64 `json:"avgSleepStress"` AgeGroup string `json:"ageGroup"` SleepScoreFeedback string `json:"sleepScoreFeedback"` SleepScoreInsight string `json:"sleepScoreInsight"` SleepScorePersonalizedInsight string `json:"sleepScorePersonalizedInsight"` SleepScores SleepScores `json:"sleepScores"` SleepVersion int `json:"sleepVersion"` SleepNeed SleepNeed `json:"sleepNeed"` NextSleepNeed SleepNeed `json:"nextSleepNeed"` }
type DailySleepStat ¶
type DailySleepStat struct { RemTime int `json:"remTime"` RestingHeartRate int `json:"restingHeartRate"` TotalSleepTimeInSeconds int `json:"totalSleepTimeInSeconds"` Respiration float64 `json:"respiration"` LocalSleepEndTimeInMillis int64 `json:"localSleepEndTimeInMillis"` DeepTime int `json:"deepTime"` AwakeTime int `json:"awakeTime"` SleepScoreQuality string `json:"sleepScoreQuality"` SpO2 any `json:"spO2"` LocalSleepStartTimeInMillis int64 `json:"localSleepStartTimeInMillis"` SleepNeed int `json:"sleepNeed"` BodyBatteryChange int `json:"bodyBatteryChange"` GmtSleepStartTimeInMillis int64 `json:"gmtSleepStartTimeInMillis"` GmtSleepEndTimeInMillis int64 `json:"gmtSleepEndTimeInMillis"` HrvStatus string `json:"hrvStatus"` SkinTempF any `json:"skinTempF"` SleepScore int `json:"sleepScore"` SkinTempC any `json:"skinTempC"` LightTime int `json:"lightTime"` Hrv7DAverage float64 `json:"hrv7dAverage"` }
type DailySleepStats ¶
type DailySleepStats struct { OverallStats DailySleepAverages `json:"overallStats"` IndividualStats []Stat[DailySleepStat] `json:"individualStats"` }
type DailySteps ¶
type DailySteps struct { Values []Stat[DailyStepsStat] `json:"values"` Aggregations StepsAggregations `json:"aggregations"` }
type DailyStepsStat ¶
type DailyStress ¶
type DailyStress struct { UserProfilePK int `json:"userProfilePK"` CalendarDate string `json:"calendarDate"` StartTimestampGMT string `json:"startTimestampGMT"` EndTimestampGMT string `json:"endTimestampGMT"` StartTimestampLocal string `json:"startTimestampLocal"` EndTimestampLocal string `json:"endTimestampLocal"` MaxStressLevel int `json:"maxStressLevel"` AvgStressLevel int `json:"avgStressLevel"` StressChartValueOffset int `json:"stressChartValueOffset"` StressChartYAxisOrigin int `json:"stressChartYAxisOrigin"` StressValueDescriptorsDTOList []struct { Key string `json:"key"` Index int `json:"index"` } `json:"stressValueDescriptorsDTOList"` StressValuesArray [][]any `json:"stressValuesArray"` BodyBatteryValueDescriptorsDTOList []struct { BodyBatteryValueDescriptorIndex int `json:"bodyBatteryValueDescriptorIndex"` BodyBatteryValueDescriptorKey string `json:"bodyBatteryValueDescriptorKey"` } `json:"bodyBatteryValueDescriptorsDTOList"` BodyBatteryValuesArray [][]any `json:"bodyBatteryValuesArray"` }
type DailySummaryChartValue ¶
type DailyWeightSummary ¶
type Device ¶
type Device struct { AppSupport bool `json:"appSupport"` ApplicationKey string `json:"applicationKey"` DeviceTypePk int `json:"deviceTypePk"` BestInClassVideoLink any `json:"bestInClassVideoLink"` BluetoothClassicDevice bool `json:"bluetoothClassicDevice"` BluetoothLowEnergyDevice bool `json:"bluetoothLowEnergyDevice"` DeviceCategories []string `json:"deviceCategories"` DeviceEmbedVideoLink any `json:"deviceEmbedVideoLink"` DeviceSettingsFile string `json:"deviceSettingsFile"` GcmSettingsFile any `json:"gcmSettingsFile"` DeviceVideoPageLink any `json:"deviceVideoPageLink"` DisplayOrder int `json:"displayOrder"` GolfDisplayOrder int `json:"golfDisplayOrder"` HasOpticalHeartRate bool `json:"hasOpticalHeartRate"` Highlighted bool `json:"highlighted"` Hybrid bool `json:"hybrid"` ImageURL string `json:"imageUrl"` MinGCMAndroidVersion int `json:"minGCMAndroidVersion"` MinGCMWindowsVersion int `json:"minGCMWindowsVersion"` MinGCMiOSVersion int `json:"minGCMiOSVersion"` MinGolfAppiOSVersion int `json:"minGolfAppiOSVersion"` MinGolfAppAndroidVersion int `json:"minGolfAppAndroidVersion"` PartNumber string `json:"partNumber"` Primary bool `json:"primary"` ProductDisplayName string `json:"productDisplayName"` DeviceTags any `json:"deviceTags"` ProductSku string `json:"productSku"` Wasp bool `json:"wasp"` WeightScale bool `json:"weightScale"` Wellness bool `json:"wellness"` Wifi bool `json:"wifi"` HasPowerButton bool `json:"hasPowerButton"` SupportsSecondaryUsers bool `json:"supportsSecondaryUsers"` PrimaryApplication string `json:"primaryApplication"` IncompatibleApplications []any `json:"incompatibleApplications"` AbnormalHeartRateAlertCapable bool `json:"abnormalHeartRateAlertCapable"` ActivitySummFitFileCapable bool `json:"activitySummFitFileCapable"` AerobicTrainingEffectCapable bool `json:"aerobicTrainingEffectCapable"` AlarmDaysCapable bool `json:"alarmDaysCapable"` AllDayStressCapable bool `json:"allDayStressCapable"` AnaerobicTrainingEffectCapable bool `json:"anaerobicTrainingEffectCapable"` AtpWorkoutCapable bool `json:"atpWorkoutCapable"` BodyBatteryCapable bool `json:"bodyBatteryCapable"` BrickWorkoutCapable bool `json:"brickWorkoutCapable"` CardioCapable bool `json:"cardioCapable"` CardioOptionCapable bool `json:"cardioOptionCapable"` CardioSportsCapable bool `json:"cardioSportsCapable"` CardioWorkoutCapable bool `json:"cardioWorkoutCapable"` CellularCapable bool `json:"cellularCapable"` ChangeLogCapable bool `json:"changeLogCapable"` ContactManagementCapable bool `json:"contactManagementCapable"` CourseCapable bool `json:"courseCapable"` CourseFileType string `json:"courseFileType"` CoursePromptCapable bool `json:"coursePromptCapable"` CustomIntensityMinutesCapable bool `json:"customIntensityMinutesCapable"` CustomWorkoutCapable bool `json:"customWorkoutCapable"` CyclingSegmentCapable bool `json:"cyclingSegmentCapable"` CyclingSportsCapable bool `json:"cyclingSportsCapable"` CyclingWorkoutCapable bool `json:"cyclingWorkoutCapable"` DefaultSettingCapable bool `json:"defaultSettingCapable"` DeviceSettingCapable bool `json:"deviceSettingCapable"` DeviceSettingFileType any `json:"deviceSettingFileType"` DisplayFieldsExtCapable bool `json:"displayFieldsExtCapable"` DivingCapable bool `json:"divingCapable"` EllipticalOptionCapable bool `json:"ellipticalOptionCapable"` FloorsClimbedGoalCapable bool `json:"floorsClimbedGoalCapable"` FtpCapable bool `json:"ftpCapable"` Gcj02CourseCapable bool `json:"gcj02CourseCapable"` GlonassCapable bool `json:"glonassCapable"` GoalCapable bool `json:"goalCapable"` GoalFileType string `json:"goalFileType"` GolfAppSyncCapable bool `json:"golfAppSyncCapable"` GpsRouteCapable bool `json:"gpsRouteCapable"` HandednessCapable bool `json:"handednessCapable"` HrZoneCapable bool `json:"hrZoneCapable"` HrvStressCapable bool `json:"hrvStressCapable"` IntensityMinutesGoalCapable bool `json:"intensityMinutesGoalCapable"` LactateThresholdCapable bool `json:"lactateThresholdCapable"` LanguageSettingCapable bool `json:"languageSettingCapable"` LanguageSettingFileType any `json:"languageSettingFileType"` LowHrAlertCapable bool `json:"lowHrAlertCapable"` MaxHRCapable bool `json:"maxHRCapable"` MaxWorkoutCount int `json:"maxWorkoutCount"` MetricsFitFileReceiveCapable bool `json:"metricsFitFileReceiveCapable"` MetricsUploadCapable bool `json:"metricsUploadCapable"` MilitaryTimeCapable bool `json:"militaryTimeCapable"` ModerateIntensityMinutesGoalCapable bool `json:"moderateIntensityMinutesGoalCapable"` NfcCapable bool `json:"nfcCapable"` OtherOptionCapable bool `json:"otherOptionCapable"` OtherSportsCapable bool `json:"otherSportsCapable"` PersonalRecordCapable bool `json:"personalRecordCapable"` PersonalRecordFileType string `json:"personalRecordFileType"` PoolSwimOptionCapable bool `json:"poolSwimOptionCapable"` PowerCurveCapable bool `json:"powerCurveCapable"` PowerZonesCapable bool `json:"powerZonesCapable"` PulseOxAllDayCapable bool `json:"pulseOxAllDayCapable"` PulseOxOnDemandCapable bool `json:"pulseOxOnDemandCapable"` PulseOxSleepCapable bool `json:"pulseOxSleepCapable"` RemCapable bool `json:"remCapable"` ReminderAlarmCapable bool `json:"reminderAlarmCapable"` ReorderablePagesCapable bool `json:"reorderablePagesCapable"` RestingHRCapable bool `json:"restingHRCapable"` RideOptionsCapable bool `json:"rideOptionsCapable"` RunOptionIndoorCapable bool `json:"runOptionIndoorCapable"` RunOptionsCapable bool `json:"runOptionsCapable"` RunningSegmentCapable bool `json:"runningSegmentCapable"` RunningSportsCapable bool `json:"runningSportsCapable"` RunningWorkoutCapable bool `json:"runningWorkoutCapable"` ScheduleCapable bool `json:"scheduleCapable"` ScheduleFileType string `json:"scheduleFileType"` SegmentCapable bool `json:"segmentCapable"` SegmentPointCapable bool `json:"segmentPointCapable"` SettingCapable bool `json:"settingCapable"` SettingFileType string `json:"settingFileType"` SleepTimeCapable bool `json:"sleepTimeCapable"` SmallFitFileOnlyCapable bool `json:"smallFitFileOnlyCapable"` SportCapable bool `json:"sportCapable"` SportFileType string `json:"sportFileType"` StairStepperOptionCapable bool `json:"stairStepperOptionCapable"` StrengthOptionsCapable bool `json:"strengthOptionsCapable"` StrengthWorkoutCapable bool `json:"strengthWorkoutCapable"` SupportedHrZones []string `json:"supportedHrZones"` SwimWorkoutCapable bool `json:"swimWorkoutCapable"` TrainingPlanCapable bool `json:"trainingPlanCapable"` TrainingStatusCapable bool `json:"trainingStatusCapable"` TrainingStatusPauseCapable bool `json:"trainingStatusPauseCapable"` UserProfileCapable bool `json:"userProfileCapable"` UserProfileFileType any `json:"userProfileFileType"` UserTcxExportCapable bool `json:"userTcxExportCapable"` Vo2MaxBikeCapable bool `json:"vo2MaxBikeCapable"` Vo2MaxRunCapable bool `json:"vo2MaxRunCapable"` WalkOptionCapable bool `json:"walkOptionCapable"` WalkingSportsCapable bool `json:"walkingSportsCapable"` WeatherAlertsCapable bool `json:"weatherAlertsCapable"` WeatherSettingsCapable bool `json:"weatherSettingsCapable"` WorkoutCapable bool `json:"workoutCapable"` WorkoutFileType string `json:"workoutFileType"` YogaCapable bool `json:"yogaCapable"` YogaOptionCapable bool `json:"yogaOptionCapable"` HeatAndAltitudeAcclimationCapable bool `json:"heatAndAltitudeAcclimationCapable"` TrainingLoadBalanceCapable bool `json:"trainingLoadBalanceCapable"` IndoorTrackOptionsCapable bool `json:"indoorTrackOptionsCapable"` IndoorBikeOptionsCapable bool `json:"indoorBikeOptionsCapable"` IndoorWalkOptionsCapable bool `json:"indoorWalkOptionsCapable"` TrainingEffectLabelCapable bool `json:"trainingEffectLabelCapable"` PacebandCapable bool `json:"pacebandCapable"` RespirationCapable bool `json:"respirationCapable"` OpenWaterSwimOptionCapable bool `json:"openWaterSwimOptionCapable"` PhoneVerificationCheckRequired bool `json:"phoneVerificationCheckRequired"` WeightGoalCapable bool `json:"weightGoalCapable"` YogaWorkoutCapable bool `json:"yogaWorkoutCapable"` PilatesWorkoutCapable bool `json:"pilatesWorkoutCapable"` ConnectedGPSCapable bool `json:"connectedGPSCapable"` DiveAppSyncCapable bool `json:"diveAppSyncCapable"` GolfLiveScoringCapable bool `json:"golfLiveScoringCapable"` SolarPanelUtilizationCapable bool `json:"solarPanelUtilizationCapable"` SweatLossCapable bool `json:"sweatLossCapable"` DiveAlertCapable bool `json:"diveAlertCapable"` RequiresInitialDeviceNickname bool `json:"requiresInitialDeviceNickname"` DefaultSettingsHbaseMigrated bool `json:"defaultSettingsHbaseMigrated"` SleepScoreCapable bool `json:"sleepScoreCapable"` FitnessAgeV2Capable bool `json:"fitnessAgeV2Capable"` IntensityMinutesV2Capable bool `json:"intensityMinutesV2Capable"` CollapsibleControlMenuCapable bool `json:"collapsibleControlMenuCapable"` MeasurementUnitSettingCapable bool `json:"measurementUnitSettingCapable"` OnDeviceSleepCalculationCapable bool `json:"onDeviceSleepCalculationCapable"` HiitWorkoutCapable bool `json:"hiitWorkoutCapable"` RunningHeartRateZoneCapable bool `json:"runningHeartRateZoneCapable"` CyclingHeartRateZoneCapable bool `json:"cyclingHeartRateZoneCapable"` SwimmingHeartRateZoneCapable bool `json:"swimmingHeartRateZoneCapable"` DefaultHeartRateZoneCapable bool `json:"defaultHeartRateZoneCapable"` CyclingPowerZonesCapable bool `json:"cyclingPowerZonesCapable"` XcSkiPowerZonesCapable bool `json:"xcSkiPowerZonesCapable"` SwimAlgorithmCapable bool `json:"swimAlgorithmCapable"` BenchmarkExerciseCapable bool `json:"benchmarkExerciseCapable"` SpectatorMessagingCapable bool `json:"spectatorMessagingCapable"` EcgCapable bool `json:"ecgCapable"` LteLiveEventSharingCapable bool `json:"lteLiveEventSharingCapable"` SleepFitFileReceiveCapable bool `json:"sleepFitFileReceiveCapable"` SecondaryWorkoutStepTargetCapable bool `json:"secondaryWorkoutStepTargetCapable"` AssistancePlusCapable bool `json:"assistancePlusCapable"` PowerGuidanceCapable bool `json:"powerGuidanceCapable"` AirIntegrationCapable bool `json:"airIntegrationCapable"` HealthSnapshotCapable bool `json:"healthSnapshotCapable"` RacePredictionsRunCapable bool `json:"racePredictionsRunCapable"` VivohubCompatible bool `json:"vivohubCompatible"` StepsTrueUpChartCapable bool `json:"stepsTrueUpChartCapable"` SportingEventCapable bool `json:"sportingEventCapable"` SolarChargeCapable bool `json:"solarChargeCapable"` RealTimeSettingsCapable bool `json:"realTimeSettingsCapable"` EmergencyCallingCapable bool `json:"emergencyCallingCapable"` PersonalRepRecordCapable bool `json:"personalRepRecordCapable"` HrvStatusCapable bool `json:"hrvStatusCapable"` TrainingReadinessCapable bool `json:"trainingReadinessCapable"` PublicBetaSoftwareCapable bool `json:"publicBetaSoftwareCapable"` WorkoutAudioPromptsCapable bool `json:"workoutAudioPromptsCapable"` ActualStepRecordingCapable bool `json:"actualStepRecordingCapable"` GroupTrack2Capable bool `json:"groupTrack2Capable"` GolfAppPairingCapable bool `json:"golfAppPairingCapable"` LocalWindConditionsCapable bool `json:"localWindConditionsCapable"` MultipleGolfCourseCapable bool `json:"multipleGolfCourseCapable"` BeaconTrackingCapable bool `json:"beaconTrackingCapable"` BatteryStatusCapable bool `json:"batteryStatusCapable"` RunningPowerZonesCapable bool `json:"runningPowerZonesCapable"` AcuteTrainingLoadCapable bool `json:"acuteTrainingLoadCapable"` CriticalSwimSpeedCapable bool `json:"criticalSwimSpeedCapable"` PrimaryTrainingCapable bool `json:"primaryTrainingCapable"` DayOfWeekSleepWindowCapable bool `json:"dayOfWeekSleepWindowCapable"` GolfCourseDownloadCapable bool `json:"golfCourseDownloadCapable"` LaunchMonitorEventSharingCapable bool `json:"launchMonitorEventSharingCapable"` LhaBackupCapable bool `json:"lhaBackupCapable"` JetlagCapable bool `json:"jetlagCapable"` BloodPressureCapable bool `json:"bloodPressureCapable"` BbiRecordingCapable bool `json:"bbiRecordingCapable"` WheelchairCapable bool `json:"wheelchairCapable"` PrimaryActivityTrackerSettingCapable bool `json:"primaryActivityTrackerSettingCapable"` SetBodyCompositionCapable bool `json:"setBodyCompositionCapable"` AcuteChronicWorkloadRatioCapable bool `json:"acuteChronicWorkloadRatioCapable"` SleepNeedCapable bool `json:"sleepNeedCapable"` WearableBackupRestoreCapable bool `json:"wearableBackupRestoreCapable"` CyclingComputerBackupRestoreCapable bool `json:"cyclingComputerBackupRestoreCapable"` DescriptiveTrainingEffectCapable bool `json:"descriptiveTrainingEffectCapable"` SleepSkinTemperatureCapable bool `json:"sleepSkinTemperatureCapable"` RunningLactateThresholdCapable bool `json:"runningLactateThresholdCapable"` AltitudeAcclimationPercentageCapable bool `json:"altitudeAcclimationPercentageCapable"` HillScoreAndEnduranceScoreCapable bool `json:"hillScoreAndEnduranceScoreCapable"` SwimWorkout2Capable bool `json:"swimWorkout2Capable"` EnhancedWorkoutStepCapable bool `json:"enhancedWorkoutStepCapable"` PrimaryTrainingBackupCapable bool `json:"primaryTrainingBackupCapable"` HideSoftwareUpdateVersionCapable bool `json:"hideSoftwareUpdateVersionCapable"` AdaptiveCoachingScheduleCapable bool `json:"adaptiveCoachingScheduleCapable"` OpenWaterSwimWorkoutCapable bool `json:"openWaterSwimWorkoutCapable"` MultisportWorkoutCapable bool `json:"multisportWorkoutCapable"` FullNameSettingsCapable bool `json:"fullNameSettingsCapable"` BodyBatteryTrueUpCapable bool `json:"bodyBatteryTrueUpCapable"` SkipLastWorkoutStepInRepeatBlockCapable bool `json:"skipLastWorkoutStepInRepeatBlockCapable"` AdaptiveCoachingStrengthCapable bool `json:"adaptiveCoachingStrengthCapable"` MobilityWorkoutCapable bool `json:"mobilityWorkoutCapable"` CoursePlannerCapable bool `json:"coursePlannerCapable"` TrainableTriathlonEventCapable bool `json:"trainableTriathlonEventCapable"` PasscodeLockCapable bool `json:"passcodeLockCapable"` StrengthTrainingPlanCapable bool `json:"strengthTrainingPlanCapable"` BreathingDisruptionsCapable bool `json:"breathingDisruptionsCapable"` StandaloneFirstbeatActivityProcessingCapable bool `json:"standaloneFirstbeatActivityProcessingCapable"` Rts20Capable bool `json:"rts20Capable"` Datasource string `json:"datasource"` DeviceStatus string `json:"deviceStatus"` RegisteredDate int64 `json:"registeredDate"` ActualProductSku string `json:"actualProductSku"` VivohubConfigurable any `json:"vivohubConfigurable"` CorporateDevice bool `json:"corporateDevice"` PrePairedWithHRM bool `json:"prePairedWithHRM"` UnRetirable bool `json:"unRetirable"` SerialNumber string `json:"serialNumber"` ShortName any `json:"shortName"` DisplayName string `json:"displayName"` DeviceID int64 `json:"deviceId"` UnitID int64 `json:"unitId"` WifiSetup bool `json:"wifiSetup"` CurrentFirmwareVersion string `json:"currentFirmwareVersion"` CurrentFirmwareVersionMajor int `json:"currentFirmwareVersionMajor"` CurrentFirmwareVersionMinor int `json:"currentFirmwareVersionMinor"` ActiveInd int `json:"activeInd"` PrimaryActivityTrackerIndicator bool `json:"primaryActivityTrackerIndicator"` IsPrimaryUser bool `json:"isPrimaryUser"` OtherAssociation bool `json:"otherAssociation"` }
type DeviceLastUsed ¶
type DeviceLastUsed struct { UserDeviceID int64 `json:"userDeviceId"` UserProfileNumber int `json:"userProfileNumber"` ApplicationNumber int `json:"applicationNumber"` LastUsedDeviceApplicationKey string `json:"lastUsedDeviceApplicationKey"` LastUsedDeviceName string `json:"lastUsedDeviceName"` LastUsedDeviceUploadTime int64 `json:"lastUsedDeviceUploadTime"` ImageURL string `json:"imageUrl"` Released bool `json:"released"` }
type DeviceMessage ¶
type DeviceMessage struct { DeviceID int64 `json:"deviceId"` MessageURL string `json:"messageUrl"` MessageType string `json:"messageType"` MessageName string `json:"messageName"` GroupName any `json:"groupName"` Priority int `json:"priority"` FileType string `json:"fileType"` MetaDataID int64 `json:"metaDataId"` }
type DeviceMessages ¶
type DeviceService ¶
type DeviceService service
func (*DeviceService) DeviceMessageCount ¶
func (d *DeviceService) DeviceMessageCount() (c int, e error)
func (*DeviceService) DeviceMessages ¶
func (d *DeviceService) DeviceMessages() (*DeviceMessages, error)
func (*DeviceService) Devices ¶
func (d *DeviceService) Devices() (res []Device, e error)
func (*DeviceService) DevicesByUser ¶
func (d *DeviceService) DevicesByUser(userUUID string) (res []Device, e error)
func (*DeviceService) LastUsed ¶
func (d *DeviceService) LastUsed() (*DeviceLastUsed, error)
func (*DeviceService) PrimaryTrainingDevice ¶
func (d *DeviceService) PrimaryTrainingDevice() (*PrimaryTrainingDevice, error)
func (*DeviceService) SendCourceToDevice ¶
func (d *DeviceService) SendCourceToDevice(deviceID, courseID int64, courseName string) error
func (*DeviceService) SendDeviceMessages ¶
func (d *DeviceService) SendDeviceMessages(msgs []DeviceMessage) (res []UploadedDeviceMessage, err error)
func (*DeviceService) UserDevice ¶
func (d *DeviceService) UserDevice(deviceID int64) (*UserDevice, error)
type DurationLevel ¶
type DurationLevel struct { StartGMT string `json:"startGMT"` EndGMT string `json:"endGMT"` ActivityLevel float64 `json:"activityLevel"` }
DurationLevel holds the value of the level and the start/end timestamp
type EventRequest ¶
type FileTokenCacher ¶
type FileTokenCacher struct { Path string // contains filtered or unexported fields }
func NewFileTokenCacher ¶
func NewFileTokenCacher(p string) *FileTokenCacher
func (*FileTokenCacher) DelAccessToken ¶
func (ftc *FileTokenCacher) DelAccessToken() (err error)
func (*FileTokenCacher) DelOAuth1Token ¶
func (ftc *FileTokenCacher) DelOAuth1Token() (err error)
func (*FileTokenCacher) GetAccessToken ¶
func (ftc *FileTokenCacher) GetAccessToken() (*AccessToken, error)
func (*FileTokenCacher) GetOAuth1Token ¶
func (ftc *FileTokenCacher) GetOAuth1Token() (*OAuth1Token, error)
func (*FileTokenCacher) SaveAccessToken ¶
func (ftc *FileTokenCacher) SaveAccessToken(at *AccessToken) error
func (*FileTokenCacher) SaveOAuth1Token ¶
func (ftc *FileTokenCacher) SaveOAuth1Token(token *OAuth1Token) error
type FitnessAge ¶
type FitnessAge struct { ChronologicalAge int `json:"chronologicalAge"` FitnessAge float64 `json:"fitnessAge"` AchievableFitnessAge float64 `json:"achievableFitnessAge"` PreviousFitnessAge float64 `json:"previousFitnessAge"` Components FitnessAgeComponents `json:"components"` LastUpdated string `json:"lastUpdated"` }
type FitnessAgeBMI ¶
type FitnessAgeBMI struct { Value float64 `json:"value"` TargetValue float64 `json:"targetValue"` ImprovementValue float64 `json:"improvementValue"` PotentialAge float64 `json:"potentialAge"` Priority int `json:"priority"` Stale bool `json:"stale"` LastMeasurementDate string `json:"lastMeasurementDate"` }
type FitnessAgeComponents ¶
type FitnessAgeComponents struct { VigorousDaysAvg FitnessAgeVigorousDaysAvg `json:"vigorousDaysAvg"` RHR FitnessAgeRHR `json:"rhr"` VigorousMinutesAvg FitnessAgeVigorousMinutesAvg `json:"vigorousMinutesAvg"` BMI FitnessAgeBMI `json:"bmi"` }
type FitnessAgeRHR ¶
type FitnessAgeService ¶
type FitnessAgeService service
func (*FitnessAgeService) Daily ¶
func (fas *FitnessAgeService) Daily(start, end time.Time) (res []Stat[DailyFitnessAge], e error)
func (*FitnessAgeService) FitnessAge ¶
func (fas *FitnessAgeService) FitnessAge(date time.Time) (*FitnessAge, error)
func (*FitnessAgeService) Weekly ¶
func (fas *FitnessAgeService) Weekly(start time.Time, weeks int) (res []Stat[WeeklyFitnessAge], e error)
type FitnessStatsService ¶
type FitnessStatsService service
func (*FitnessStatsService) AvailableMetrics ¶
func (fs *FitnessStatsService) AvailableMetrics(activities []string) (map[string][]string, error)
type HeartRateStat ¶
type HourlyIntensityMinutes ¶
type HourlyIntensityMinutes struct { WeeklyGoal int `json:"weeklyGoal"` DailyStats []struct { CalendarDate string `json:"calendarDate"` StartTimestampGMT string `json:"startTimestampGMT"` EndTimestampGMT string `json:"endTimestampGMT"` TimezoneOffset int `json:"timezoneOffset"` VigorousMinutes int `json:"vigorousMinutes"` ModerateMinutes int `json:"moderateMinutes"` ValueDescriptors any `json:"valueDescriptors"` HourlyValues any `json:"hourlyValues"` } `json:"dailyStats"` }
type InMemTokenCacher ¶
type InMemTokenCacher struct {
// contains filtered or unexported fields
}
func (*InMemTokenCacher) DelAccessToken ¶
func (imtc *InMemTokenCacher) DelAccessToken() error
func (*InMemTokenCacher) DelOAuth1Token ¶
func (imtc *InMemTokenCacher) DelOAuth1Token() error
func (*InMemTokenCacher) GetAccessToken ¶
func (imtc *InMemTokenCacher) GetAccessToken() (*AccessToken, error)
func (*InMemTokenCacher) GetOAuth1Token ¶
func (imtc *InMemTokenCacher) GetOAuth1Token() (*OAuth1Token, error)
func (*InMemTokenCacher) SaveAccessToken ¶
func (imtc *InMemTokenCacher) SaveAccessToken(at *AccessToken) error
func (*InMemTokenCacher) SaveOAuth1Token ¶
func (imtc *InMemTokenCacher) SaveOAuth1Token(token *OAuth1Token) error
type IntensityMinutesStat ¶
type LapDTO ¶
type LapDTO struct { StartTimeGMT string `json:"startTimeGMT"` StartLatitude float64 `json:"startLatitude"` StartLongitude float64 `json:"startLongitude"` Distance float64 `json:"distance"` Duration float64 `json:"duration"` MovingDuration float64 `json:"movingDuration"` ElapsedDuration float64 `json:"elapsedDuration"` ElevationGain float64 `json:"elevationGain"` ElevationLoss float64 `json:"elevationLoss"` MaxElevation float64 `json:"maxElevation"` MinElevation float64 `json:"minElevation"` AverageSpeed float64 `json:"averageSpeed"` AverageMovingSpeed float64 `json:"averageMovingSpeed"` MaxSpeed float64 `json:"maxSpeed"` Calories float64 `json:"calories"` BmrCalories float64 `json:"bmrCalories"` AverageHR float64 `json:"averageHR"` MaxHR float64 `json:"maxHR"` AverageRunCadence float64 `json:"averageRunCadence"` MaxRunCadence float64 `json:"maxRunCadence"` AveragePower float64 `json:"averagePower"` MaxPower float64 `json:"maxPower"` MinPower float64 `json:"minPower"` NormalizedPower float64 `json:"normalizedPower"` TotalWork float64 `json:"totalWork"` GroundContactTime float64 `json:"groundContactTime"` StrideLength float64 `json:"strideLength"` VerticalOscillation float64 `json:"verticalOscillation"` VerticalRatio float64 `json:"verticalRatio"` EndLatitude float64 `json:"endLatitude"` EndLongitude float64 `json:"endLongitude"` MaxVerticalSpeed float64 `json:"maxVerticalSpeed"` AvgGradeAdjustedSpeed float64 `json:"avgGradeAdjustedSpeed"` LapIndex int `json:"lapIndex"` LengthDTOs []any `json:"lengthDTOs"` ConnectIQMeasurement []any `json:"connectIQMeasurement"` IntensityType string `json:"intensityType"` MessageIndex int `json:"messageIndex"` }
type ListedActivity ¶
type ListedActivity struct { ID int64 `json:"activityId"` Name string `json:"activityName"` StartTimeLocal string `json:"startTimeLocal"` StartTimeGMT string `json:"startTimeGMT"` ActivityType ActivityType `json:"activityType"` EventType EventType `json:"eventType"` Distance float64 `json:"distance"` Duration float64 `json:"duration"` ElapsedDuration float64 `json:"elapsedDuration"` MovingDuration float64 `json:"movingDuration"` ElevationGain float64 `json:"elevationGain"` ElevationLoss float64 `json:"elevationLoss"` AverageSpeed float64 `json:"averageSpeed"` MaxSpeed float64 `json:"maxSpeed"` StartLatitude float64 `json:"startLatitude"` StartLongitude float64 `json:"startLongitude"` HasPolyline bool `json:"hasPolyline"` HasImages bool `json:"hasImages"` OwnerID int `json:"ownerId"` OwnerDisplayName string `json:"ownerDisplayName"` OwnerFullName string `json:"ownerFullName"` OwnerProfileImageURLSmall string `json:"ownerProfileImageUrlSmall"` OwnerProfileImageURLMedium string `json:"ownerProfileImageUrlMedium"` OwnerProfileImageURLLarge string `json:"ownerProfileImageUrlLarge"` Calories float64 `json:"calories"` BmrCalories float64 `json:"bmrCalories"` AverageHR float64 `json:"averageHR"` MaxHR float64 `json:"maxHR"` AverageRunningCadenceInStepsPerMinute float64 `json:"averageRunningCadenceInStepsPerMinute"` MaxRunningCadenceInStepsPerMinute float64 `json:"maxRunningCadenceInStepsPerMinute"` Steps int `json:"steps"` UserRoles []string `json:"userRoles"` Privacy struct { TypeID int `json:"typeId"` TypeKey string `json:"typeKey"` } `json:"privacy"` UserPro bool `json:"userPro"` CourseID int `json:"courseId,omitempty"` HasVideo bool `json:"hasVideo"` TimeZoneID int `json:"timeZoneId"` BeginTimestamp int64 `json:"beginTimestamp"` SportTypeID int `json:"sportTypeId"` AvgPower float64 `json:"avgPower"` MaxPower float64 `json:"maxPower"` AerobicTrainingEffect float64 `json:"aerobicTrainingEffect"` AnaerobicTrainingEffect float64 `json:"anaerobicTrainingEffect"` NormPower float64 `json:"normPower"` AvgVerticalOscillation float64 `json:"avgVerticalOscillation"` AvgGroundContactTime float64 `json:"avgGroundContactTime"` AvgStrideLength float64 `json:"avgStrideLength"` VO2MaxValue float64 `json:"vO2MaxValue"` AvgVerticalRatio float64 `json:"avgVerticalRatio"` DeviceID int64 `json:"deviceId"` MinElevation float64 `json:"minElevation"` MaxElevation float64 `json:"maxElevation"` MaxDoubleCadence float64 `json:"maxDoubleCadence"` SummarizedDiveInfo struct { SummarizedDiveGases []any `json:"summarizedDiveGases"` } `json:"summarizedDiveInfo"` MaxVerticalSpeed float64 `json:"maxVerticalSpeed"` Manufacturer string `json:"manufacturer"` LocationName string `json:"locationName"` LapCount int `json:"lapCount"` EndLatitude float64 `json:"endLatitude"` EndLongitude float64 `json:"endLongitude"` WaterEstimated float64 `json:"waterEstimated"` TrainingEffectLabel string `json:"trainingEffectLabel"` ActivityTrainingLoad float64 `json:"activityTrainingLoad"` MinActivityLapDuration float64 `json:"minActivityLapDuration"` AerobicTrainingEffectMessage string `json:"aerobicTrainingEffectMessage"` AnaerobicTrainingEffectMessage string `json:"anaerobicTrainingEffectMessage"` SplitSummaries []ListedActivitySplitSummary `json:"splitSummaries"` HasSplits bool `json:"hasSplits"` ModerateIntensityMinutes int `json:"moderateIntensityMinutes"` VigorousIntensityMinutes int `json:"vigorousIntensityMinutes"` AvgGradeAdjustedSpeed float64 `json:"avgGradeAdjustedSpeed"` DifferenceBodyBattery int `json:"differenceBodyBattery"` Pr bool `json:"pr"` AutoCalcCalories bool `json:"autoCalcCalories"` ElevationCorrected bool `json:"elevationCorrected"` AtpActivity bool `json:"atpActivity"` Favorite bool `json:"favorite"` DecoDive bool `json:"decoDive"` Parent bool `json:"parent"` Purposeful bool `json:"purposeful"` ManualActivity bool `json:"manualActivity"` }
type ListedActivitySplitSummary ¶
type ListedActivitySplitSummary struct { NoOfSplits int `json:"noOfSplits"` TotalAscent float64 `json:"totalAscent"` Duration float64 `json:"duration"` SplitType string `json:"splitType"` NumClimbSends int `json:"numClimbSends"` MaxElevationGain float64 `json:"maxElevationGain"` AverageElevationGain float64 `json:"averageElevationGain"` MaxDistance int `json:"maxDistance"` Distance float64 `json:"distance"` AverageSpeed float64 `json:"averageSpeed"` MaxSpeed float64 `json:"maxSpeed"` NumFalls int `json:"numFalls"` ElevationLoss float64 `json:"elevationLoss"` }
type MonthlyStepsStat ¶
type OAuth1Token ¶
type PersonalInformation ¶
type PersonalInformation struct { UserInfo struct { BirthDate string `json:"birthDate"` GenderType string `json:"genderType"` Email string `json:"email"` Locale string `json:"locale"` TimeZone string `json:"timeZone"` Age int `json:"age"` CountryCode string `json:"countryCode"` } `json:"userInfo"` BiometricProfile struct { UserID int `json:"userId"` Height float64 `json:"height"` Weight float64 `json:"weight"` Vo2Max float64 `json:"vo2Max"` Vo2MaxCycling any `json:"vo2MaxCycling"` LactateThresholdHeartRate any `json:"lactateThresholdHeartRate"` ActivityClass any `json:"activityClass"` FunctionalThresholdPower any `json:"functionalThresholdPower"` CriticalSwimSpeed any `json:"criticalSwimSpeed"` } `json:"biometricProfile"` TimeZone string `json:"timeZone"` Locale string `json:"locale"` Gender string `json:"gender"` BirthDate string `json:"birthDate"` }
type PersonalRecord ¶
type PersonalRecord struct { ID int64 `json:"id"` TypeID int `json:"typeId"` ActivityID int64 `json:"activityId"` ActivityName string `json:"activityName"` ActivityType string `json:"activityType"` ActivityStartDateTimeInGMT int64 `json:"activityStartDateTimeInGMT"` ActStartDateTimeInGMTFormatted string `json:"actStartDateTimeInGMTFormatted"` ActivityStartDateTimeLocal int64 `json:"activityStartDateTimeLocal"` ActivityStartDateTimeLocalFormatted string `json:"activityStartDateTimeLocalFormatted"` Value float64 `json:"value"` PrStartTimeGmt int64 `json:"prStartTimeGmt"` PrStartTimeGmtFormatted string `json:"prStartTimeGmtFormatted"` PrStartTimeLocal int64 `json:"prStartTimeLocal"` PrStartTimeLocalFormatted string `json:"prStartTimeLocalFormatted"` PrTypeLabelKey any `json:"prTypeLabelKey"` PoolLengthUnit any `json:"poolLengthUnit"` }
type PersonalRecordService ¶
type PersonalRecordService service
func (*PersonalRecordService) Candidate ¶
func (prs *PersonalRecordService) Candidate(userUUID string) (res []PersonalRecord, e error)
func (*PersonalRecordService) PRs ¶
func (prs *PersonalRecordService) PRs(userUUID string) (res []PersonalRecord, e error)
func (*PersonalRecordService) PersonalRecordTypes ¶
func (prs *PersonalRecordService) PersonalRecordTypes(userUUID string) (res []PersonalRecordType, err error)
type PersonalRecordType ¶
type PrimaryTrainingDevice ¶
type PrimaryTrainingDevice struct { PrimaryTrainingDevice struct { DeviceID int64 `json:"deviceId"` } `json:"PrimaryTrainingDevice"` WearableDevices struct { DeviceWeights []struct { DisplayName string `json:"displayName"` DeviceID int64 `json:"deviceId"` ImageURL string `json:"imageUrl"` Weight int `json:"weight"` PrimaryTrainingCapable bool `json:"primaryTrainingCapable"` LhaBackupCapable bool `json:"lhaBackupCapable"` PrimaryWearableDevice bool `json:"primaryWearableDevice"` } `json:"deviceWeights"` WearableDeviceCount int `json:"wearableDeviceCount"` } `json:"WearableDevices"` TrainingStatusOnlyDevices struct { DeviceWeights []any `json:"deviceWeights"` } `json:"TrainingStatusOnlyDevices"` PrimaryTrainingDevices struct { DeviceWeights []struct { DisplayName string `json:"displayName"` DeviceID int64 `json:"deviceId"` ImageURL string `json:"imageUrl"` Weight int `json:"weight"` PrimaryTrainingCapable bool `json:"primaryTrainingCapable"` LhaBackupCapable bool `json:"lhaBackupCapable"` PrimaryWearableDevice bool `json:"primaryWearableDevice"` } `json:"deviceWeights"` PrimaryTrainingDeviceCount int `json:"primaryTrainingDeviceCount"` } `json:"PrimaryTrainingDevices"` RegisteredDevices []Device `json:"RegisteredDevices"` }
type ProfileStatus ¶
type ProfileStatus struct { UserProfileID int `json:"userProfileId"` DisplayName string `json:"displayName"` ConnectionCount int `json:"connectionCount"` ConnectionRequestID any `json:"connectionRequestId"` ConnectionRequestorID any `json:"connectionRequestorId"` UserConnectionStatus int `json:"userConnectionStatus"` FollowerCount int `json:"followerCount"` UserRoles []string `json:"userRoles"` UserPro bool `json:"userPro"` }
type PublicSocialProfile ¶
type PublicSocialProfile struct { ID int `json:"id"` ProfileID int `json:"profileId"` DisplayName string `json:"displayName"` ImageType string `json:"profileImageType"` ImageURLLarge string `json:"profileImageUrlLarge"` ImageURLMedium string `json:"profileImageUrlMedium"` ImageURLSmall string `json:"profileImageUrlSmall"` ProfileVisibility string `json:"profileVisibility"` ActivityHeartRateVisibility string `json:"activityHeartRateVisibility"` ActivityPowerVisibility string `json:"activityPowerVisibility"` FullName string `json:"fullName"` Location any `json:"location"` UserLevel int `json:"userLevel"` UserPoint int `json:"userPoint"` LevelUpdateDate string `json:"levelUpdateDate"` LevelIsViewed bool `json:"levelIsViewed"` LevelPointThreshold int `json:"levelPointThreshold"` IsBlocked bool `json:"isBlocked"` }
type PulseOxCapable ¶
type RaceEventProvider ¶
type RaceSearchRequest ¶
type RaceSearchResult ¶
type RaceSearchResult struct { Provider string `json:"provider"` EventRef string `json:"eventRef"` EventName string `json:"eventName"` EventDate string `json:"eventDate"` EventStartTime any `json:"eventStartTime"` EventURL string `json:"eventUrl"` RegistrationURL any `json:"registrationUrl"` CompletionTargets []struct { Value float64 `json:"value"` Unit string `json:"unit"` } `json:"completionTargets"` LocationStartPoint struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` } `json:"locationStartPoint"` EventType string `json:"eventType"` DistanceToEvent int `json:"distanceToEvent"` AdministrativeArea struct { CountryCode string `json:"countryCode"` CityEn string `json:"cityEn"` StateEn string `json:"stateEn"` CityNative string `json:"cityNative"` StateNative string `json:"stateNative"` NativeLocale string `json:"nativeLocale"` } `json:"administrativeArea"` HasCourse bool `json:"hasCourse"` VerifiedStatus string `json:"verifiedStatus"` GarminEventUUID string `json:"garminEventUuid"` Sig string `json:"sig"` DetailsEndpoints []struct { View string `json:"view"` URL string `json:"url"` } `json:"detailsEndpoints"` IsOfficial bool `json:"isOfficial"` }
type Refresher ¶
type Refresher interface {
Refresh(*AccessToken) (*AccessToken, error)
}
type SegmentLeaderboard ¶
type SegmentLeaderboard struct { UserOptionalFeaturePK string `json:"userOptionalFeaturePK"` UserProfilePK string `json:"userProfilePK"` OptionalFeatureType string `json:"optionalFeatureType"` UserOptionType string `json:"userOptionType"` CreateDate string `json:"createDate"` UpdateDate string `json:"updateDate"` }
type Settings ¶
type Settings struct { DisplayName string `json:"displayName"` PreferredLocale string `json:"preferredLocale"` MeasurementSystem string `json:"measurementSystem"` FirstDayOfWeek struct { DayID int `json:"dayId"` DayName string `json:"dayName"` SortOrder int `json:"sortOrder"` IsPossibleFirstDay bool `json:"isPossibleFirstDay"` } `json:"firstDayOfWeek"` NumberFormat string `json:"numberFormat"` TimeFormat struct { FormatID int `json:"formatId"` FormatKey string `json:"formatKey"` MinFraction int `json:"minFraction"` MaxFraction int `json:"maxFraction"` GroupingUsed bool `json:"groupingUsed"` DisplayFormat string `json:"displayFormat"` } `json:"timeFormat"` DateFormat struct { FormatID int `json:"formatId"` FormatKey string `json:"formatKey"` MinFraction int `json:"minFraction"` MaxFraction int `json:"maxFraction"` GroupingUsed bool `json:"groupingUsed"` DisplayFormat string `json:"displayFormat"` } `json:"dateFormat"` PowerFormat struct { FormatID int `json:"formatId"` FormatKey string `json:"formatKey"` MinFraction int `json:"minFraction"` MaxFraction int `json:"maxFraction"` GroupingUsed bool `json:"groupingUsed"` DisplayFormat any `json:"displayFormat"` } `json:"powerFormat"` HeartRateFormat struct { FormatID int `json:"formatId"` FormatKey string `json:"formatKey"` MinFraction int `json:"minFraction"` MaxFraction int `json:"maxFraction"` GroupingUsed bool `json:"groupingUsed"` DisplayFormat any `json:"displayFormat"` } `json:"heartRateFormat"` TimeZone string `json:"timeZone"` HydrationMeasurementUnit string `json:"hydrationMeasurementUnit"` HydrationContainers []struct { Name any `json:"name"` Volume int `json:"volume"` Unit string `json:"unit"` } `json:"hydrationContainers"` GolfDistanceUnit string `json:"golfDistanceUnit"` GolfElevationUnit any `json:"golfElevationUnit"` GolfSpeedUnit any `json:"golfSpeedUnit"` AvailableTrainingDays any `json:"availableTrainingDays"` PreferredLongTrainingDays any `json:"preferredLongTrainingDays"` }
type SharableEvent ¶
type SharableEvent struct { ID int `json:"id"` GroupID any `json:"groupId"` EventName string `json:"eventName"` Date string `json:"date"` URL string `json:"url"` RegistrationURL string `json:"registrationUrl"` CourseID any `json:"courseId"` CompletionTarget struct { Value float64 `json:"value"` Unit string `json:"unit"` UnitType string `json:"unitType"` } `json:"completionTarget"` EventTimeLocal struct { StartTimeHhMm string `json:"startTimeHhMm"` TimeZoneID string `json:"timeZoneId"` } `json:"eventTimeLocal"` Note any `json:"note"` WorkoutID any `json:"workoutId"` EventImageUUID any `json:"eventImageUUID"` Location string `json:"location"` LocationStartPoint struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` } `json:"locationStartPoint"` EventType string `json:"eventType"` EventPrivacy struct { Label string `json:"label"` IsShareable bool `json:"isShareable"` IsDiscoverable bool `json:"isDiscoverable"` } `json:"eventPrivacy"` EventCustomization struct { CustomGoal struct { Value float64 `json:"value"` Unit string `json:"unit"` UnitType string `json:"unitType"` } `json:"customGoal"` IsPrimaryEvent bool `json:"isPrimaryEvent"` AssociatedWithActivityID any `json:"associatedWithActivityId"` IsTrainingEvent bool `json:"isTrainingEvent"` IsGoalMet any `json:"isGoalMet"` TrainingPlanID any `json:"trainingPlanId"` TrainingPlanType any `json:"trainingPlanType"` } `json:"eventCustomization"` Provider string `json:"provider"` EventRef string `json:"eventRef"` Statuses any `json:"statuses"` CourseName any `json:"courseName"` WorkoutName any `json:"workoutName"` EventImageURLs any `json:"eventImageURLs"` Race bool `json:"race"` Subscribed bool `json:"subscribed"` EventOrganizer bool `json:"eventOrganizer"` }
GET https://connect.garmin.com/calendar-service/event/e108b689-6e93-47d3-b4c6-5686fa68b6fb/shareable
type SleepNeed ¶
type SleepNeed struct { UserProfilePk int `json:"userProfilePk"` CalendarDate string `json:"calendarDate"` DeviceID int64 `json:"deviceId"` TimestampGmt string `json:"timestampGmt"` Baseline int `json:"baseline"` Actual int `json:"actual"` Feedback string `json:"feedback"` TrainingFeedback string `json:"trainingFeedback"` SleepHistoryAdjustment string `json:"sleepHistoryAdjustment"` HrvAdjustment string `json:"hrvAdjustment"` NapAdjustment string `json:"napAdjustment"` DisplayedForTheDay bool `json:"displayedForTheDay"` PreferredActivityTracker bool `json:"preferredActivityTracker"` }
type SleepScorePercentage ¶
type SleepScoreRangedRating ¶
type SleepScoreValueRating ¶
type SleepScores ¶
type SleepScores struct { TotalDuration SleepScoreRangedRating `json:"totalDuration"` Stress SleepScoreRangedRating `json:"stress"` AwakeCount SleepScoreRangedRating `json:"awakeCount"` Overall SleepScoreValueRating `json:"overall"` RemPercentage SleepScorePercentage `json:"remPercentage"` Restlessness SleepScoreRangedRating `json:"restlessness"` LightPercentage SleepScorePercentage `json:"lightPercentage"` DeepPercentage SleepScorePercentage `json:"deepPercentage"` }
type SleepService ¶
type SleepService service
func (*SleepService) Daily ¶
func (ss *SleepService) Daily(date time.Time, nonSleepBufferMinutes int) (*DailySleep, error)
func (*SleepService) DailySleepStats ¶
func (ss *SleepService) DailySleepStats(start, end time.Time) (*DailySleepStats, error)
func (*SleepService) WeeklySleepStats ¶
func (ss *SleepService) WeeklySleepStats(weeks int, end time.Time) (*WeeklySleepStats, error)
type SocialProfile ¶
type SocialProfile struct { ID int64 `json:"id"` ProfileID int64 `json:"profileId"` GarminGUID string `json:"garminGUID"` DisplayName string `json:"displayName"` FullName string `json:"fullName"` UserName string `json:"userName"` ProfileImageType string `json:"profileImageType"` ProfileImageURLLarge string `json:"profileImageUrlLarge"` ProfileImageURLMedium string `json:"profileImageUrlMedium"` ProfileImageURLSmall string `json:"profileImageUrlSmall"` Location string `json:"location"` FacebookURL string `json:"facebookUrl"` TwitterURL string `json:"twitterUrl"` PersonalWebsite *string `json:"personalWebsite"` Motivation *string `json:"motivation"` Bio *string `json:"bio"` PrimaryActivity *string `json:"primaryActivity"` FavoriteActivityTypes []any `json:"favoriteActivityTypes"` RunningTrainingSpeed float64 `json:"runningTrainingSpeed"` CyclingTrainingSpeed float64 `json:"cyclingTrainingSpeed"` FavoriteCyclingActivityTypes []any `json:"favoriteCyclingActivityTypes"` CyclingClassification any `json:"cyclingClassification"` CyclingMaxAvgPower float64 `json:"cyclingMaxAvgPower"` SwimmingTrainingSpeed float64 `json:"swimmingTrainingSpeed"` ProfileVisibility string `json:"profileVisibility"` ActivityStartVisibility string `json:"activityStartVisibility"` ActivityMapVisibility string `json:"activityMapVisibility"` CourseVisibility string `json:"courseVisibility"` ActivityHeartRateVisibility string `json:"activityHeartRateVisibility"` ActivityPowerVisibility string `json:"activityPowerVisibility"` BadgeVisibility string `json:"badgeVisibility"` ShowAge bool `json:"showAge"` ShowWeight bool `json:"showWeight"` ShowHeight bool `json:"showHeight"` ShowWeightClass bool `json:"showWeightClass"` ShowAgeRange bool `json:"showAgeRange"` ShowGender bool `json:"showGender"` ShowActivityClass bool `json:"showActivityClass"` ShowVO2Max bool `json:"showVO2Max"` ShowPersonalRecords bool `json:"showPersonalRecords"` ShowLast12Months bool `json:"showLast12Months"` ShowLifetimeTotals bool `json:"showLifetimeTotals"` ShowUpcomingEvents bool `json:"showUpcomingEvents"` ShowRecentFavorites bool `json:"showRecentFavorites"` ShowRecentDevice bool `json:"showRecentDevice"` ShowRecentGear bool `json:"showRecentGear"` ShowBadges bool `json:"showBadges"` OtherActivity *string `json:"otherActivity"` OtherPrimaryActivity *string `json:"otherPrimaryActivity"` OtherMotivation *string `json:"otherMotivation"` UserRoles []string `json:"userRoles"` NameApproved bool `json:"nameApproved"` UserProfileFullName string `json:"userProfileFullName"` MakeGolfScorecardsPrivate bool `json:"makeGolfScorecardsPrivate"` AllowGolfLiveScoring bool `json:"allowGolfLiveScoring"` AllowGolfScoringByConnections bool `json:"allowGolfScoringByConnections"` UserLevel int `json:"userLevel"` UserPoint int `json:"userPoint"` LevelUpdateDate string `json:"levelUpdateDate"` LevelIsViewed bool `json:"levelIsViewed"` LevelPointThreshold int `json:"levelPointThreshold"` UserPointOffset int `json:"userPointOffset"` UserPro bool `json:"userPro"` }
type SplitEventDTO ¶
type SplitSummaries ¶
type SplitSummaries struct { ActivityID int64 `json:"activityId"` ActivityUUID ActivityUUID `json:"activityUUID"` SplitSummaries []SplitSummary `json:"splitSummaries"` }
type SplitSummary ¶
type SplitSummary struct { Distance float64 `json:"distance"` Duration float64 `json:"duration"` MovingDuration float64 `json:"movingDuration"` ElevationGain float64 `json:"elevationGain"` ElevationLoss float64 `json:"elevationLoss"` AverageSpeed float64 `json:"averageSpeed"` AverageMovingSpeed float64 `json:"averageMovingSpeed,omitempty"` MaxSpeed float64 `json:"maxSpeed"` Calories float64 `json:"calories"` BMRCalories float64 `json:"bmrCalories"` AverageHR float64 `json:"averageHR"` MaxHR float64 `json:"maxHR"` AverageRunCadence float64 `json:"averageRunCadence"` MaxRunCadence float64 `json:"maxRunCadence"` AveragePower float64 `json:"averagePower"` MaxPower float64 `json:"maxPower"` NormalizedPower float64 `json:"normalizedPower"` GroundContactTime float64 `json:"groundContactTime,omitempty"` StrideLength float64 `json:"strideLength"` VerticalOscillation float64 `json:"verticalOscillation,omitempty"` VerticalRatio float64 `json:"verticalRatio,omitempty"` TotalExerciseReps int `json:"totalExerciseReps"` AvgVerticalSpeed float64 `json:"avgVerticalSpeed"` AvgGradeAdjustedSpeed float64 `json:"avgGradeAdjustedSpeed"` SplitType string `json:"splitType"` NoOfSplits int `json:"noOfSplits"` MaxElevationGain float64 `json:"maxElevationGain"` AverageElevationGain float64 `json:"averageElevationGain"` MaxDistance int `json:"maxDistance"` }
type Splits ¶
type Splits struct { ActivityID int64 `json:"activityId"` LapDTOs []LapDTO `json:"lapDTOs"` EventDTOs []SplitEventDTO `json:"eventDTOs"` }
type StepsAggregations ¶
type StressStat ¶
type SuggestedUserFocus ¶
type TimeInZone ¶
type TimeZoneUnit ¶
type TimestampedValue ¶
type TokenCacher ¶
type TokenCacher interface { SaveAccessToken(at *AccessToken) error GetAccessToken() (*AccessToken, error) DelAccessToken() error SaveOAuth1Token(token *OAuth1Token) error GetOAuth1Token() (*OAuth1Token, error) DelOAuth1Token() error }
type URLBuilder ¶
type URLBuilder struct {
// contains filtered or unexported fields
}
func (*URLBuilder) Clear ¶
func (ub *URLBuilder) Clear() *URLBuilder
func (*URLBuilder) Fragment ¶
func (ub *URLBuilder) Fragment(f string) *URLBuilder
func (*URLBuilder) HTTPS ¶
func (ub *URLBuilder) HTTPS() *URLBuilder
func (*URLBuilder) Host ¶
func (ub *URLBuilder) Host(h string, domain ...string) *URLBuilder
func (*URLBuilder) MapQuery ¶
func (ub *URLBuilder) MapQuery(q map[string]string) *URLBuilder
func (*URLBuilder) Path ¶
func (ub *URLBuilder) Path(p string) *URLBuilder
func (*URLBuilder) Pathf ¶
func (ub *URLBuilder) Pathf(p string, v ...any) *URLBuilder
func (*URLBuilder) Query ¶
func (ub *URLBuilder) Query(q url.Values) *URLBuilder
func (*URLBuilder) Scheme ¶
func (ub *URLBuilder) Scheme(s string) *URLBuilder
func (*URLBuilder) String ¶
func (ub *URLBuilder) String() string
func (*URLBuilder) Subdomain ¶
func (ub *URLBuilder) Subdomain(sub, domain string) *URLBuilder
func (*URLBuilder) URL ¶
func (ub *URLBuilder) URL() *url.URL
type UnixTS ¶
func (UnixTS) Nanosecond ¶
func (*UnixTS) UnmarshalJSON ¶
func (*UnixTS) UnmarshalText ¶
type UpcomingEvent ¶
type UpcomingEvent struct { ID int `json:"id"` GroupID any `json:"groupId"` EventName string `json:"eventName"` Date string `json:"date"` URL string `json:"url"` RegistrationURL string `json:"registrationUrl"` CourseID any `json:"courseId"` CompletionTarget struct { Value float64 `json:"value"` Unit string `json:"unit"` UnitType string `json:"unitType"` } `json:"completionTarget"` EventTimeLocal struct { StartTimeHhMm string `json:"startTimeHhMm"` TimeZoneID string `json:"timeZoneId"` } `json:"eventTimeLocal"` Note any `json:"note"` WorkoutID any `json:"workoutId"` EventImageUUID any `json:"eventImageUUID"` Location string `json:"location"` LocationStartPoint struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` } `json:"locationStartPoint"` EventType string `json:"eventType"` EventPrivacy struct { Label string `json:"label"` IsShareable bool `json:"isShareable"` IsDiscoverable bool `json:"isDiscoverable"` } `json:"eventPrivacy"` EventCustomization struct { CustomGoal struct { Value float64 `json:"value"` Unit string `json:"unit"` UnitType string `json:"unitType"` } `json:"customGoal"` IsPrimaryEvent bool `json:"isPrimaryEvent"` AssociatedWithActivityID any `json:"associatedWithActivityId"` IsTrainingEvent bool `json:"isTrainingEvent"` IsGoalMet any `json:"isGoalMet"` TrainingPlanID any `json:"trainingPlanId"` TrainingPlanType any `json:"trainingPlanType"` } `json:"eventCustomization"` Provider string `json:"provider"` EventRef string `json:"eventRef"` Statuses any `json:"statuses"` Race bool `json:"race"` Subscribed bool `json:"subscribed"` EventOrganizer bool `json:"eventOrganizer"` }
type UploadedDeviceMessage ¶
type UploadedDeviceMessage struct { DeviceID int64 `json:"deviceId"` DeviceName string `json:"deviceName,omitempty"` MessageID int64 `json:"messageId"` MessageType string `json:"messageType"` MessageStatus string `json:"messageStatus,omitempty"` ApplicationKey any `json:"applicationKey"` FirmwareVersion any `json:"firmwareVersion"` WifiSetup bool `json:"wifiSetup"` DeviceXMLDataType any `json:"deviceXmlDataType,omitempty"` Hidden bool `json:"hidden,omitempty"` CreatedTimeStamp any `json:"createdTimeStamp,omitempty"` UpdatedTimeStamp any `json:"updatedTimeStamp,omitempty"` FileType string `json:"fileType"` MessageURL string `json:"messageUrl"` UniqueIdentifier any `json:"uniqueIdentifier,omitempty"` MessageName string `json:"messageName"` GroupName any `json:"groupName"` Priority int `json:"priority"` MetaDataID int `json:"metaDataId"` AppDetails any `json:"appDetails,omitempty"` }
type UserCourses ¶
type UserCourses struct {
Courses []Course `json:"coursesForUser"`
}
type UserDataUpdate ¶
type UserDevice ¶
type UserDevice struct { DeviceID int64 `json:"deviceId"` UserID int `json:"userId"` ApplicationVersionID int `json:"applicationVersionId"` ApplicationID int `json:"applicationId"` LastUploadTimestamp int64 `json:"lastUploadTimestamp"` LastDownloadTimestamp int64 `json:"lastDownloadTimestamp"` DeviceStatus any `json:"deviceStatus"` }
type UserFocusAvailablePrimaryStat ¶
type UserFocusAvailablePrimaryStat struct {
CardType string `json:"cardType"`
}
type UserFocusDashboard ¶
type UserFocusDashboard struct { UserFocus struct { UserFocus string `json:"userFocus"` CreateTimestamp string `json:"createTimestamp"` } `json:"userFocus"` Sections []struct { SectionType string `json:"sectionType"` } `json:"sections"` YesterdayStats []struct { CardType string `json:"cardType"` } `json:"yesterdayStats"` LastSevenDayStats []struct { CardType string `json:"cardType"` } `json:"lastSevenDayStats"` DailyStatsConfig struct { KeyStats []struct { CardType string `json:"cardType"` } `json:"keyStats"` PrimaryStats []struct { CardType string `json:"cardType"` } `json:"primaryStats"` ActivityTrends []struct { CardType string `json:"cardType"` } `json:"activityTrends"` SecondaryStats []struct { CardType string `json:"cardType"` } `json:"secondaryStats"` SecondaryStatFavorites []struct { CardType string `json:"cardType"` } `json:"secondaryStatFavorites"` SecondaryStatOthers []struct { CardType string `json:"cardType"` } `json:"secondaryStatOthers"` DefaultSecondaryStats bool `json:"defaultSecondaryStats"` DefaultPrimaryStats bool `json:"defaultPrimaryStats"` } `json:"dailyStatsConfig"` }
type UserFocusService ¶
type UserFocusService service
func (*UserFocusService) AvailablePrimaryStats ¶
func (uf *UserFocusService) AvailablePrimaryStats() (res []UserFocusAvailablePrimaryStat, e error)
func (*UserFocusService) Dashboard ¶
func (uf *UserFocusService) Dashboard() (*UserFocusDashboard, error)
func (*UserFocusService) Focus ¶
func (uf *UserFocusService) Focus() (*UserFocus, error)
func (*UserFocusService) Suggested ¶
func (uf *UserFocusService) Suggested() (res []SuggestedUserFocus, e error)
type UserProfileBase ¶
type UserProfileBase struct { UserProfilePk int `json:"userProfilePk"` UserName string `json:"userName"` FirstName string `json:"firstName"` LastName string `json:"lastName"` BirthDate string `json:"birthDate"` Gender string `json:"gender"` EmailAddress string `json:"emailAddress"` CreateDate string `json:"createDate"` MeasurementSystemPk int `json:"measurementSystemPk"` GlucoseMeasurementUnitID int `json:"glucoseMeasurementUnitId"` HydrationMeasurementUnitID int `json:"hydrationMeasurementUnitId"` TimeZonePk int `json:"timeZonePk"` DecimalFormat int `json:"decimalFormat"` TimeFormat int `json:"timeFormat"` FormatLocalePk int `json:"formatLocalePk"` DayOfWeekPk int `json:"dayOfWeekPk"` GarminGlobalID string `json:"garminGlobalId"` DisplayName string `json:"displayName"` TocAcceptedDate string `json:"tocAcceptedDate"` AccessDeletedDate any `json:"accessDeletedDate"` GarminGUID string `json:"garminGUID"` CountryCode string `json:"countryCode"` CountryCodeVerified bool `json:"countryCodeVerified"` CountryCodeVerifiedTimestamp string `json:"countryCodeVerifiedTimestamp"` GolfDistanceUnitID int `json:"golfDistanceUnitId"` GolfElevationUnitID any `json:"golfElevationUnitId"` GolfSpeedUnitID any `json:"golfSpeedUnitId"` }
type UserProfileService ¶
type UserProfileService service
func (*UserProfileService) PersonalInformation ¶
func (up *UserProfileService) PersonalInformation(userUUID string) (*PersonalInformation, error)
func (*UserProfileService) ProfileStatus ¶
func (up *UserProfileService) ProfileStatus(displayName string) (*ProfileStatus, error)
func (*UserProfileService) PublicSocialProfile ¶
func (up *UserProfileService) PublicSocialProfile(displayName string) (*PublicSocialProfile, error)
func (*UserProfileService) PulseOxCapable ¶
func (up *UserProfileService) PulseOxCapable() (*PulseOxCapable, error)
func (*UserProfileService) SegmentLeaderboard ¶
func (up *UserProfileService) SegmentLeaderboard() (*SegmentLeaderboard, error)
func (*UserProfileService) Settings ¶
func (up *UserProfileService) Settings() (*Settings, error)
func (*UserProfileService) SocialProfile ¶
func (up *UserProfileService) SocialProfile(displayName string) (*SocialProfile, error)
SocialProfile will return the user social profile given the user's 'displayName' (the displayName is a UUID).
func (*UserProfileService) StravaSegments ¶
func (up *UserProfileService) StravaSegments() (*SegmentLeaderboard, error)
func (*UserProfileService) UpdateSettings ¶
func (up *UserProfileService) UpdateSettings(usu *UserSettingsUpdate) error
UpdateSettings will send a partial user settings object with only the fields that should be changed.
func TestUpdates() { req := new(garmin.UserSettingsUpdate).Weight(79786.8328) err := api.UserProfile.UpdateSettings(req) if err != nil { panic(err) } }
func (*UserProfileService) UpdateSocialProfile ¶
func (up *UserProfileService) UpdateSocialProfile(displayName string, profile *SocialProfile) (*SocialProfile, error)
SocialProfile will update the user social profile given the user's 'displayName' (the displayName is a UUID).
func (*UserProfileService) UserProfileBase ¶
func (up *UserProfileService) UserProfileBase() (*UserProfileBase, error)
func (*UserProfileService) UserSettings ¶
func (up *UserProfileService) UserSettings() (*UserSettings, error)
type UserSettings ¶
type UserSettings struct { ID int `json:"id"` UserData UserSettingsUserData `json:"userData"` UserSleep UserSettingsSleep `json:"userSleep"` ConnectDate any `json:"connectDate"` SourceType any `json:"sourceType"` UserSleepWindows []UserSettingsSleepWindows `json:"userSleepWindows"` }
type UserSettingsFormat ¶
type UserSettingsSleep ¶
type UserSettingsUpdate ¶
type UserSettingsUpdate struct {
UserData *UserDataUpdate `json:"userData,omitempty"`
}
UserSettingsUpdate is the payload sent in order to update the user's settings. It is similar to the UserSettings struct except that all of its fields are nilable so that only a limited number of fields are updated.
func (*UserSettingsUpdate) Gender ¶
func (usu *UserSettingsUpdate) Gender(g string) *UserSettingsUpdate
func (*UserSettingsUpdate) Height ¶
func (usu *UserSettingsUpdate) Height(h float64) *UserSettingsUpdate
func (*UserSettingsUpdate) Weight ¶
func (usu *UserSettingsUpdate) Weight(w float64) *UserSettingsUpdate
type UserSettingsUserData ¶
type UserSettingsUserData struct { Gender string `json:"gender"` // Weight in grams. Weight float64 `json:"weight"` // Height in centimeters. Height float64 `json:"height"` TimeFormat string `json:"timeFormat"` // BirthDate in YYYY-MM-DD format. BirthDate string `json:"birthDate"` MeasurementSystem string `json:"measurementSystem"` ActivityLevel any `json:"activityLevel"` Handedness string `json:"handedness"` PowerFormat UserSettingsFormat `json:"powerFormat"` HeartRateFormat UserSettingsFormat `json:"heartRateFormat"` FirstDayOfWeek struct { DayID int `json:"dayId"` DayName string `json:"dayName"` SortOrder int `json:"sortOrder"` IsPossibleFirstDay bool `json:"isPossibleFirstDay"` } `json:"firstDayOfWeek"` Vo2MaxRunning float64 `json:"vo2MaxRunning"` Vo2MaxCycling any `json:"vo2MaxCycling"` LactateThresholdSpeed any `json:"lactateThresholdSpeed"` LactateThresholdHeartRate any `json:"lactateThresholdHeartRate"` DiveNumber any `json:"diveNumber"` IntensityMinutesCalcMethod string `json:"intensityMinutesCalcMethod"` ModerateIntensityMinutesHrZone int `json:"moderateIntensityMinutesHrZone"` VigorousIntensityMinutesHrZone int `json:"vigorousIntensityMinutesHrZone"` HydrationMeasurementUnit string `json:"hydrationMeasurementUnit"` HydrationContainers []struct { Name any `json:"name"` Volume int `json:"volume"` Unit string `json:"unit"` } `json:"hydrationContainers"` HydrationAutoGoalEnabled bool `json:"hydrationAutoGoalEnabled"` FirstbeatMaxStressScore any `json:"firstbeatMaxStressScore"` FirstbeatCyclingLtTimestamp any `json:"firstbeatCyclingLtTimestamp"` FirstbeatRunningLtTimestamp any `json:"firstbeatRunningLtTimestamp"` ThresholdHeartRateAutoDetected any `json:"thresholdHeartRateAutoDetected"` FtpAutoDetected any `json:"ftpAutoDetected"` TrainingStatusPausedDate any `json:"trainingStatusPausedDate"` WeatherLocation struct { UseFixedLocation any `json:"useFixedLocation"` Latitude any `json:"latitude"` Longitude any `json:"longitude"` LocationName any `json:"locationName"` IsoCountryCode any `json:"isoCountryCode"` PostalCode any `json:"postalCode"` } `json:"weatherLocation"` GolfDistanceUnit string `json:"golfDistanceUnit"` GolfElevationUnit any `json:"golfElevationUnit"` GolfSpeedUnit any `json:"golfSpeedUnit"` ExternalBottomTime any `json:"externalBottomTime"` AvailableTrainingDays []string `json:"availableTrainingDays"` PreferredLongTrainingDays []string `json:"preferredLongTrainingDays"` }
type UserSummaryService ¶
type UserSummaryService service
func (*UserSummaryService) DailyBodyBattery ¶
func (uss *UserSummaryService) DailyBodyBattery(start, end time.Time) (s []Stat[BodyBatteryStat], err error)
func (*UserSummaryService) DailyHeartRate ¶
func (uss *UserSummaryService) DailyHeartRate(start, end time.Time) (s []Stat[HeartRateStat], err error)
func (*UserSummaryService) DailyIntensityMinutes ¶
func (uss *UserSummaryService) DailyIntensityMinutes(start, end time.Time) (s []IntensityMinutesStat, err error)
func (*UserSummaryService) DailySteps ¶
func (uss *UserSummaryService) DailySteps(start, end time.Time) (s *DailySteps, err error)
func (*UserSummaryService) DailyStress ¶
func (uss *UserSummaryService) DailyStress(start, end time.Time) (s []Stat[StressStat], err error)
func (*UserSummaryService) MonthlyPushes ¶
func (*UserSummaryService) MonthlySteps ¶
func (uss *UserSummaryService) MonthlySteps(months int, end time.Time) (s []Stat[MonthlyStepsStat], err error)
func (*UserSummaryService) WeeklyHeartRate ¶
func (uss *UserSummaryService) WeeklyHeartRate(weeks int, end time.Time) (s []Stat[HeartRateStat], err error)
func (*UserSummaryService) WeeklyIntensityMinutes ¶
func (uss *UserSummaryService) WeeklyIntensityMinutes(start, end time.Time) (s []IntensityMinutesStat, err error)
func (*UserSummaryService) WeeklyPushes ¶
func (*UserSummaryService) WeeklySteps ¶
func (uss *UserSummaryService) WeeklySteps(weeks int, end time.Time) (s []Stat[WeeklyStepsStat], err error)
func (*UserSummaryService) WeeklyStress ¶
func (uss *UserSummaryService) WeeklyStress(weeks int, end time.Time) (s []WeeklyStressStat, err error)
type WeeklyFitnessAge ¶
type WeeklySleepAverages ¶
type WeeklySleepAverages struct { LocalSleepStartTime float64 `json:"averageLocalSleepStartTime"` LowSleepScore float64 `json:"averageLowSleepScore"` LocalSleepEndTime float64 `json:"averageLocalSleepEndTime"` SleepSeconds float64 `json:"averageSleepSeconds"` SleepNeed float64 `json:"averageSleepNeed"` HighSleepScore float64 `json:"averageHighSleepScore"` }
type WeeklySleepIndividualStat ¶
type WeeklySleepIndividualStat struct { WeekStartDate string `json:"weekStartDate"` WeekEndDate string `json:"weekEndDate"` Values WeeklySleepStatValue `json:"values"` }
type WeeklySleepStatValue ¶
type WeeklySleepStatValue struct { RemTime float64 `json:"remTime"` AwakeTime float64 `json:"awakeTime"` SleepScoreQuality string `json:"sleepScoreQuality"` AverageLocalSleepStartTime float64 `json:"averageLocalSleepStartTime"` AverageSleepScore float64 `json:"averageSleepScore"` SleepDataDaysCount int `json:"sleepDataDaysCount"` AverageLocalSleepEndTime float64 `json:"averageLocalSleepEndTime"` AverageSleepSeconds float64 `json:"averageSleepSeconds"` AverageSleepNeed float64 `json:"averageSleepNeed"` LightTime float64 `json:"lightTime"` DeepTime float64 `json:"deepTime"` }
type WeeklySleepStats ¶
type WeeklySleepStats struct { OverallStats WeeklySleepAverages `json:"overallStats"` IndividualStats []WeeklySleepIndividualStat `json:"individualStats"` }
type WeeklyStepsStat ¶
type WeeklyStressStat ¶
type WeighIn ¶
type WeighIn struct { // SamplePk is the same as the `Version`. It depends on the endpoint but one // of the two fields will be present. SamplePk int64 `json:"samplePk"` // not sure what this is, its only included in some responses Date UnixTS `json:"date"` // Date `json:"date"` CalendarDate string `json:"calendarDate"` // Version is not included in the range endpoint Version *int64 `json:"version"` // Weight in grams Weight float64 `json:"weight"` // BMI is weight / height squared BMI *float64 `json:"bmi"` BodyFatPercentage *float64 `json:"bodyFat"` // BodyWater is body water in in kilograms BodyWater float64 `json:"bodyWater"` // BoneMass in grams BoneMass int `json:"boneMass"` // MuscleMass in grams MuscleMass *int `json:"muscleMass"` PhysiqueRating any `json:"physiqueRating"` VisceralFat any `json:"visceralFat"` MetabolicAge any `json:"metabolicAge"` SourceType string `json:"sourceType"` TimestampGMT int64 `json:"timestampGMT"` WeightDelta *float64 `json:"weightDelta"` CaloricIntake any `json:"caloricIntake"` }
type WeightAverage ¶
type WeightDayView ¶
type WeightDayView struct { StartDate string `json:"startDate"` EndDate string `json:"endDate"` DateWeightList []WeighIn `json:"dateWeightList"` TotalAverage WeightAverage `json:"totalAverage"` }
type WeightRange ¶
type WeightRange struct { DailyWeightSummaries []DailyWeightSummary `json:"dailyWeightSummaries"` TotalAverage WeightAverage `json:"totalAverage"` PreviousDateWeight WeighIn `json:"previousDateWeight"` NextDateWeight WeighIn `json:"nextDateWeight"` }
type WeightService ¶
type WeightService service
func (*WeightService) DayView ¶
func (ws *WeightService) DayView(date time.Time) (*WeightDayView, error)
func (*WeightService) DeleteWeight ¶
func (ws *WeightService) DeleteWeight(date time.Time, version int64) error
DeleteWeight calls "DELETE /weight-service/weight/<date>/byversion/<weight_version>"
You can get the version either from the WeightDated object's `Version` field or the `SamplePk` field.
func (*WeightService) First ¶
func (ws *WeightService) First() (*WeighIn, error)
func (*WeightService) Range ¶
func (ws *WeightService) Range(start, end time.Time) (*WeightRange, error)
func (*WeightService) UpdateWeight ¶
func (ws *WeightService) UpdateWeight(weight float64, unit WeightUnit) error
type WellnessService ¶
type WellnessService service
func (*WellnessService) BodyBatteryEvents ¶
func (w *WellnessService) BodyBatteryEvents(date time.Time) (res []BodyBatteryEvent, e error)
func (*WellnessService) BodyBatteryMessagingToday ¶
func (w *WellnessService) BodyBatteryMessagingToday() (*BodyBatteryMessagingToday, error)
func (*WellnessService) DailyEvents ¶
func (w *WellnessService) DailyEvents(userUUID string, date time.Time)
func (*WellnessService) DailyHeartRate ¶
func (ws *WellnessService) DailyHeartRate(date time.Time) (hr *DailyHeartRate, err error)
func (*WellnessService) DailyIntensityMinutes ¶
func (w *WellnessService) DailyIntensityMinutes(date time.Time) (*DailyIntensityMinutes, error)
func (*WellnessService) DailySleep ¶
func (ws *WellnessService) DailySleep(userUUID string, date time.Time) (*DailySleep, error)
func (*WellnessService) DailyStress ¶
func (w *WellnessService) DailyStress(date time.Time) (*DailyStress, error)
func (*WellnessService) DailySummaryChart ¶
func (w *WellnessService) DailySummaryChart(date time.Time) (res []DailySummaryChartValue, e error)
func (*WellnessService) HourlyIntensityMinutes ¶
func (w *WellnessService) HourlyIntensityMinutes(days int, end time.Time) (*HourlyIntensityMinutes, error)
func (*WellnessService) PushesGoal ¶
func (w *WellnessService) PushesGoal(date time.Time) (*ConsolidatedWellnessGoal, error)
func (*WellnessService) StepsGoal ¶
func (w *WellnessService) StepsGoal(date time.Time) (*ConsolidatedWellnessGoal, error)
type YearCalendar ¶
type YearCalendar struct { StartDayOfJanuary int `json:"startDayOfJanuary"` LeapYear bool `json:"leapYear"` YearItems []struct { Date string `json:"date"` Display int `json:"display"` } `json:"yearItems"` YearSummaries []struct { ActivityTypeID int `json:"activityTypeId"` NumberOfActivities int `json:"numberOfActivities"` TotalDistance int `json:"totalDistance"` TotalDuration int `json:"totalDuration"` TotalCalories int `json:"totalCalories"` } `json:"yearSummaries"` }