app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseInt32

func ParseInt32(raw string) (int32, error)

func RandomExternalID

func RandomExternalID() string

Types

type APIError

type APIError struct {
	StatusCode int
	Body       []byte
}

func (*APIError) Error

func (e *APIError) Error() string

type ActivityBestEffortsOptions

type ActivityBestEffortsOptions struct {
	Stream           string
	DurationSec      *int32
	DistanceM        *float32
	Count            *int32
	MinValue         *float32
	ExcludeIntervals *bool
	StartIndex       *int32
	EndIndex         *int32
}

type ActivityListOptions

type ActivityListOptions struct {
	Oldest  string
	Newest  *string
	RouteID *int64
	Limit   *int32
	Fields  []string
}

type ActivitySearchOptions

type ActivitySearchOptions struct {
	Query  string
	Limit  *int32
	Oldest *string
	Newest *string
}

type ActivityStreamsOptions

type ActivityStreamsOptions struct {
	Types           []string
	IncludeDefaults *bool
}

type ActivityUploadOptions

type ActivityUploadOptions struct {
	FilePath      string
	Name          *string
	Description   *string
	DeviceName    *string
	ExternalID    *string
	PairedEventID *int32
}

type Client

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

func NewClient

func NewClient(cfg Config) (*Client, error)

func (*Client) ActivitiesList

func (c *Client) ActivitiesList(ctx context.Context, opts ActivityListOptions) (any, error)

func (*Client) ActivitiesSearch

func (c *Client) ActivitiesSearch(ctx context.Context, opts ActivitySearchOptions) (any, error)

func (*Client) ActivitiesUpload

func (c *Client) ActivitiesUpload(ctx context.Context, opts ActivityUploadOptions) (any, error)

func (*Client) ActivityBestEfforts

func (c *Client) ActivityBestEfforts(ctx context.Context, id string, opts ActivityBestEffortsOptions) (any, error)

func (*Client) ActivityDownload

func (c *Client) ActivityDownload(ctx context.Context, id, kind string) ([]byte, error)

func (*Client) ActivityGet

func (c *Client) ActivityGet(ctx context.Context, id string) (any, error)

func (*Client) ActivityIntervals

func (c *Client) ActivityIntervals(ctx context.Context, id string) (any, error)

func (*Client) ActivityStreams

func (c *Client) ActivityStreams(ctx context.Context, id string, opts ActivityStreamsOptions) (any, error)

func (*Client) AthleteGet

func (c *Client) AthleteGet(ctx context.Context) (any, error)

func (*Client) AthleteProfile

func (c *Client) AthleteProfile(ctx context.Context) (any, error)

func (*Client) AthleteTrainingPlan

func (c *Client) AthleteTrainingPlan(ctx context.Context) (any, error)

func (*Client) AuthStatus

func (c *Client) AuthStatus(ctx context.Context) (any, error)

func (*Client) EventDelete

func (c *Client) EventDelete(ctx context.Context, id int32) (any, error)

func (*Client) EventGet

func (c *Client) EventGet(ctx context.Context, id int32) (any, error)

func (*Client) EventsCreate

func (c *Client) EventsCreate(ctx context.Context, body []byte) (any, error)

func (*Client) EventsList

func (c *Client) EventsList(ctx context.Context, opts EventListOptions) (any, error)

func (*Client) EventsUpsert

func (c *Client) EventsUpsert(ctx context.Context, body []byte) (any, error)

func (*Client) WellnessBulkPut

func (c *Client) WellnessBulkPut(ctx context.Context, body []byte) (any, error)

func (*Client) WellnessGet

func (c *Client) WellnessGet(ctx context.Context, date string) (any, error)

func (*Client) WellnessList

func (c *Client) WellnessList(ctx context.Context, opts WellnessListOptions) (any, error)

func (*Client) WellnessPut

func (c *Client) WellnessPut(ctx context.Context, date string, body []byte) (any, error)

func (*Client) WhoAmI

func (c *Client) WhoAmI(ctx context.Context) (any, error)

func (*Client) WorkoutDownload

func (c *Client) WorkoutDownload(ctx context.Context, id int32, format string) ([]byte, error)

func (*Client) WorkoutGet

func (c *Client) WorkoutGet(ctx context.Context, id int32) (any, error)

func (*Client) WorkoutsCreate

func (c *Client) WorkoutsCreate(ctx context.Context, body []byte) (any, error)

func (*Client) WorkoutsList

func (c *Client) WorkoutsList(ctx context.Context) (any, error)

type Config

type Config struct {
	BaseURL   string
	Timeout   time.Duration
	Verbose   bool
	Stderr    io.Writer
	UserAgent string
}

type EventListOptions

type EventListOptions struct {
	Oldest   *string
	Newest   *string
	Category []string
	Limit    *int32
}

type WellnessListOptions

type WellnessListOptions struct {
	Oldest *string
	Newest *string
	Fields []string
}

Jump to

Keyboard shortcuts

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