strava

package
v0.0.0-...-86b24a5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activities

type Activities []Activity

func (Activities) Len

func (a Activities) Len() int

func (Activities) Less

func (a Activities) Less(i, j int) bool

func (Activities) Swap

func (a Activities) Swap(i, j int)

type Activity

type Activity struct {
	Id                 int64      `json:"id"`
	Name               string     `json:"name"`
	Type               string     `json:"type"`
	Distance           float64    `json:"distance"`
	TotalElevationGain float64    `json:"total_elevation_gain"`
	StartDateLocal     string     `json:"start_date_local"`
	StartDate          time.Time  `json:"start_date"`
	StartLatLng        geo.LatLng `json:"start_latlng"`
	EndLatLng          geo.LatLng `json:"end_latlng"`
	MovingTime         int        `json:"moving_time"`
	GearId             string     `json:"gear_id"`
	Kilojoules         float64    `json:"kilojoules"`
	AverageWatts       float64    `json:"average_watts"`
	DeviceWatts        bool       `json:"device_watts"`
	ExternalId         string     `json:"external_id"`
}

SummaryActivity (https://bit.ly/3bzRVuE)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clientId int, clientSecret, tokenPath string) *Client

func (*Client) Activities

func (c *Client) Activities(athleteId int64, epoch time.Time) (Activities, error)

func (*Client) Gears

func (c *Client) Gears(gearIds []string) ([]Gear, error)

type Credentials

type Credentials struct {
	// contains filtered or unexported fields
}

func NewCredentials

func NewCredentials(clientId int, clientSecret, tokenPath string, hc *http.Client) *Credentials

func (*Credentials) MustGetAccessToken

func (c *Credentials) MustGetAccessToken() string

type Gear

type Gear struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

DetailedGear (https://bit.ly/2zD10Wv)

Jump to

Keyboard shortcuts

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