Documentation ¶
Overview ¶
Package api implements Runtastic API for downloading activity data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataPoint ¶
type DataPoint struct { Longitude float32 Latitude float32 Elevation float32 Time time.Time Distance int32 HeartRate uint8 }
DataPoint represents single activity data point.
type Metadata ¶
type Metadata struct { ID ActivityID Type string StartTime time.Time EndTime time.Time Calories int32 Distance int32 Duration time.Duration AvgHeartRate int32 MaxHeartReate int32 Notes string }
Metadata represents high-level overview of the single activity.
type Options ¶
type Options struct {
Tolerance int
}
Options contain parameters that configure how data traces are retrieved and merged.
type Session ¶
type Session struct { Options Options // contains filtered or unexported fields }
Session contains session data for single authenticated user.
func Login ¶
Login connects to Runtastic API server and authenticates user using given email and password.
func (*Session) GetActivities ¶
GetActivities retrieves metadata and traces for all available activities.
func (*Session) GetActivity ¶
GetActivity downloads GPS trace and heart rate data of an activity with given ID.
Click to show internal directories.
Click to hide internal directories.