stride

package module
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 3 Imported by: 2

README

Stride

A collection of fitness API integrations.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRateLimitExceeded             = errors.New("rate limit exceeded")
	ErrActivityIsNotOutdoorEndurance = errors.New("activity is not an outdoor endurance activity")
	ErrUnsupportedSportType          = errors.New("unsupported sport type")
)

Functions

func IsEnduranceOutdoorActivity added in v0.0.16

func IsEnduranceOutdoorActivity(sport Sport) bool

Types

type EnduranceOutdoorActivity added in v0.0.16

type EnduranceOutdoorActivity struct {
	ExternalID     string    `json:"externalId"`     // The id of the activity in the provider's system
	UserExternalID string    `json:"userExternalId"` // The id of the user in the provider's system
	Provider       Provider  `json:"provider"`
	Sport          Sport     `json:"sport"`
	StartTime      time.Time `json:"startTime"`
	EndTime        time.Time `json:"endTime"`
	IanaTimezone   string    `json:"ianaTimezone"`
	UTCOffset      int       `json:"utcOffset"`   // seconds
	ElapsedTime    int       `json:"elapsedTime"` // seconds
	MovingTime     int       `json:"movingTime"`  // seconds
	Distance       float64   `json:"distance"`    // meters
	ElevGain       *float64  `json:"elevGain"`    // meters
	ElevLoss       *float64  `json:"elevLoss"`    // meters
	AvgSpeed       float64   `json:"avgSpeed"`    // meters / second
	AvgHR          *int16    `json:"avgHR"`       // beats / minute
	MaxHR          *int16    `json:"maxHR"`       // beats / minute
}

type Provider added in v0.0.13

type Provider string
const (
	ProviderStrava Provider = "strava"
)

type Sport added in v0.0.13

type Sport string
const (
	SportCycling       Sport = "cycling"
	SportElliptical    Sport = "elliptical"
	SportHiking        Sport = "hiking"
	SportInlineSkating Sport = "inline-skating"
	SportKayaking      Sport = "kayaking"
	SportRockClimbing  Sport = "rock-climbing"
	SportRunning       Sport = "running"
	SportStairStepper  Sport = "stair-stepper"
	SportSurfing       Sport = "surfing"
	SportSwimming      Sport = "swimming"
	SportTrailRunning  Sport = "trail-running"
)

type TimeRFC3339 added in v0.0.13

type TimeRFC3339 struct{ time.Time }

func (TimeRFC3339) MarshalJSON added in v0.0.13

func (t TimeRFC3339) MarshalJSON() ([]byte, error)

func (*TimeRFC3339) UnmarshalJSON added in v0.0.13

func (t *TimeRFC3339) UnmarshalJSON(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL