swagger

package
v0.0.0-...-93e2805 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API client for swagger

The Swagger Playground is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with different endpoints depending on the authorization scope you receive from your athletes. To use the Playground, go to https://www.strava.com/settings/api and change your “Authorization Callback Domain” to developers.strava.com. Please note, we only support Swagger 2.0. There is a known issue where you can only select one scope at a time. For more information, please check the section “client code” at https://developers.strava.com/docs.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 3.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://www.strava.com/api/v3

Class Method HTTP request Description
ActivitiesApi CreateActivity Post /activities Create an Activity
ActivitiesApi GetActivityById Get /activities/{id} Get Activity
ActivitiesApi GetCommentsByActivityId Get /activities/{id}/comments List Activity Comments
ActivitiesApi GetKudoersByActivityId Get /activities/{id}/kudos List Activity Kudoers
ActivitiesApi GetLapsByActivityId Get /activities/{id}/laps List Activity Laps
ActivitiesApi GetLoggedInAthleteActivities Get /athlete/activities List Athlete Activities
ActivitiesApi GetZonesByActivityId Get /activities/{id}/zones Get Activity Zones
ActivitiesApi UpdateActivityById Put /activities/{id} Update Activity
AthletesApi GetLoggedInAthlete Get /athlete Get Authenticated Athlete
AthletesApi GetLoggedInAthleteZones Get /athlete/zones Get Zones
AthletesApi GetStats Get /athletes/{id}/stats Get Athlete Stats
AthletesApi UpdateLoggedInAthlete Put /athlete Update Athlete
ClubsApi GetClubActivitiesById Get /clubs/{id}/activities List Club Activities
ClubsApi GetClubAdminsById Get /clubs/{id}/admins List Club Administrators
ClubsApi GetClubById Get /clubs/{id} Get Club
ClubsApi GetClubMembersById Get /clubs/{id}/members List Club Members
ClubsApi GetLoggedInAthleteClubs Get /athlete/clubs List Athlete Clubs
GearsApi GetGearById Get /gear/{id} Get Equipment
RoutesApi GetRouteAsGPX Get /routes/{id}/export_gpx Export Route GPX
RoutesApi GetRouteAsTCX Get /routes/{id}/export_tcx Export Route TCX
RoutesApi GetRouteById Get /routes/{id} Get Route
RoutesApi GetRoutesByAthleteId Get /athletes/{id}/routes List Athlete Routes
SegmentEffortsApi GetEffortsBySegmentId Get /segment_efforts List Segment Efforts
SegmentEffortsApi GetSegmentEffortById Get /segment_efforts/{id} Get Segment Effort
SegmentsApi ExploreSegments Get /segments/explore Explore segments
SegmentsApi GetLoggedInAthleteStarredSegments Get /segments/starred List Starred Segments
SegmentsApi GetSegmentById Get /segments/{id} Get Segment
SegmentsApi StarSegment Put /segments/{id}/starred Star Segment
StreamsApi GetActivityStreams Get /activities/{id}/streams Get Activity Streams
StreamsApi GetRouteStreams Get /routes/{id}/streams Get Route Streams
StreamsApi GetSegmentEffortStreams Get /segment_efforts/{id}/streams Get Segment Effort Streams
StreamsApi GetSegmentStreams Get /segments/{id}/streams Get Segment Streams
UploadsApi CreateUpload Post /uploads Upload Activity
UploadsApi GetUploadById Get /uploads/{uploadId} Get Upload

Documentation For Models

Documentation For Authorization

strava_oauth

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://www.strava.com/api/v3/oauth/authorize
  • Scopes:
  • read: Read public segments, public routes, public profile data, public posts, public events, club feeds, and leaderboards
  • read_all: Read private routes, private segments, and private events for the user
  • profile:read_all: Read all profile information even if the user has set their profile visibility to Followers or Only You
  • profile:write: Update the user's weight and Functional Threshold Power (FTP), and access to star or unstar segments on their behalf
  • activity:read: Read the user's activity data for activities that are visible to Everyone and Followers, excluding privacy zone data
  • activity:read_all: The same access as activity:read, plus privacy zone data and access to read the user's activities with visibility set to Only You
  • activity:write: Access to create manual activities and uploads, and access to edit any activities that are visible to the app, based on activity read access level

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

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

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

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 ActivitiesApiCreateActivityOpts

type ActivitiesApiCreateActivityOpts struct {
	Type_       optional.String
	Description optional.String
	Distance    optional.Float32
	Trainer     optional.Int32
	Commute     optional.Int32
}

type ActivitiesApiGetActivityByIdOpts

type ActivitiesApiGetActivityByIdOpts struct {
	IncludeAllEfforts optional.Bool
}

type ActivitiesApiGetCommentsByActivityIdOpts

type ActivitiesApiGetCommentsByActivityIdOpts struct {
	Page        optional.Int32
	PerPage     optional.Int32
	PageSize    optional.Int32
	AfterCursor optional.String
}

type ActivitiesApiGetKudoersByActivityIdOpts

type ActivitiesApiGetKudoersByActivityIdOpts struct {
	Page    optional.Int32
	PerPage optional.Int32
}

type ActivitiesApiGetLoggedInAthleteActivitiesOpts

type ActivitiesApiGetLoggedInAthleteActivitiesOpts struct {
	Before  optional.Int32
	After   optional.Int32
	Page    optional.Int32
	PerPage optional.Int32
}

type ActivitiesApiService

type ActivitiesApiService service

func (*ActivitiesApiService) CreateActivity

func (a *ActivitiesApiService) CreateActivity(ctx context.Context, name string, sportType 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 ActivitiesApiUpdateActivityByIdOpts

type ActivitiesApiUpdateActivityByIdOpts struct {
	Body optional.Interface
}

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. Note that this enumeration does not include new sport types (e.g. MountainBikeRide, EMountainBikeRide), activities with these sport types will have the corresponding activity type (e.g. Ride for MountainBikeRide, EBikeRide for EMountainBikeRide)

const (
	ALPINE_SKI_ActivityType        ActivityType = "AlpineSki"
	BACKCOUNTRY_SKI_ActivityType   ActivityType = "BackcountrySki"
	CANOEING_ActivityType          ActivityType = "Canoeing"
	CROSSFIT_ActivityType          ActivityType = "Crossfit"
	E_BIKE_RIDE_ActivityType       ActivityType = "EBikeRide"
	ELLIPTICAL_ActivityType        ActivityType = "Elliptical"
	GOLF_ActivityType              ActivityType = "Golf"
	HANDCYCLE_ActivityType         ActivityType = "Handcycle"
	HIKE_ActivityType              ActivityType = "Hike"
	ICE_SKATE_ActivityType         ActivityType = "IceSkate"
	INLINE_SKATE_ActivityType      ActivityType = "InlineSkate"
	KAYAKING_ActivityType          ActivityType = "Kayaking"
	KITESURF_ActivityType          ActivityType = "Kitesurf"
	NORDIC_SKI_ActivityType        ActivityType = "NordicSki"
	RIDE_ActivityType              ActivityType = "Ride"
	ROCK_CLIMBING_ActivityType     ActivityType = "RockClimbing"
	ROLLER_SKI_ActivityType        ActivityType = "RollerSki"
	ROWING_ActivityType            ActivityType = "Rowing"
	RUN_ActivityType               ActivityType = "Run"
	SAIL_ActivityType              ActivityType = "Sail"
	SKATEBOARD_ActivityType        ActivityType = "Skateboard"
	SNOWBOARD_ActivityType         ActivityType = "Snowboard"
	SNOWSHOE_ActivityType          ActivityType = "Snowshoe"
	SOCCER_ActivityType            ActivityType = "Soccer"
	STAIR_STEPPER_ActivityType     ActivityType = "StairStepper"
	STAND_UP_PADDLING_ActivityType ActivityType = "StandUpPaddling"
	SURFING_ActivityType           ActivityType = "Surfing"
	SWIM_ActivityType              ActivityType = "Swim"
	VELOMOBILE_ActivityType        ActivityType = "Velomobile"
	VIRTUAL_RIDE_ActivityType      ActivityType = "VirtualRide"
	VIRTUAL_RUN_ActivityType       ActivityType = "VirtualRun"
	WALK_ActivityType              ActivityType = "Walk"
	WEIGHT_TRAINING_ActivityType   ActivityType = "WeightTraining"
	WHEELCHAIR_ActivityType        ActivityType = "Wheelchair"
	WINDSURF_ActivityType          ActivityType = "Windsurf"
	WORKOUT_ActivityType           ActivityType = "Workout"
	YOGA_ActivityType              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

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 ClubActivity

type ClubActivity struct {
	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"`
	// Deprecated. Prefer to use sport_type
	Type_     *ActivityType `json:"type,omitempty"`
	SportType *SportType    `json:"sport_type,omitempty"`
	// The activity's workout type
	WorkoutType int32 `json:"workout_type,omitempty"`
}

type ClubAthlete

type ClubAthlete struct {
	// 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 initial.
	Lastname string `json:"lastname,omitempty"`
	// The athlete's member status.
	Member string `json:"member,omitempty"`
	// Whether the athlete is a club admin.
	Admin bool `json:"admin,omitempty"`
	// Whether the athlete is club owner.
	Owner bool `json:"owner,omitempty"`
}

type ClubsApiGetClubActivitiesByIdOpts

type ClubsApiGetClubActivitiesByIdOpts struct {
	Page    optional.Int32
	PerPage optional.Int32
}

type ClubsApiGetClubAdminsByIdOpts

type ClubsApiGetClubAdminsByIdOpts struct {
	Page    optional.Int32
	PerPage optional.Int32
}

type ClubsApiGetClubMembersByIdOpts

type ClubsApiGetClubMembersByIdOpts struct {
	Page    optional.Int32
	PerPage optional.Int32
}

type ClubsApiGetLoggedInAthleteClubsOpts

type ClubsApiGetLoggedInAthleteClubsOpts struct {
	Page    optional.Int32
	PerPage optional.Int32
}

type ClubsApiService

type ClubsApiService service

func (*ClubsApiService) GetClubActivitiesById

func (a *ClubsApiService) GetClubActivitiesById(ctx context.Context, id int64, localVarOptionals *ClubsApiGetClubActivitiesByIdOpts) ([]ClubActivity, *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) ([]ClubAthlete, *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"`
	// Deprecated. Prefer to use sport_type
	Type_     *ActivityType `json:"type,omitempty"`
	SportType *SportType    `json:"sport_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     *SummaryPrSegmentEffort `json:"athlete_pr_effort,omitempty"`
	AthleteSegmentStats *SummarySegmentEffort   `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 PhotosSummaryPrimary struct {
	Id       int64             `json:"id,omitempty"`
	Source   int32             `json:"source,omitempty"`
	UniqueId string            `json:"unique_id,omitempty"`
	Urls     map[string]string `json:"urls,omitempty"`
}

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 RoutesApiGetRoutesByAthleteIdOpts

type RoutesApiGetRoutesByAthleteIdOpts struct {
	Page    optional.Int32
	PerPage optional.Int32
}

type RoutesApiService

type RoutesApiService service

func (*RoutesApiService) GetRouteAsGPX

func (a *RoutesApiService) GetRouteAsGPX(ctx context.Context, id int64) (*http.Response, error)

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

func (a *RoutesApiService) GetRouteAsTCX(ctx context.Context, id int64) (*http.Response, error)

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 SegmentEffortsApiGetEffortsBySegmentIdOpts

type SegmentEffortsApiGetEffortsBySegmentIdOpts struct {
	StartDateLocal optional.Time
	EndDateLocal   optional.Time
	PerPage        optional.Int32
}

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 SegmentsApiExploreSegmentsOpts

type SegmentsApiExploreSegmentsOpts struct {
	ActivityType optional.String
	MinCat       optional.Int32
	MaxCat       optional.Int32
}

type SegmentsApiGetLoggedInAthleteStarredSegmentsOpts

type SegmentsApiGetLoggedInAthleteStarredSegmentsOpts struct {
	Page    optional.Int32
	PerPage optional.Int32
}

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 SportType

type SportType string

SportType : An enumeration of the sport types an activity may have. Distinct from ActivityType in that it has new types (e.g. MountainBikeRide)

const (
	ALPINE_SKI_SportType                       SportType = "AlpineSki"
	BACKCOUNTRY_SKI_SportType                  SportType = "BackcountrySki"
	BADMINTON_SportType                        SportType = "Badminton"
	CANOEING_SportType                         SportType = "Canoeing"
	CROSSFIT_SportType                         SportType = "Crossfit"
	E_BIKE_RIDE_SportType                      SportType = "EBikeRide"
	ELLIPTICAL_SportType                       SportType = "Elliptical"
	E_MOUNTAIN_BIKE_RIDE_SportType             SportType = "EMountainBikeRide"
	GOLF_SportType                             SportType = "Golf"
	GRAVEL_RIDE_SportType                      SportType = "GravelRide"
	HANDCYCLE_SportType                        SportType = "Handcycle"
	HIGH_INTENSITY_INTERVAL_TRAINING_SportType SportType = "HighIntensityIntervalTraining"
	HIKE_SportType                             SportType = "Hike"
	ICE_SKATE_SportType                        SportType = "IceSkate"
	INLINE_SKATE_SportType                     SportType = "InlineSkate"
	KAYAKING_SportType                         SportType = "Kayaking"
	KITESURF_SportType                         SportType = "Kitesurf"
	MOUNTAIN_BIKE_RIDE_SportType               SportType = "MountainBikeRide"
	NORDIC_SKI_SportType                       SportType = "NordicSki"
	PICKLEBALL_SportType                       SportType = "Pickleball"
	PILATES_SportType                          SportType = "Pilates"
	RACQUETBALL_SportType                      SportType = "Racquetball"
	RIDE_SportType                             SportType = "Ride"
	ROCK_CLIMBING_SportType                    SportType = "RockClimbing"
	ROLLER_SKI_SportType                       SportType = "RollerSki"
	ROWING_SportType                           SportType = "Rowing"
	RUN_SportType                              SportType = "Run"
	SAIL_SportType                             SportType = "Sail"
	SKATEBOARD_SportType                       SportType = "Skateboard"
	SNOWBOARD_SportType                        SportType = "Snowboard"
	SNOWSHOE_SportType                         SportType = "Snowshoe"
	SOCCER_SportType                           SportType = "Soccer"
	SQUASH_SportType                           SportType = "Squash"
	STAIR_STEPPER_SportType                    SportType = "StairStepper"
	STAND_UP_PADDLING_SportType                SportType = "StandUpPaddling"
	SURFING_SportType                          SportType = "Surfing"
	SWIM_SportType                             SportType = "Swim"
	TABLE_TENNIS_SportType                     SportType = "TableTennis"
	TENNIS_SportType                           SportType = "Tennis"
	TRAIL_RUN_SportType                        SportType = "TrailRun"
	VELOMOBILE_SportType                       SportType = "Velomobile"
	VIRTUAL_RIDE_SportType                     SportType = "VirtualRide"
	VIRTUAL_ROW_SportType                      SportType = "VirtualRow"
	VIRTUAL_RUN_SportType                      SportType = "VirtualRun"
	WALK_SportType                             SportType = "Walk"
	WEIGHT_TRAINING_SportType                  SportType = "WeightTraining"
	WHEELCHAIR_SportType                       SportType = "Wheelchair"
	WINDSURF_SportType                         SportType = "Windsurf"
	WORKOUT_SportType                          SportType = "Workout"
	YOGA_SportType                             SportType = "Yoga"
)

List of SportType

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"`
	// Deprecated. Prefer to use sport_type
	Type_     *ActivityType `json:"type,omitempty"`
	SportType *SportType    `json:"sport_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     *SummaryPrSegmentEffort `json:"athlete_pr_effort,omitempty"`
	AthleteSegmentStats *SummarySegmentEffort   `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"`
	// Deprecated. Prefer to use sport_type. In a request where both type and sport_type are present, this field will be ignored
	Type_     *ActivityType `json:"type,omitempty"`
	SportType *SportType    `json:"sport_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 UploadsApiCreateUploadOpts

type UploadsApiCreateUploadOpts struct {
	File        optional.Interface
	Name        optional.String
	Description optional.String
	Trainer     optional.String
	Commute     optional.String
	DataType    optional.String
	ExternalId  optional.String
}

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 ZoneRange

type ZoneRange struct {
	// The minimum value in the range.
	Min int32 `json:"min,omitempty"`
	// The maximum value in the range.
	Max int32 `json:"max,omitempty"`
}

type ZoneRanges

type ZoneRanges struct {
}

type Zones

type Zones struct {
	HeartRate *HeartRateZoneRanges `json:"heart_rate,omitempty"`
	Power     *PowerZoneRanges     `json:"power,omitempty"`
}

Source Files

Jump to

Keyboard shortcuts

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