Versions in this module Expand all Collapse all v1 v1.0.1 Jan 24, 2022 v1.0.0 Jan 9, 2022 Changes in this version + var ContextAPIKey = contextKey("apikey") + var ContextAccessToken = contextKey("accesstoken") + var ContextBasicAuth = contextKey("basic") + var ContextOAuth2 = contextKey("token") + func CacheExpires(r *http.Response) time.Time + type APIClient struct + ActivitiesApi *ActivitiesApiService + AthletesApi *AthletesApiService + ClubsApi *ClubsApiService + GearsApi *GearsApiService + RoutesApi *RoutesApiService + SegmentEffortsApi *SegmentEffortsApiService + SegmentsApi *SegmentsApiService + StreamsApi *StreamsApiService + UploadsApi *UploadsApiService + func NewAPIClient(cfg *Configuration) *APIClient + func (c *APIClient) ChangeBasePath(path string) + type APIKey struct + Key string + Prefix string + type APIResponse struct + Message string + Method string + Operation string + Payload []byte + RequestURL string + func NewAPIResponse(r *http.Response) *APIResponse + func NewAPIResponseWithError(errorMessage string) *APIResponse + type ActivitiesApiCreateActivityOpts struct + Commute optional.Int32 + Description optional.String + Distance optional.Float32 + HideFromHome optional.Bool + Trainer optional.Int32 + type ActivitiesApiGetActivityByIdOpts struct + IncludeAllEfforts optional.Bool + type ActivitiesApiGetCommentsByActivityIdOpts struct + Page optional.Int32 + PerPage optional.Int32 + type ActivitiesApiGetKudoersByActivityIdOpts struct + Page optional.Int32 + PerPage optional.Int32 + type ActivitiesApiGetLoggedInAthleteActivitiesOpts struct + After optional.Int32 + Before optional.Int32 + Page optional.Int32 + PerPage optional.Int32 + type ActivitiesApiService service + func (a *ActivitiesApiService) CreateActivity(ctx context.Context, name string, type_ string, startDateLocal time.Time, ...) (DetailedActivity, *http.Response, error) + func (a *ActivitiesApiService) GetActivityById(ctx context.Context, id int64, ...) (DetailedActivity, *http.Response, error) + func (a *ActivitiesApiService) GetCommentsByActivityId(ctx context.Context, id int64, ...) ([]Comment, *http.Response, error) + func (a *ActivitiesApiService) GetKudoersByActivityId(ctx context.Context, id int64, ...) ([]SummaryAthlete, *http.Response, error) + func (a *ActivitiesApiService) GetLapsByActivityId(ctx context.Context, id int64) ([]Lap, *http.Response, error) + func (a *ActivitiesApiService) GetLoggedInAthleteActivities(ctx context.Context, ...) ([]SummaryActivity, *http.Response, error) + func (a *ActivitiesApiService) GetZonesByActivityId(ctx context.Context, id int64) ([]ActivityZone, *http.Response, error) + func (a *ActivitiesApiService) UpdateActivityById(ctx context.Context, id int64, ...) (DetailedActivity, *http.Response, error) + type ActivitiesApiUpdateActivityByIdOpts struct + Body optional.Interface + type ActivityStats struct + AllRideTotals *ActivityTotal + AllRunTotals *ActivityTotal + AllSwimTotals *ActivityTotal + BiggestClimbElevationGain float64 + BiggestRideDistance float64 + RecentRideTotals *ActivityTotal + RecentRunTotals *ActivityTotal + RecentSwimTotals *ActivityTotal + YtdRideTotals *ActivityTotal + YtdRunTotals *ActivityTotal + YtdSwimTotals *ActivityTotal + type ActivityTotal struct + AchievementCount int32 + Count int32 + Distance float32 + ElapsedTime int32 + ElevationGain float32 + MovingTime int32 + type ActivityType string + const ALPINE_SKI + const BACKCOUNTRY_SKI + const CANOEING + const CROSSFIT + const ELLIPTICAL + const E_BIKE_RIDE + const GOLF + const HANDCYCLE + const HIKE + const ICE_SKATE + const INLINE_SKATE + const KAYAKING + const KITESURF + const NORDIC_SKI + const RIDE + const ROCK_CLIMBING + const ROLLER_SKI + const ROWING + const RUN + const SAIL + const SKATEBOARD + const SNOWBOARD + const SNOWSHOE + const SOCCER + const STAIR_STEPPER + const STAND_UP_PADDLING + const SURFING + const SWIM + const VELOMOBILE + const VIRTUAL_RIDE + const VIRTUAL_RUN + const WALK + const WEIGHT_TRAINING + const WHEELCHAIR + const WINDSURF + const WORKOUT + const YOGA + type ActivityZone struct + CustomZones bool + DistributionBuckets *TimedZoneDistribution + Max int32 + Points int32 + Score int32 + SensorBased bool + Type_ string + type AltitudeStream struct + Data []float32 + OriginalSize int32 + Resolution string + SeriesType string + type AthletesApiService service + func (a *AthletesApiService) GetLoggedInAthlete(ctx context.Context) (DetailedAthlete, *http.Response, error) + func (a *AthletesApiService) GetLoggedInAthleteZones(ctx context.Context) (Zones, *http.Response, error) + func (a *AthletesApiService) GetStats(ctx context.Context, id int64) (ActivityStats, *http.Response, error) + func (a *AthletesApiService) UpdateLoggedInAthlete(ctx context.Context, weight float32) (DetailedAthlete, *http.Response, error) + type BaseStream struct + OriginalSize int32 + Resolution string + SeriesType string + type BasicAuth struct + Password string + UserName string + type CadenceStream struct + Data []int32 + OriginalSize int32 + Resolution string + SeriesType string + type ClubsApiGetClubActivitiesByIdOpts struct + Page optional.Int32 + PerPage optional.Int32 + type ClubsApiGetClubAdminsByIdOpts struct + Page optional.Int32 + PerPage optional.Int32 + type ClubsApiGetClubMembersByIdOpts struct + Page optional.Int32 + PerPage optional.Int32 + type ClubsApiGetLoggedInAthleteClubsOpts struct + Page optional.Int32 + PerPage optional.Int32 + type ClubsApiService service + func (a *ClubsApiService) GetClubActivitiesById(ctx context.Context, id int64, ...) ([]SummaryActivity, *http.Response, error) + func (a *ClubsApiService) GetClubAdminsById(ctx context.Context, id int64, ...) ([]SummaryAthlete, *http.Response, error) + func (a *ClubsApiService) GetClubById(ctx context.Context, id int64) (DetailedClub, *http.Response, error) + func (a *ClubsApiService) GetClubMembersById(ctx context.Context, id int64, ...) ([]SummaryAthlete, *http.Response, error) + func (a *ClubsApiService) GetLoggedInAthleteClubs(ctx context.Context, localVarOptionals *ClubsApiGetLoggedInAthleteClubsOpts) ([]SummaryClub, *http.Response, error) + type Comment struct + ActivityId int64 + Athlete *SummaryAthlete + CreatedAt time.Time + Id int64 + Text string + type Configuration struct + BasePath string + DefaultHeader map[string]string + HTTPClient *http.Client + Host string + Scheme string + UserAgent string + func NewConfiguration() *Configuration + func (c *Configuration) AddDefaultHeader(key string, value string) + type DetailedActivity struct + AchievementCount int32 + Athlete *MetaAthlete + AthleteCount int32 + AverageSpeed float32 + AverageWatts float32 + BestEfforts []DetailedSegmentEffort + Calories float32 + CommentCount int32 + Commute bool + Description string + DeviceName string + DeviceWatts bool + Distance float32 + ElapsedTime int32 + ElevHigh float32 + ElevLow float32 + EmbedToken string + EndLatlng *LatLng + ExternalId string + Flagged bool + Gear *SummaryGear + GearId string + HasKudoed bool + HideFromHome bool + Id int64 + Kilojoules float32 + KudosCount int32 + Laps []Lap + Manual bool + Map_ *PolylineMap + MaxSpeed float32 + MaxWatts int32 + MovingTime int32 + Name string + PhotoCount int32 + Photos *PhotosSummary + Private bool + SegmentEfforts []DetailedSegmentEffort + SplitsMetric []Split + SplitsStandard []Split + StartDate time.Time + StartDateLocal time.Time + StartLatlng *LatLng + Timezone string + TotalElevationGain float32 + TotalPhotoCount int32 + Trainer bool + Type_ *ActivityType + UploadId int64 + UploadIdStr string + WeightedAverageWatts int32 + WorkoutType int32 + type DetailedAthlete struct + Bikes []SummaryGear + City string + Clubs []SummaryClub + Country string + CreatedAt time.Time + Firstname string + FollowerCount int32 + FriendCount int32 + Ftp int32 + Id int64 + Lastname string + MeasurementPreference string + Premium bool + Profile string + ProfileMedium string + ResourceState int32 + Sex string + Shoes []SummaryGear + State string + Summit bool + UpdatedAt time.Time + Weight float32 + type DetailedClub struct + ActivityTypes []ActivityType + Admin bool + City string + Country string + CoverPhoto string + CoverPhotoSmall string + Featured bool + FollowingCount int32 + Id int64 + MemberCount int32 + Membership string + Name string + Owner bool + Private bool + ProfileMedium string + ResourceState int32 + SportType string + State string + Url string + Verified bool + type DetailedGear struct + BrandName string + Description string + Distance float32 + FrameType int32 + Id string + ModelName string + Name string + Primary bool + ResourceState int32 + type DetailedSegment struct + ActivityType string + AthleteCount int32 + AthletePrEffort *SummarySegmentEffort + AthleteSegmentStats *SummaryPrSegmentEffort + AverageGrade float32 + City string + ClimbCategory int32 + Country string + CreatedAt time.Time + Distance float32 + EffortCount int32 + ElevationHigh float32 + ElevationLow float32 + EndLatlng *LatLng + Hazardous bool + Id int64 + Map_ *PolylineMap + MaximumGrade float32 + Name string + Private bool + StarCount int32 + StartLatlng *LatLng + State string + TotalElevationGain float32 + UpdatedAt time.Time + type DetailedSegmentEffort struct + Activity *MetaActivity + ActivityId int64 + Athlete *MetaAthlete + AverageCadence float32 + AverageHeartrate float32 + AverageWatts float32 + DeviceWatts bool + Distance float32 + ElapsedTime int32 + EndIndex int32 + Hidden bool + Id int64 + IsKom bool + KomRank int32 + MaxHeartrate float32 + MovingTime int32 + Name string + PrRank int32 + Segment *SummarySegment + StartDate time.Time + StartDateLocal time.Time + StartIndex int32 + type DistanceStream struct + Data []float32 + OriginalSize int32 + Resolution string + SeriesType string + type ExplorerResponse struct + Segments []ExplorerSegment + type ExplorerSegment struct + AvgGrade float32 + ClimbCategory int32 + ClimbCategoryDesc string + Distance float32 + ElevDifference float32 + EndLatlng *LatLng + Id int64 + Name string + Points string + StartLatlng *LatLng + type Fault struct + Errors []ModelError + Message string + type GearsApiService service + func (a *GearsApiService) GetGearById(ctx context.Context, id string) (DetailedGear, *http.Response, error) + type GenericSwaggerError struct + func (e GenericSwaggerError) Body() []byte + func (e GenericSwaggerError) Error() string + func (e GenericSwaggerError) Model() interface{} + type HeartRateZoneRanges struct + CustomZones bool + Zones *ZoneRanges + type HeartrateStream struct + Data []int32 + OriginalSize int32 + Resolution string + SeriesType string + type Lap struct + Activity *MetaActivity + Athlete *MetaAthlete + AverageCadence float32 + AverageSpeed float32 + Distance float32 + ElapsedTime int32 + EndIndex int32 + Id int64 + LapIndex int32 + MaxSpeed float32 + MovingTime int32 + Name string + PaceZone int32 + Split int32 + StartDate time.Time + StartDateLocal time.Time + StartIndex int32 + TotalElevationGain float32 + type LatLng struct + type LatLngStream struct + Data []LatLng + OriginalSize int32 + Resolution string + SeriesType string + type MetaActivity struct + Id int64 + type MetaAthlete struct + Id int64 + type MetaClub struct + Id int64 + Name string + ResourceState int32 + type ModelError struct + Code string + Field string + Resource string + type MovingStream struct + Data []bool + OriginalSize int32 + Resolution string + SeriesType string + type PhotosSummary struct + Count int32 + Primary *PhotosSummaryPrimary + type PhotosSummaryPrimary struct + Id int64 + Source int32 + UniqueId string + Urls map[string]string + type PolylineMap struct + Id string + Polyline string + SummaryPolyline string + type PowerStream struct + Data []int32 + OriginalSize int32 + Resolution string + SeriesType string + type PowerZoneRanges struct + Zones *ZoneRanges + type Route struct + Athlete *SummaryAthlete + CreatedAt time.Time + Description string + Distance float32 + ElevationGain float32 + EstimatedMovingTime int32 + Id int64 + IdStr string + Map_ *PolylineMap + Name string + Private bool + Segments []SummarySegment + Starred bool + SubType int32 + Timestamp int32 + Type_ int32 + UpdatedAt time.Time + type RoutesApiGetRoutesByAthleteIdOpts struct + Page optional.Int32 + PerPage optional.Int32 + type RoutesApiService service + func (a *RoutesApiService) GetRouteAsGPX(ctx context.Context, id int64) (*http.Response, error) + func (a *RoutesApiService) GetRouteAsTCX(ctx context.Context, id int64) (*http.Response, error) + func (a *RoutesApiService) GetRouteById(ctx context.Context, id int64) (Route, *http.Response, error) + func (a *RoutesApiService) GetRoutesByAthleteId(ctx context.Context, localVarOptionals *RoutesApiGetRoutesByAthleteIdOpts) ([]Route, *http.Response, error) + type SegmentEffortsApiGetEffortsBySegmentIdOpts struct + EndDateLocal optional.Time + PerPage optional.Int32 + StartDateLocal optional.Time + type SegmentEffortsApiService service + func (a *SegmentEffortsApiService) GetEffortsBySegmentId(ctx context.Context, segmentId int32, ...) ([]DetailedSegmentEffort, *http.Response, error) + func (a *SegmentEffortsApiService) GetSegmentEffortById(ctx context.Context, id int64) (DetailedSegmentEffort, *http.Response, error) + type SegmentsApiExploreSegmentsOpts struct + ActivityType optional.String + MaxCat optional.Int32 + MinCat optional.Int32 + type SegmentsApiGetLoggedInAthleteStarredSegmentsOpts struct + Page optional.Int32 + PerPage optional.Int32 + type SegmentsApiService service + func (a *SegmentsApiService) ExploreSegments(ctx context.Context, bounds []float32, ...) (ExplorerResponse, *http.Response, error) + func (a *SegmentsApiService) GetLoggedInAthleteStarredSegments(ctx context.Context, ...) ([]SummarySegment, *http.Response, error) + func (a *SegmentsApiService) GetSegmentById(ctx context.Context, id int64) (DetailedSegment, *http.Response, error) + func (a *SegmentsApiService) StarSegment(ctx context.Context, id int64, starred bool) (DetailedSegment, *http.Response, error) + type SmoothGradeStream struct + Data []float32 + OriginalSize int32 + Resolution string + SeriesType string + type SmoothVelocityStream struct + Data []float32 + OriginalSize int32 + Resolution string + SeriesType string + type Split struct + AverageSpeed float32 + Distance float32 + ElapsedTime int32 + ElevationDifference float32 + MovingTime int32 + PaceZone int32 + Split int32 + type StreamSet struct + Altitude *AltitudeStream + Cadence *CadenceStream + Distance *DistanceStream + GradeSmooth *SmoothGradeStream + Heartrate *HeartrateStream + Latlng *LatLngStream + Moving *MovingStream + Temp *TemperatureStream + Time *TimeStream + VelocitySmooth *SmoothVelocityStream + Watts *PowerStream + type StreamsApiService service + func (a *StreamsApiService) GetActivityStreams(ctx context.Context, id int64, keys []string, keyByType bool) (StreamSet, *http.Response, error) + func (a *StreamsApiService) GetRouteStreams(ctx context.Context, id int64) (StreamSet, *http.Response, error) + func (a *StreamsApiService) GetSegmentEffortStreams(ctx context.Context, id int64, keys []string, keyByType bool) (StreamSet, *http.Response, error) + func (a *StreamsApiService) GetSegmentStreams(ctx context.Context, id int64, keys []string, keyByType bool) (StreamSet, *http.Response, error) + type SummaryActivity struct + AchievementCount int32 + Athlete *MetaAthlete + AthleteCount int32 + AverageSpeed float32 + AverageWatts float32 + CommentCount int32 + Commute bool + DeviceWatts bool + Distance float32 + ElapsedTime int32 + ElevHigh float32 + ElevLow float32 + EndLatlng *LatLng + ExternalId string + Flagged bool + GearId string + HasKudoed bool + HideFromHome bool + Id int64 + Kilojoules float32 + KudosCount int32 + Manual bool + Map_ *PolylineMap + MaxSpeed float32 + MaxWatts int32 + MovingTime int32 + Name string + PhotoCount int32 + Private bool + StartDate time.Time + StartDateLocal time.Time + StartLatlng *LatLng + Timezone string + TotalElevationGain float32 + TotalPhotoCount int32 + Trainer bool + Type_ *ActivityType + UploadId int64 + UploadIdStr string + WeightedAverageWatts int32 + WorkoutType int32 + type SummaryAthlete struct + City string + Country string + CreatedAt time.Time + Firstname string + Id int64 + Lastname string + Premium bool + Profile string + ProfileMedium string + ResourceState int32 + Sex string + State string + Summit bool + UpdatedAt time.Time + type SummaryClub struct + ActivityTypes []ActivityType + City string + Country string + CoverPhoto string + CoverPhotoSmall string + Featured bool + Id int64 + MemberCount int32 + Name string + Private bool + ProfileMedium string + ResourceState int32 + SportType string + State string + Url string + Verified bool + type SummaryGear struct + Distance float32 + Id string + Name string + Primary bool + ResourceState int32 + type SummaryPrSegmentEffort struct + EffortCount int32 + PrActivityId int64 + PrDate time.Time + PrElapsedTime int32 + type SummarySegment struct + ActivityType string + AthletePrEffort *SummarySegmentEffort + AthleteSegmentStats *SummaryPrSegmentEffort + AverageGrade float32 + City string + ClimbCategory int32 + Country string + Distance float32 + ElevationHigh float32 + ElevationLow float32 + EndLatlng *LatLng + Id int64 + MaximumGrade float32 + Name string + Private bool + StartLatlng *LatLng + State string + type SummarySegmentEffort struct + ActivityId int64 + Distance float32 + ElapsedTime int32 + Id int64 + IsKom bool + StartDate time.Time + StartDateLocal time.Time + type TemperatureStream struct + Data []int32 + OriginalSize int32 + Resolution string + SeriesType string + type TimeStream struct + Data []int32 + OriginalSize int32 + Resolution string + SeriesType string + type TimedZoneDistribution struct + type TimedZoneRange struct + Max int32 + Min int32 + Time int32 + type UpdatableActivity struct + Commute bool + Description string + GearId string + HideFromHome bool + Name string + Trainer bool + Type_ *ActivityType + type Upload struct + ActivityId int64 + Error_ string + ExternalId string + Id int64 + IdStr string + Status string + type UploadsApiCreateUploadOpts struct + Commute optional.String + DataType optional.String + Description optional.String + ExternalId optional.String + File optional.Interface + Name optional.String + Trainer optional.String + type UploadsApiService service + func (a *UploadsApiService) CreateUpload(ctx context.Context, localVarOptionals *UploadsApiCreateUploadOpts) (Upload, *http.Response, error) + func (a *UploadsApiService) GetUploadById(ctx context.Context, uploadId int64) (Upload, *http.Response, error) + type ZoneRange struct + Max int32 + Min int32 + type ZoneRanges struct + type Zones struct + HeartRate *HeartRateZoneRanges + Power *PowerZoneRanges