Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type ActivitiesApiCreateActivityOpts
- type ActivitiesApiGetActivityByIdOpts
- type ActivitiesApiGetCommentsByActivityIdOpts
- type ActivitiesApiGetKudoersByActivityIdOpts
- type ActivitiesApiGetLoggedInAthleteActivitiesOpts
- type ActivitiesApiService
- 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
- type ActivityStats
- type ActivityTotal
- type ActivityType
- type ActivityZone
- type AltitudeStream
- type AthletesApiService
- 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
- type BasicAuth
- type CadenceStream
- type ClubsApiGetClubActivitiesByIdOpts
- type ClubsApiGetClubAdminsByIdOpts
- type ClubsApiGetClubMembersByIdOpts
- type ClubsApiGetLoggedInAthleteClubsOpts
- type ClubsApiService
- 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
- type Configuration
- type DetailedActivity
- type DetailedAthlete
- type DetailedClub
- type DetailedGear
- type DetailedSegment
- type DetailedSegmentEffort
- type DistanceStream
- type ExplorerResponse
- type ExplorerSegment
- type Fault
- type GearsApiService
- type GenericSwaggerError
- type HeartRateZoneRanges
- type HeartrateStream
- type Lap
- type LatLng
- type LatLngStream
- type MetaActivity
- type MetaAthlete
- type MetaClub
- type ModelError
- type MovingStream
- type PhotosSummary
- type PhotosSummaryPrimary
- type PolylineMap
- type PowerStream
- type PowerZoneRanges
- type Route
- type RoutesApiGetRoutesByAthleteIdOpts
- type RoutesApiService
- 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
- type SegmentEffortsApiService
- type SegmentsApiExploreSegmentsOpts
- type SegmentsApiGetLoggedInAthleteStarredSegmentsOpts
- type SegmentsApiService
- 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
- type SmoothVelocityStream
- type Split
- type StreamSet
- type StreamsApiService
- 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
- type SummaryAthlete
- type SummaryClub
- type SummaryGear
- type SummaryPrSegmentEffort
- type SummarySegment
- type SummarySegmentEffort
- type TemperatureStream
- type TimeStream
- type TimedZoneDistribution
- type TimedZoneRange
- type UpdatableActivity
- type Upload
- type UploadsApiCreateUploadOpts
- type UploadsApiService
- type ZoneRange
- type ZoneRanges
- type Zones
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { ActivitiesApi *ActivitiesApiService AthletesApi *AthletesApiService ClubsApi *ClubsApiService GearsApi *GearsApiService RoutesApi *RoutesApiService SegmentEffortsApi *SegmentEffortsApiService SegmentsApi *SegmentsApiService StreamsApi *StreamsApiService UploadsApi *UploadsApiService // contains filtered or unexported fields }
APIClient manages communication with the Strava API v3 API v3.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type ActivitiesApiService ¶
type ActivitiesApiService service
func (*ActivitiesApiService) CreateActivity ¶
func (a *ActivitiesApiService) CreateActivity(ctx context.Context, name string, type_ string, startDateLocal time.Time, elapsedTime int32, localVarOptionals *ActivitiesApiCreateActivityOpts) (DetailedActivity, *http.Response, error)
func (*ActivitiesApiService) GetActivityById ¶
func (a *ActivitiesApiService) GetActivityById(ctx context.Context, id int64, localVarOptionals *ActivitiesApiGetActivityByIdOpts) (DetailedActivity, *http.Response, error)
func (*ActivitiesApiService) GetCommentsByActivityId ¶
func (a *ActivitiesApiService) GetCommentsByActivityId(ctx context.Context, id int64, localVarOptionals *ActivitiesApiGetCommentsByActivityIdOpts) ([]Comment, *http.Response, error)
func (*ActivitiesApiService) GetKudoersByActivityId ¶
func (a *ActivitiesApiService) GetKudoersByActivityId(ctx context.Context, id int64, localVarOptionals *ActivitiesApiGetKudoersByActivityIdOpts) ([]SummaryAthlete, *http.Response, error)
func (*ActivitiesApiService) GetLapsByActivityId ¶
func (a *ActivitiesApiService) GetLapsByActivityId(ctx context.Context, id int64) ([]Lap, *http.Response, error)
ActivitiesApiService List Activity Laps Returns the laps of an activity identified by an identifier. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the activity.
@return []Lap
func (*ActivitiesApiService) GetLoggedInAthleteActivities ¶
func (a *ActivitiesApiService) GetLoggedInAthleteActivities(ctx context.Context, localVarOptionals *ActivitiesApiGetLoggedInAthleteActivitiesOpts) ([]SummaryActivity, *http.Response, error)
func (*ActivitiesApiService) GetZonesByActivityId ¶
func (a *ActivitiesApiService) GetZonesByActivityId(ctx context.Context, id int64) ([]ActivityZone, *http.Response, error)
ActivitiesApiService Get Activity Zones Summit Feature. Returns the zones of a given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the activity.
@return []ActivityZone
func (*ActivitiesApiService) UpdateActivityById ¶
func (a *ActivitiesApiService) UpdateActivityById(ctx context.Context, id int64, localVarOptionals *ActivitiesApiUpdateActivityByIdOpts) (DetailedActivity, *http.Response, error)
type ActivityStats ¶
type ActivityStats struct { // The longest distance ridden by the athlete. BiggestRideDistance float64 `json:"biggest_ride_distance,omitempty"` // The highest climb ridden by the athlete. BiggestClimbElevationGain float64 `json:"biggest_climb_elevation_gain,omitempty"` // The recent (last 4 weeks) ride stats for the athlete. RecentRideTotals *ActivityTotal `json:"recent_ride_totals,omitempty"` // The recent (last 4 weeks) run stats for the athlete. RecentRunTotals *ActivityTotal `json:"recent_run_totals,omitempty"` // The recent (last 4 weeks) swim stats for the athlete. RecentSwimTotals *ActivityTotal `json:"recent_swim_totals,omitempty"` // The year to date ride stats for the athlete. YtdRideTotals *ActivityTotal `json:"ytd_ride_totals,omitempty"` // The year to date run stats for the athlete. YtdRunTotals *ActivityTotal `json:"ytd_run_totals,omitempty"` // The year to date swim stats for the athlete. YtdSwimTotals *ActivityTotal `json:"ytd_swim_totals,omitempty"` // The all time ride stats for the athlete. AllRideTotals *ActivityTotal `json:"all_ride_totals,omitempty"` // The all time run stats for the athlete. AllRunTotals *ActivityTotal `json:"all_run_totals,omitempty"` // The all time swim stats for the athlete. AllSwimTotals *ActivityTotal `json:"all_swim_totals,omitempty"` }
A set of rolled-up statistics and totals for an athlete
type ActivityTotal ¶
type ActivityTotal struct { // The number of activities considered in this total. Count int32 `json:"count,omitempty"` // The total distance covered by the considered activities. Distance float32 `json:"distance,omitempty"` // The total moving time of the considered activities. MovingTime int32 `json:"moving_time,omitempty"` // The total elapsed time of the considered activities. ElapsedTime int32 `json:"elapsed_time,omitempty"` // The total elevation gain of the considered activities. ElevationGain float32 `json:"elevation_gain,omitempty"` // The total number of achievements of the considered activities. AchievementCount int32 `json:"achievement_count,omitempty"` }
A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters.
type ActivityType ¶
type ActivityType string
ActivityType : An enumeration of the types an activity may have.
const ( ALPINE_SKI ActivityType = "AlpineSki" BACKCOUNTRY_SKI ActivityType = "BackcountrySki" CANOEING ActivityType = "Canoeing" CROSSFIT ActivityType = "Crossfit" E_BIKE_RIDE ActivityType = "EBikeRide" ELLIPTICAL ActivityType = "Elliptical" GOLF ActivityType = "Golf" HANDCYCLE ActivityType = "Handcycle" HIKE ActivityType = "Hike" ICE_SKATE ActivityType = "IceSkate" INLINE_SKATE ActivityType = "InlineSkate" KAYAKING ActivityType = "Kayaking" KITESURF ActivityType = "Kitesurf" NORDIC_SKI ActivityType = "NordicSki" RIDE ActivityType = "Ride" ROCK_CLIMBING ActivityType = "RockClimbing" ROLLER_SKI ActivityType = "RollerSki" ROWING ActivityType = "Rowing" RUN ActivityType = "Run" SAIL ActivityType = "Sail" SKATEBOARD ActivityType = "Skateboard" SNOWBOARD ActivityType = "Snowboard" SNOWSHOE ActivityType = "Snowshoe" SOCCER ActivityType = "Soccer" STAIR_STEPPER ActivityType = "StairStepper" STAND_UP_PADDLING ActivityType = "StandUpPaddling" SURFING ActivityType = "Surfing" SWIM ActivityType = "Swim" VELOMOBILE ActivityType = "Velomobile" VIRTUAL_RIDE ActivityType = "VirtualRide" VIRTUAL_RUN ActivityType = "VirtualRun" WALK ActivityType = "Walk" WEIGHT_TRAINING ActivityType = "WeightTraining" WHEELCHAIR ActivityType = "Wheelchair" WINDSURF ActivityType = "Windsurf" WORKOUT ActivityType = "Workout" YOGA ActivityType = "Yoga" )
List of ActivityType
type ActivityZone ¶
type ActivityZone struct { Score int32 `json:"score,omitempty"` DistributionBuckets *TimedZoneDistribution `json:"distribution_buckets,omitempty"` Type_ string `json:"type,omitempty"` SensorBased bool `json:"sensor_based,omitempty"` Points int32 `json:"points,omitempty"` CustomZones bool `json:"custom_zones,omitempty"` Max int32 `json:"max,omitempty"` }
type AltitudeStream ¶
type AltitudeStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of altitude values for this stream, in meters Data []float32 `json:"data,omitempty"` }
type AthletesApiService ¶
type AthletesApiService service
func (*AthletesApiService) GetLoggedInAthlete ¶
func (a *AthletesApiService) GetLoggedInAthlete(ctx context.Context) (DetailedAthlete, *http.Response, error)
AthletesApiService Get Authenticated Athlete Returns the currently authenticated athlete. Tokens with profile:read_all scope will receive a detailed athlete representation; all others will receive a summary representation.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return DetailedAthlete
func (*AthletesApiService) GetLoggedInAthleteZones ¶
func (a *AthletesApiService) GetLoggedInAthleteZones(ctx context.Context) (Zones, *http.Response, error)
AthletesApiService Get Zones Returns the the authenticated athlete's heart rate and power zones. Requires profile:read_all.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return Zones
func (*AthletesApiService) GetStats ¶
func (a *AthletesApiService) GetStats(ctx context.Context, id int64) (ActivityStats, *http.Response, error)
AthletesApiService Get Athlete Stats Returns the activity stats of an athlete. Only includes data from activities set to Everyone visibilty.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the athlete. Must match the authenticated athlete.
@return ActivityStats
func (*AthletesApiService) UpdateLoggedInAthlete ¶
func (a *AthletesApiService) UpdateLoggedInAthlete(ctx context.Context, weight float32) (DetailedAthlete, *http.Response, error)
AthletesApiService Update Athlete Update the currently authenticated athlete. Requires profile:write scope.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param weight The weight of the athlete in kilograms.
@return DetailedAthlete
type BaseStream ¶
type BaseStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` }
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type CadenceStream ¶
type CadenceStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of cadence values for this stream, in rotations per minute Data []int32 `json:"data,omitempty"` }
type ClubsApiService ¶
type ClubsApiService service
func (*ClubsApiService) GetClubActivitiesById ¶
func (a *ClubsApiService) GetClubActivitiesById(ctx context.Context, id int64, localVarOptionals *ClubsApiGetClubActivitiesByIdOpts) ([]SummaryActivity, *http.Response, error)
func (*ClubsApiService) GetClubAdminsById ¶
func (a *ClubsApiService) GetClubAdminsById(ctx context.Context, id int64, localVarOptionals *ClubsApiGetClubAdminsByIdOpts) ([]SummaryAthlete, *http.Response, error)
func (*ClubsApiService) GetClubById ¶
func (a *ClubsApiService) GetClubById(ctx context.Context, id int64) (DetailedClub, *http.Response, error)
ClubsApiService Get Club Returns a given club using its identifier.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the club.
@return DetailedClub
func (*ClubsApiService) GetClubMembersById ¶
func (a *ClubsApiService) GetClubMembersById(ctx context.Context, id int64, localVarOptionals *ClubsApiGetClubMembersByIdOpts) ([]SummaryAthlete, *http.Response, error)
func (*ClubsApiService) GetLoggedInAthleteClubs ¶
func (a *ClubsApiService) GetLoggedInAthleteClubs(ctx context.Context, localVarOptionals *ClubsApiGetLoggedInAthleteClubsOpts) ([]SummaryClub, *http.Response, error)
type Comment ¶
type Comment struct { // The unique identifier of this comment Id int64 `json:"id,omitempty"` // The identifier of the activity this comment is related to ActivityId int64 `json:"activity_id,omitempty"` // The content of the comment Text string `json:"text,omitempty"` Athlete *SummaryAthlete `json:"athlete,omitempty"` // The time at which this comment was created. CreatedAt time.Time `json:"created_at,omitempty"` }
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type DetailedActivity ¶
type DetailedActivity struct { // The unique identifier of the activity Id int64 `json:"id,omitempty"` // The identifier provided at upload time ExternalId string `json:"external_id,omitempty"` // The identifier of the upload that resulted in this activity UploadId int64 `json:"upload_id,omitempty"` Athlete *MetaAthlete `json:"athlete,omitempty"` // The name of the activity Name string `json:"name,omitempty"` // The activity's distance, in meters Distance float32 `json:"distance,omitempty"` // The activity's moving time, in seconds MovingTime int32 `json:"moving_time,omitempty"` // The activity's elapsed time, in seconds ElapsedTime int32 `json:"elapsed_time,omitempty"` // The activity's total elevation gain. TotalElevationGain float32 `json:"total_elevation_gain,omitempty"` // The activity's highest elevation, in meters ElevHigh float32 `json:"elev_high,omitempty"` // The activity's lowest elevation, in meters ElevLow float32 `json:"elev_low,omitempty"` Type_ *ActivityType `json:"type,omitempty"` // The time at which the activity was started. StartDate time.Time `json:"start_date,omitempty"` // The time at which the activity was started in the local timezone. StartDateLocal time.Time `json:"start_date_local,omitempty"` // The timezone of the activity Timezone string `json:"timezone,omitempty"` StartLatlng *LatLng `json:"start_latlng,omitempty"` EndLatlng *LatLng `json:"end_latlng,omitempty"` // The number of achievements gained during this activity AchievementCount int32 `json:"achievement_count,omitempty"` // The number of kudos given for this activity KudosCount int32 `json:"kudos_count,omitempty"` // The number of comments for this activity CommentCount int32 `json:"comment_count,omitempty"` // The number of athletes for taking part in a group activity AthleteCount int32 `json:"athlete_count,omitempty"` // The number of Instagram photos for this activity PhotoCount int32 `json:"photo_count,omitempty"` // The number of Instagram and Strava photos for this activity TotalPhotoCount int32 `json:"total_photo_count,omitempty"` Map_ *PolylineMap `json:"map,omitempty"` // Whether this activity was recorded on a training machine Trainer bool `json:"trainer,omitempty"` // Whether this activity is a commute Commute bool `json:"commute,omitempty"` // Whether this activity was created manually Manual bool `json:"manual,omitempty"` // Whether this activity is private Private bool `json:"private,omitempty"` // Whether this activity is flagged Flagged bool `json:"flagged,omitempty"` // The activity's workout type WorkoutType int32 `json:"workout_type,omitempty"` // The unique identifier of the upload in string format UploadIdStr string `json:"upload_id_str,omitempty"` // The activity's average speed, in meters per second AverageSpeed float32 `json:"average_speed,omitempty"` // The activity's max speed, in meters per second MaxSpeed float32 `json:"max_speed,omitempty"` // Whether the logged-in athlete has kudoed this activity HasKudoed bool `json:"has_kudoed,omitempty"` // Whether the activity is muted HideFromHome bool `json:"hide_from_home,omitempty"` // The id of the gear for the activity GearId string `json:"gear_id,omitempty"` // The total work done in kilojoules during this activity. Rides only Kilojoules float32 `json:"kilojoules,omitempty"` // Average power output in watts during this activity. Rides only AverageWatts float32 `json:"average_watts,omitempty"` // Whether the watts are from a power meter, false if estimated DeviceWatts bool `json:"device_watts,omitempty"` // Rides with power meter data only MaxWatts int32 `json:"max_watts,omitempty"` // Similar to Normalized Power. Rides with power meter data only WeightedAverageWatts int32 `json:"weighted_average_watts,omitempty"` // The description of the activity Description string `json:"description,omitempty"` Photos *PhotosSummary `json:"photos,omitempty"` Gear *SummaryGear `json:"gear,omitempty"` // The number of kilocalories consumed during this activity Calories float32 `json:"calories,omitempty"` SegmentEfforts []DetailedSegmentEffort `json:"segment_efforts,omitempty"` // The name of the device used to record the activity DeviceName string `json:"device_name,omitempty"` // The token used to embed a Strava activity EmbedToken string `json:"embed_token,omitempty"` // The splits of this activity in metric units (for runs) SplitsMetric []Split `json:"splits_metric,omitempty"` // The splits of this activity in imperial units (for runs) SplitsStandard []Split `json:"splits_standard,omitempty"` Laps []Lap `json:"laps,omitempty"` BestEfforts []DetailedSegmentEffort `json:"best_efforts,omitempty"` }
type DetailedAthlete ¶
type DetailedAthlete struct { // The unique identifier of the athlete Id int64 `json:"id,omitempty"` // Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\" ResourceState int32 `json:"resource_state,omitempty"` // The athlete's first name. Firstname string `json:"firstname,omitempty"` // The athlete's last name. Lastname string `json:"lastname,omitempty"` // URL to a 62x62 pixel profile picture. ProfileMedium string `json:"profile_medium,omitempty"` // URL to a 124x124 pixel profile picture. Profile string `json:"profile,omitempty"` // The athlete's city. City string `json:"city,omitempty"` // The athlete's state or geographical region. State string `json:"state,omitempty"` // The athlete's country. Country string `json:"country,omitempty"` // The athlete's sex. Sex string `json:"sex,omitempty"` // Deprecated. Use summit field instead. Whether the athlete has any Summit subscription. Premium bool `json:"premium,omitempty"` // Whether the athlete has any Summit subscription. Summit bool `json:"summit,omitempty"` // The time at which the athlete was created. CreatedAt time.Time `json:"created_at,omitempty"` // The time at which the athlete was last updated. UpdatedAt time.Time `json:"updated_at,omitempty"` // The athlete's follower count. FollowerCount int32 `json:"follower_count,omitempty"` // The athlete's friend count. FriendCount int32 `json:"friend_count,omitempty"` // The athlete's preferred unit system. MeasurementPreference string `json:"measurement_preference,omitempty"` // The athlete's FTP (Functional Threshold Power). Ftp int32 `json:"ftp,omitempty"` // The athlete's weight. Weight float32 `json:"weight,omitempty"` // The athlete's clubs. Clubs []SummaryClub `json:"clubs,omitempty"` // The athlete's bikes. Bikes []SummaryGear `json:"bikes,omitempty"` // The athlete's shoes. Shoes []SummaryGear `json:"shoes,omitempty"` }
type DetailedClub ¶
type DetailedClub struct { // The club's unique identifier. Id int64 `json:"id,omitempty"` // Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\" ResourceState int32 `json:"resource_state,omitempty"` // The club's name. Name string `json:"name,omitempty"` // URL to a 60x60 pixel profile picture. ProfileMedium string `json:"profile_medium,omitempty"` // URL to a ~1185x580 pixel cover photo. CoverPhoto string `json:"cover_photo,omitempty"` // URL to a ~360x176 pixel cover photo. CoverPhotoSmall string `json:"cover_photo_small,omitempty"` // Deprecated. Prefer to use activity_types. SportType string `json:"sport_type,omitempty"` // The activity types that count for a club. This takes precedence over sport_type. ActivityTypes []ActivityType `json:"activity_types,omitempty"` // The club's city. City string `json:"city,omitempty"` // The club's state or geographical region. State string `json:"state,omitempty"` // The club's country. Country string `json:"country,omitempty"` // Whether the club is private. Private bool `json:"private,omitempty"` // The club's member count. MemberCount int32 `json:"member_count,omitempty"` // Whether the club is featured or not. Featured bool `json:"featured,omitempty"` // Whether the club is verified or not. Verified bool `json:"verified,omitempty"` // The club's vanity URL. Url string `json:"url,omitempty"` // The membership status of the logged-in athlete. Membership string `json:"membership,omitempty"` // Whether the currently logged-in athlete is an administrator of this club. Admin bool `json:"admin,omitempty"` // Whether the currently logged-in athlete is the owner of this club. Owner bool `json:"owner,omitempty"` // The number of athletes in the club that the logged-in athlete follows. FollowingCount int32 `json:"following_count,omitempty"` }
type DetailedGear ¶
type DetailedGear struct { // The gear's unique identifier. Id string `json:"id,omitempty"` // Resource state, indicates level of detail. Possible values: 2 -> \"summary\", 3 -> \"detail\" ResourceState int32 `json:"resource_state,omitempty"` // Whether this gear's is the owner's default one. Primary bool `json:"primary,omitempty"` // The gear's name. Name string `json:"name,omitempty"` // The distance logged with this gear. Distance float32 `json:"distance,omitempty"` // The gear's brand name. BrandName string `json:"brand_name,omitempty"` // The gear's model name. ModelName string `json:"model_name,omitempty"` // The gear's frame type (bike only). FrameType int32 `json:"frame_type,omitempty"` // The gear's description. Description string `json:"description,omitempty"` }
type DetailedSegment ¶
type DetailedSegment struct { // The unique identifier of this segment Id int64 `json:"id,omitempty"` // The name of this segment Name string `json:"name,omitempty"` ActivityType string `json:"activity_type,omitempty"` // The segment's distance, in meters Distance float32 `json:"distance,omitempty"` // The segment's average grade, in percents AverageGrade float32 `json:"average_grade,omitempty"` // The segments's maximum grade, in percents MaximumGrade float32 `json:"maximum_grade,omitempty"` // The segments's highest elevation, in meters ElevationHigh float32 `json:"elevation_high,omitempty"` // The segments's lowest elevation, in meters ElevationLow float32 `json:"elevation_low,omitempty"` StartLatlng *LatLng `json:"start_latlng,omitempty"` EndLatlng *LatLng `json:"end_latlng,omitempty"` // The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category. ClimbCategory int32 `json:"climb_category,omitempty"` // The segments's city. City string `json:"city,omitempty"` // The segments's state or geographical region. State string `json:"state,omitempty"` // The segment's country. Country string `json:"country,omitempty"` // Whether this segment is private. Private bool `json:"private,omitempty"` AthletePrEffort *SummarySegmentEffort `json:"athlete_pr_effort,omitempty"` AthleteSegmentStats *SummaryPrSegmentEffort `json:"athlete_segment_stats,omitempty"` // The time at which the segment was created. CreatedAt time.Time `json:"created_at,omitempty"` // The time at which the segment was last updated. UpdatedAt time.Time `json:"updated_at,omitempty"` // The segment's total elevation gain. TotalElevationGain float32 `json:"total_elevation_gain,omitempty"` Map_ *PolylineMap `json:"map,omitempty"` // The total number of efforts for this segment EffortCount int32 `json:"effort_count,omitempty"` // The number of unique athletes who have an effort for this segment AthleteCount int32 `json:"athlete_count,omitempty"` // Whether this segment is considered hazardous Hazardous bool `json:"hazardous,omitempty"` // The number of stars for this segment StarCount int32 `json:"star_count,omitempty"` }
type DetailedSegmentEffort ¶
type DetailedSegmentEffort struct { // The unique identifier of this effort Id int64 `json:"id,omitempty"` // The unique identifier of the activity related to this effort ActivityId int64 `json:"activity_id,omitempty"` // The effort's elapsed time ElapsedTime int32 `json:"elapsed_time,omitempty"` // The time at which the effort was started. StartDate time.Time `json:"start_date,omitempty"` // The time at which the effort was started in the local timezone. StartDateLocal time.Time `json:"start_date_local,omitempty"` // The effort's distance in meters Distance float32 `json:"distance,omitempty"` // Whether this effort is the current best on the leaderboard IsKom bool `json:"is_kom,omitempty"` // The name of the segment on which this effort was performed Name string `json:"name,omitempty"` Activity *MetaActivity `json:"activity,omitempty"` Athlete *MetaAthlete `json:"athlete,omitempty"` // The effort's moving time MovingTime int32 `json:"moving_time,omitempty"` // The start index of this effort in its activity's stream StartIndex int32 `json:"start_index,omitempty"` // The end index of this effort in its activity's stream EndIndex int32 `json:"end_index,omitempty"` // The effort's average cadence AverageCadence float32 `json:"average_cadence,omitempty"` // The average wattage of this effort AverageWatts float32 `json:"average_watts,omitempty"` // For riding efforts, whether the wattage was reported by a dedicated recording device DeviceWatts bool `json:"device_watts,omitempty"` // The heart heart rate of the athlete during this effort AverageHeartrate float32 `json:"average_heartrate,omitempty"` // The maximum heart rate of the athlete during this effort MaxHeartrate float32 `json:"max_heartrate,omitempty"` Segment *SummarySegment `json:"segment,omitempty"` // The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload KomRank int32 `json:"kom_rank,omitempty"` // The rank of the effort on the athlete's leaderboard if it belongs in the top 3 at the time of upload PrRank int32 `json:"pr_rank,omitempty"` // Whether this effort should be hidden when viewed within an activity Hidden bool `json:"hidden,omitempty"` }
type DistanceStream ¶
type DistanceStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of distance values for this stream, in meters Data []float32 `json:"data,omitempty"` }
type ExplorerResponse ¶
type ExplorerResponse struct { // The set of segments matching an explorer request Segments []ExplorerSegment `json:"segments,omitempty"` }
type ExplorerSegment ¶
type ExplorerSegment struct { // The unique identifier of this segment Id int64 `json:"id,omitempty"` // The name of this segment Name string `json:"name,omitempty"` // The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category. If climb_category = 5, climb_category_desc = HC. If climb_category = 2, climb_category_desc = 3. ClimbCategory int32 `json:"climb_category,omitempty"` // The description for the category of the climb ClimbCategoryDesc string `json:"climb_category_desc,omitempty"` // The segment's average grade, in percents AvgGrade float32 `json:"avg_grade,omitempty"` StartLatlng *LatLng `json:"start_latlng,omitempty"` EndLatlng *LatLng `json:"end_latlng,omitempty"` // The segments's evelation difference, in meters ElevDifference float32 `json:"elev_difference,omitempty"` // The segment's distance, in meters Distance float32 `json:"distance,omitempty"` // The polyline of the segment Points string `json:"points,omitempty"` }
type Fault ¶
type Fault struct { // The set of specific errors associated with this fault, if any. Errors []ModelError `json:"errors,omitempty"` // The message of the fault. Message string `json:"message,omitempty"` }
Encapsulates the errors that may be returned from the API.
type GearsApiService ¶
type GearsApiService service
func (*GearsApiService) GetGearById ¶
func (a *GearsApiService) GetGearById(ctx context.Context, id string) (DetailedGear, *http.Response, error)
GearsApiService Get Equipment Returns an equipment using its identifier.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the gear.
@return DetailedGear
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type HeartRateZoneRanges ¶
type HeartRateZoneRanges struct { // Whether the athlete has set their own custom heart rate zones CustomZones bool `json:"custom_zones,omitempty"` Zones *ZoneRanges `json:"zones,omitempty"` }
type HeartrateStream ¶
type HeartrateStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of heart rate values for this stream, in beats per minute Data []int32 `json:"data,omitempty"` }
type Lap ¶
type Lap struct { // The unique identifier of this lap Id int64 `json:"id,omitempty"` Activity *MetaActivity `json:"activity,omitempty"` Athlete *MetaAthlete `json:"athlete,omitempty"` // The lap's average cadence AverageCadence float32 `json:"average_cadence,omitempty"` // The lap's average speed AverageSpeed float32 `json:"average_speed,omitempty"` // The lap's distance, in meters Distance float32 `json:"distance,omitempty"` // The lap's elapsed time, in seconds ElapsedTime int32 `json:"elapsed_time,omitempty"` // The start index of this effort in its activity's stream StartIndex int32 `json:"start_index,omitempty"` // The end index of this effort in its activity's stream EndIndex int32 `json:"end_index,omitempty"` // The index of this lap in the activity it belongs to LapIndex int32 `json:"lap_index,omitempty"` // The maximum speed of this lat, in meters per second MaxSpeed float32 `json:"max_speed,omitempty"` // The lap's moving time, in seconds MovingTime int32 `json:"moving_time,omitempty"` // The name of the lap Name string `json:"name,omitempty"` // The athlete's pace zone during this lap PaceZone int32 `json:"pace_zone,omitempty"` Split int32 `json:"split,omitempty"` // The time at which the lap was started. StartDate time.Time `json:"start_date,omitempty"` // The time at which the lap was started in the local timezone. StartDateLocal time.Time `json:"start_date_local,omitempty"` // The elevation gain of this lap, in meters TotalElevationGain float32 `json:"total_elevation_gain,omitempty"` }
type LatLng ¶
type LatLng struct { }
A pair of latitude/longitude coordinates, represented as an array of 2 floating point numbers.
type LatLngStream ¶
type LatLngStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of lat/long values for this stream Data []LatLng `json:"data,omitempty"` }
type MetaActivity ¶
type MetaActivity struct { // The unique identifier of the activity Id int64 `json:"id,omitempty"` }
type MetaAthlete ¶
type MetaAthlete struct { // The unique identifier of the athlete Id int64 `json:"id,omitempty"` }
type MetaClub ¶
type MetaClub struct { // The club's unique identifier. Id int64 `json:"id,omitempty"` // Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\" ResourceState int32 `json:"resource_state,omitempty"` // The club's name. Name string `json:"name,omitempty"` }
type ModelError ¶
type ModelError struct { // The code associated with this error. Code string `json:"code,omitempty"` // The specific field or aspect of the resource associated with this error. Field string `json:"field,omitempty"` // The type of resource associated with this error. Resource string `json:"resource,omitempty"` }
type MovingStream ¶
type MovingStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of moving values for this stream, as boolean values Data []bool `json:"data,omitempty"` }
type PhotosSummary ¶
type PhotosSummary struct { // The number of photos Count int32 `json:"count,omitempty"` Primary *PhotosSummaryPrimary `json:"primary,omitempty"` }
type PhotosSummaryPrimary ¶
type PolylineMap ¶
type PolylineMap struct { // The identifier of the map Id string `json:"id,omitempty"` // The polyline of the map, only returned on detailed representation of an object Polyline string `json:"polyline,omitempty"` // The summary polyline of the map SummaryPolyline string `json:"summary_polyline,omitempty"` }
type PowerStream ¶
type PowerStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of power values for this stream, in watts Data []int32 `json:"data,omitempty"` }
type PowerZoneRanges ¶
type PowerZoneRanges struct {
Zones *ZoneRanges `json:"zones,omitempty"`
}
type Route ¶
type Route struct { Athlete *SummaryAthlete `json:"athlete,omitempty"` // The description of the route Description string `json:"description,omitempty"` // The route's distance, in meters Distance float32 `json:"distance,omitempty"` // The route's elevation gain. ElevationGain float32 `json:"elevation_gain,omitempty"` // The unique identifier of this route Id int64 `json:"id,omitempty"` // The unique identifier of the route in string format IdStr string `json:"id_str,omitempty"` Map_ *PolylineMap `json:"map,omitempty"` // The name of this route Name string `json:"name,omitempty"` // Whether this route is private Private bool `json:"private,omitempty"` // Whether this route is starred by the logged-in athlete Starred bool `json:"starred,omitempty"` // An epoch timestamp of when the route was created Timestamp int32 `json:"timestamp,omitempty"` // This route's type (1 for ride, 2 for runs) Type_ int32 `json:"type,omitempty"` // This route's sub-type (1 for road, 2 for mountain bike, 3 for cross, 4 for trail, 5 for mixed) SubType int32 `json:"sub_type,omitempty"` // The time at which the route was created CreatedAt time.Time `json:"created_at,omitempty"` // The time at which the route was last updated UpdatedAt time.Time `json:"updated_at,omitempty"` // Estimated time in seconds for the authenticated athlete to complete route EstimatedMovingTime int32 `json:"estimated_moving_time,omitempty"` // The segments traversed by this route Segments []SummarySegment `json:"segments,omitempty"` }
type RoutesApiService ¶
type RoutesApiService service
func (*RoutesApiService) GetRouteAsGPX ¶
RoutesApiService Export Route GPX Returns a GPX file of the route. Requires read_all scope for private routes.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the route.
func (*RoutesApiService) GetRouteAsTCX ¶
RoutesApiService Export Route TCX Returns a TCX file of the route. Requires read_all scope for private routes.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the route.
func (*RoutesApiService) GetRouteById ¶
func (a *RoutesApiService) GetRouteById(ctx context.Context, id int64) (Route, *http.Response, error)
RoutesApiService Get Route Returns a route using its identifier. Requires read_all scope for private routes.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the route.
@return Route
func (*RoutesApiService) GetRoutesByAthleteId ¶
func (a *RoutesApiService) GetRoutesByAthleteId(ctx context.Context, localVarOptionals *RoutesApiGetRoutesByAthleteIdOpts) ([]Route, *http.Response, error)
type SegmentEffortsApiService ¶
type SegmentEffortsApiService service
func (*SegmentEffortsApiService) GetEffortsBySegmentId ¶
func (a *SegmentEffortsApiService) GetEffortsBySegmentId(ctx context.Context, segmentId int32, localVarOptionals *SegmentEffortsApiGetEffortsBySegmentIdOpts) ([]DetailedSegmentEffort, *http.Response, error)
func (*SegmentEffortsApiService) GetSegmentEffortById ¶
func (a *SegmentEffortsApiService) GetSegmentEffortById(ctx context.Context, id int64) (DetailedSegmentEffort, *http.Response, error)
SegmentEffortsApiService Get Segment Effort Returns a segment effort from an activity that is owned by the authenticated athlete. Requires subscription.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the segment effort.
@return DetailedSegmentEffort
type SegmentsApiService ¶
type SegmentsApiService service
func (*SegmentsApiService) ExploreSegments ¶
func (a *SegmentsApiService) ExploreSegments(ctx context.Context, bounds []float32, localVarOptionals *SegmentsApiExploreSegmentsOpts) (ExplorerResponse, *http.Response, error)
func (*SegmentsApiService) GetLoggedInAthleteStarredSegments ¶
func (a *SegmentsApiService) GetLoggedInAthleteStarredSegments(ctx context.Context, localVarOptionals *SegmentsApiGetLoggedInAthleteStarredSegmentsOpts) ([]SummarySegment, *http.Response, error)
func (*SegmentsApiService) GetSegmentById ¶
func (a *SegmentsApiService) GetSegmentById(ctx context.Context, id int64) (DetailedSegment, *http.Response, error)
SegmentsApiService Get Segment Returns the specified segment. read_all scope required in order to retrieve athlete-specific segment information, or to retrieve private segments.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the segment.
@return DetailedSegment
func (*SegmentsApiService) StarSegment ¶
func (a *SegmentsApiService) StarSegment(ctx context.Context, id int64, starred bool) (DetailedSegment, *http.Response, error)
SegmentsApiService Star Segment Stars/Unstars the given segment for the authenticated athlete. Requires profile:write scope.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the segment to star.
- @param starred If true, star the segment; if false, unstar the segment.
@return DetailedSegment
type SmoothGradeStream ¶
type SmoothGradeStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of grade values for this stream, as percents of a grade Data []float32 `json:"data,omitempty"` }
type SmoothVelocityStream ¶
type SmoothVelocityStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of velocity values for this stream, in meters per second Data []float32 `json:"data,omitempty"` }
type Split ¶
type Split struct { // The average speed of this split, in meters per second AverageSpeed float32 `json:"average_speed,omitempty"` // The distance of this split, in meters Distance float32 `json:"distance,omitempty"` // The elapsed time of this split, in seconds ElapsedTime int32 `json:"elapsed_time,omitempty"` // The elevation difference of this split, in meters ElevationDifference float32 `json:"elevation_difference,omitempty"` // The pacing zone of this split PaceZone int32 `json:"pace_zone,omitempty"` // The moving time of this split, in seconds MovingTime int32 `json:"moving_time,omitempty"` // N/A Split int32 `json:"split,omitempty"` }
type StreamSet ¶
type StreamSet struct { Time *TimeStream `json:"time,omitempty"` Distance *DistanceStream `json:"distance,omitempty"` Latlng *LatLngStream `json:"latlng,omitempty"` Altitude *AltitudeStream `json:"altitude,omitempty"` VelocitySmooth *SmoothVelocityStream `json:"velocity_smooth,omitempty"` Heartrate *HeartrateStream `json:"heartrate,omitempty"` Cadence *CadenceStream `json:"cadence,omitempty"` Watts *PowerStream `json:"watts,omitempty"` Temp *TemperatureStream `json:"temp,omitempty"` Moving *MovingStream `json:"moving,omitempty"` GradeSmooth *SmoothGradeStream `json:"grade_smooth,omitempty"` }
type StreamsApiService ¶
type StreamsApiService service
func (*StreamsApiService) GetActivityStreams ¶
func (a *StreamsApiService) GetActivityStreams(ctx context.Context, id int64, keys []string, keyByType bool) (StreamSet, *http.Response, error)
StreamsApiService Get Activity Streams Returns the given activity's streams. Requires activity:read scope. Requires activity:read_all scope for Only Me activities.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the activity.
- @param keys Desired stream types.
- @param keyByType Must be true.
@return StreamSet
func (*StreamsApiService) GetRouteStreams ¶
func (a *StreamsApiService) GetRouteStreams(ctx context.Context, id int64) (StreamSet, *http.Response, error)
StreamsApiService Get Route Streams Returns the given route's streams. Requires read_all scope for private routes.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the route.
@return StreamSet
func (*StreamsApiService) GetSegmentEffortStreams ¶
func (a *StreamsApiService) GetSegmentEffortStreams(ctx context.Context, id int64, keys []string, keyByType bool) (StreamSet, *http.Response, error)
StreamsApiService Get Segment Effort Streams Returns a set of streams for a segment effort completed by the authenticated athlete. Requires read_all scope.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the segment effort.
- @param keys The types of streams to return.
- @param keyByType Must be true.
@return StreamSet
func (*StreamsApiService) GetSegmentStreams ¶
func (a *StreamsApiService) GetSegmentStreams(ctx context.Context, id int64, keys []string, keyByType bool) (StreamSet, *http.Response, error)
StreamsApiService Get Segment Streams Returns the given segment's streams. Requires read_all scope for private segments.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The identifier of the segment.
- @param keys The types of streams to return.
- @param keyByType Must be true.
@return StreamSet
type SummaryActivity ¶
type SummaryActivity struct { // The unique identifier of the activity Id int64 `json:"id,omitempty"` // The identifier provided at upload time ExternalId string `json:"external_id,omitempty"` // The identifier of the upload that resulted in this activity UploadId int64 `json:"upload_id,omitempty"` Athlete *MetaAthlete `json:"athlete,omitempty"` // The name of the activity Name string `json:"name,omitempty"` // The activity's distance, in meters Distance float32 `json:"distance,omitempty"` // The activity's moving time, in seconds MovingTime int32 `json:"moving_time,omitempty"` // The activity's elapsed time, in seconds ElapsedTime int32 `json:"elapsed_time,omitempty"` // The activity's total elevation gain. TotalElevationGain float32 `json:"total_elevation_gain,omitempty"` // The activity's highest elevation, in meters ElevHigh float32 `json:"elev_high,omitempty"` // The activity's lowest elevation, in meters ElevLow float32 `json:"elev_low,omitempty"` Type_ *ActivityType `json:"type,omitempty"` // The time at which the activity was started. StartDate time.Time `json:"start_date,omitempty"` // The time at which the activity was started in the local timezone. StartDateLocal time.Time `json:"start_date_local,omitempty"` // The timezone of the activity Timezone string `json:"timezone,omitempty"` StartLatlng *LatLng `json:"start_latlng,omitempty"` EndLatlng *LatLng `json:"end_latlng,omitempty"` // The number of achievements gained during this activity AchievementCount int32 `json:"achievement_count,omitempty"` // The number of kudos given for this activity KudosCount int32 `json:"kudos_count,omitempty"` // The number of comments for this activity CommentCount int32 `json:"comment_count,omitempty"` // The number of athletes for taking part in a group activity AthleteCount int32 `json:"athlete_count,omitempty"` // The number of Instagram photos for this activity PhotoCount int32 `json:"photo_count,omitempty"` // The number of Instagram and Strava photos for this activity TotalPhotoCount int32 `json:"total_photo_count,omitempty"` Map_ *PolylineMap `json:"map,omitempty"` // Whether this activity was recorded on a training machine Trainer bool `json:"trainer,omitempty"` // Whether this activity is a commute Commute bool `json:"commute,omitempty"` // Whether this activity was created manually Manual bool `json:"manual,omitempty"` // Whether this activity is private Private bool `json:"private,omitempty"` // Whether this activity is flagged Flagged bool `json:"flagged,omitempty"` // The activity's workout type WorkoutType int32 `json:"workout_type,omitempty"` // The unique identifier of the upload in string format UploadIdStr string `json:"upload_id_str,omitempty"` // The activity's average speed, in meters per second AverageSpeed float32 `json:"average_speed,omitempty"` // The activity's max speed, in meters per second MaxSpeed float32 `json:"max_speed,omitempty"` // Whether the logged-in athlete has kudoed this activity HasKudoed bool `json:"has_kudoed,omitempty"` // Whether the activity is muted HideFromHome bool `json:"hide_from_home,omitempty"` // The id of the gear for the activity GearId string `json:"gear_id,omitempty"` // The total work done in kilojoules during this activity. Rides only Kilojoules float32 `json:"kilojoules,omitempty"` // Average power output in watts during this activity. Rides only AverageWatts float32 `json:"average_watts,omitempty"` // Whether the watts are from a power meter, false if estimated DeviceWatts bool `json:"device_watts,omitempty"` // Rides with power meter data only MaxWatts int32 `json:"max_watts,omitempty"` // Similar to Normalized Power. Rides with power meter data only WeightedAverageWatts int32 `json:"weighted_average_watts,omitempty"` }
type SummaryAthlete ¶
type SummaryAthlete struct { // The unique identifier of the athlete Id int64 `json:"id,omitempty"` // Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\" ResourceState int32 `json:"resource_state,omitempty"` // The athlete's first name. Firstname string `json:"firstname,omitempty"` // The athlete's last name. Lastname string `json:"lastname,omitempty"` // URL to a 62x62 pixel profile picture. ProfileMedium string `json:"profile_medium,omitempty"` // URL to a 124x124 pixel profile picture. Profile string `json:"profile,omitempty"` // The athlete's city. City string `json:"city,omitempty"` // The athlete's state or geographical region. State string `json:"state,omitempty"` // The athlete's country. Country string `json:"country,omitempty"` // The athlete's sex. Sex string `json:"sex,omitempty"` // Deprecated. Use summit field instead. Whether the athlete has any Summit subscription. Premium bool `json:"premium,omitempty"` // Whether the athlete has any Summit subscription. Summit bool `json:"summit,omitempty"` // The time at which the athlete was created. CreatedAt time.Time `json:"created_at,omitempty"` // The time at which the athlete was last updated. UpdatedAt time.Time `json:"updated_at,omitempty"` }
type SummaryClub ¶
type SummaryClub struct { // The club's unique identifier. Id int64 `json:"id,omitempty"` // Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\" ResourceState int32 `json:"resource_state,omitempty"` // The club's name. Name string `json:"name,omitempty"` // URL to a 60x60 pixel profile picture. ProfileMedium string `json:"profile_medium,omitempty"` // URL to a ~1185x580 pixel cover photo. CoverPhoto string `json:"cover_photo,omitempty"` // URL to a ~360x176 pixel cover photo. CoverPhotoSmall string `json:"cover_photo_small,omitempty"` // Deprecated. Prefer to use activity_types. SportType string `json:"sport_type,omitempty"` // The activity types that count for a club. This takes precedence over sport_type. ActivityTypes []ActivityType `json:"activity_types,omitempty"` // The club's city. City string `json:"city,omitempty"` // The club's state or geographical region. State string `json:"state,omitempty"` // The club's country. Country string `json:"country,omitempty"` // Whether the club is private. Private bool `json:"private,omitempty"` // The club's member count. MemberCount int32 `json:"member_count,omitempty"` // Whether the club is featured or not. Featured bool `json:"featured,omitempty"` // Whether the club is verified or not. Verified bool `json:"verified,omitempty"` // The club's vanity URL. Url string `json:"url,omitempty"` }
type SummaryGear ¶
type SummaryGear struct { // The gear's unique identifier. Id string `json:"id,omitempty"` // Resource state, indicates level of detail. Possible values: 2 -> \"summary\", 3 -> \"detail\" ResourceState int32 `json:"resource_state,omitempty"` // Whether this gear's is the owner's default one. Primary bool `json:"primary,omitempty"` // The gear's name. Name string `json:"name,omitempty"` // The distance logged with this gear. Distance float32 `json:"distance,omitempty"` }
type SummaryPrSegmentEffort ¶
type SummaryPrSegmentEffort struct { // The unique identifier of the activity related to the PR effort. PrActivityId int64 `json:"pr_activity_id,omitempty"` // The elapsed time ot the PR effort. PrElapsedTime int32 `json:"pr_elapsed_time,omitempty"` // The time at which the PR effort was started. PrDate time.Time `json:"pr_date,omitempty"` // Number of efforts by the authenticated athlete on this segment. EffortCount int32 `json:"effort_count,omitempty"` }
type SummarySegment ¶
type SummarySegment struct { // The unique identifier of this segment Id int64 `json:"id,omitempty"` // The name of this segment Name string `json:"name,omitempty"` ActivityType string `json:"activity_type,omitempty"` // The segment's distance, in meters Distance float32 `json:"distance,omitempty"` // The segment's average grade, in percents AverageGrade float32 `json:"average_grade,omitempty"` // The segments's maximum grade, in percents MaximumGrade float32 `json:"maximum_grade,omitempty"` // The segments's highest elevation, in meters ElevationHigh float32 `json:"elevation_high,omitempty"` // The segments's lowest elevation, in meters ElevationLow float32 `json:"elevation_low,omitempty"` StartLatlng *LatLng `json:"start_latlng,omitempty"` EndLatlng *LatLng `json:"end_latlng,omitempty"` // The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category. ClimbCategory int32 `json:"climb_category,omitempty"` // The segments's city. City string `json:"city,omitempty"` // The segments's state or geographical region. State string `json:"state,omitempty"` // The segment's country. Country string `json:"country,omitempty"` // Whether this segment is private. Private bool `json:"private,omitempty"` AthletePrEffort *SummarySegmentEffort `json:"athlete_pr_effort,omitempty"` AthleteSegmentStats *SummaryPrSegmentEffort `json:"athlete_segment_stats,omitempty"` }
type SummarySegmentEffort ¶
type SummarySegmentEffort struct { // The unique identifier of this effort Id int64 `json:"id,omitempty"` // The unique identifier of the activity related to this effort ActivityId int64 `json:"activity_id,omitempty"` // The effort's elapsed time ElapsedTime int32 `json:"elapsed_time,omitempty"` // The time at which the effort was started. StartDate time.Time `json:"start_date,omitempty"` // The time at which the effort was started in the local timezone. StartDateLocal time.Time `json:"start_date_local,omitempty"` // The effort's distance in meters Distance float32 `json:"distance,omitempty"` // Whether this effort is the current best on the leaderboard IsKom bool `json:"is_kom,omitempty"` }
type TemperatureStream ¶
type TemperatureStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of temperature values for this stream, in celsius degrees Data []int32 `json:"data,omitempty"` }
type TimeStream ¶
type TimeStream struct { // The number of data points in this stream OriginalSize int32 `json:"original_size,omitempty"` // The level of detail (sampling) in which this stream was returned Resolution string `json:"resolution,omitempty"` // The base series used in the case the stream was downsampled SeriesType string `json:"series_type,omitempty"` // The sequence of time values for this stream, in seconds Data []int32 `json:"data,omitempty"` }
type TimedZoneDistribution ¶
type TimedZoneDistribution struct { }
Stores the exclusive ranges representing zones and the time spent in each.
type TimedZoneRange ¶
type TimedZoneRange struct { // The minimum value in the range. Min int32 `json:"min,omitempty"` // The maximum value in the range. Max int32 `json:"max,omitempty"` // The number of seconds spent in this zone Time int32 `json:"time,omitempty"` }
A union type representing the time spent in a given zone.
type UpdatableActivity ¶
type UpdatableActivity struct { // Whether this activity is a commute Commute bool `json:"commute,omitempty"` // Whether this activity was recorded on a training machine Trainer bool `json:"trainer,omitempty"` // Whether this activity is muted HideFromHome bool `json:"hide_from_home,omitempty"` // The description of the activity Description string `json:"description,omitempty"` // The name of the activity Name string `json:"name,omitempty"` Type_ *ActivityType `json:"type,omitempty"` // Identifier for the gear associated with the activity. ‘none’ clears gear from activity GearId string `json:"gear_id,omitempty"` }
type Upload ¶
type Upload struct { // The unique identifier of the upload Id int64 `json:"id,omitempty"` // The unique identifier of the upload in string format IdStr string `json:"id_str,omitempty"` // The external identifier of the upload ExternalId string `json:"external_id,omitempty"` // The error associated with this upload Error_ string `json:"error,omitempty"` // The status of this upload Status string `json:"status,omitempty"` // The identifier of the activity this upload resulted into ActivityId int64 `json:"activity_id,omitempty"` }
type UploadsApiService ¶
type UploadsApiService service
func (*UploadsApiService) CreateUpload ¶
func (a *UploadsApiService) CreateUpload(ctx context.Context, localVarOptionals *UploadsApiCreateUploadOpts) (Upload, *http.Response, error)
func (*UploadsApiService) GetUploadById ¶
func (a *UploadsApiService) GetUploadById(ctx context.Context, uploadId int64) (Upload, *http.Response, error)
UploadsApiService Get Upload Returns an upload for a given identifier. Requires activity:write scope.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param uploadId The identifier of the upload.
@return Upload
type ZoneRanges ¶
type ZoneRanges struct { }
type Zones ¶
type Zones struct { HeartRate *HeartRateZoneRanges `json:"heart_rate,omitempty"` Power *PowerZoneRanges `json:"power,omitempty"` }
Source Files
¶
- api_activities.go
- api_athletes.go
- api_clubs.go
- api_gears.go
- api_routes.go
- api_segment_efforts.go
- api_segments.go
- api_streams.go
- api_uploads.go
- client.go
- configuration.go
- model_activity_stats.go
- model_activity_total.go
- model_activity_type.go
- model_activity_zone.go
- model_altitude_stream.go
- model_base_stream.go
- model_cadence_stream.go
- model_comment.go
- model_detailed_activity.go
- model_detailed_athlete.go
- model_detailed_club.go
- model_detailed_gear.go
- model_detailed_segment.go
- model_detailed_segment_effort.go
- model_distance_stream.go
- model_error.go
- model_explorer_response.go
- model_explorer_segment.go
- model_fault.go
- model_heart_rate_zone_ranges.go
- model_heartrate_stream.go
- model_lap.go
- model_lat_lng.go
- model_lat_lng_stream.go
- model_meta_activity.go
- model_meta_athlete.go
- model_meta_club.go
- model_moving_stream.go
- model_photos_summary.go
- model_photos_summary_primary.go
- model_polyline_map.go
- model_power_stream.go
- model_power_zone_ranges.go
- model_route.go
- model_smooth_grade_stream.go
- model_smooth_velocity_stream.go
- model_split.go
- model_stream_set.go
- model_summary_activity.go
- model_summary_athlete.go
- model_summary_club.go
- model_summary_gear.go
- model_summary_pr_segment_effort.go
- model_summary_segment.go
- model_summary_segment_effort.go
- model_temperature_stream.go
- model_time_stream.go
- model_timed_zone_distribution.go
- model_timed_zone_range.go
- model_updatable_activity.go
- model_upload.go
- model_zone_range.go
- model_zone_ranges.go
- model_zones.go
- response.go