Skip to content

Latest commit

 

History

History
144 lines (92 loc) · 5.46 KB

SegmentsApi.md

File metadata and controls

144 lines (92 loc) · 5.46 KB

\SegmentsApi

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

Method HTTP request Description
explore_segments Get /segments/explore Explore segments
get_logged_in_athlete_starred_segments Get /segments/starred List Starred Segments
get_segment_by_id Get /segments/{id} Get Segment
star_segment Put /segments/{id}/starred Star Segment

explore_segments

::models::ExplorerResponse explore_segments(ctx, bounds, optional) Explore segments

Returns the top 10 segments matching a specified query.

Required Parameters

Name Type Description Notes
ctx context.Context context containing the authentication nil if no authentication
bounds Vec<f32> The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
bounds Vec<f32> The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
activity_type String Desired activity type.
min_cat i32 The minimum climbing category.
max_cat i32 The maximum climbing category.

Return type

::models::ExplorerResponse

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_logged_in_athlete_starred_segments

Vec<::models::SummarySegment> get_logged_in_athlete_starred_segments(ctx, optional) List Starred Segments

List of the authenticated athlete's starred segments. Private segments are filtered out unless requested by a token with read_all scope.

Required Parameters

Name Type Description Notes
ctx context.Context context containing the authentication nil if no authentication
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
page i32 Page number. Defaults to 1.
per_page i32 Number of items per page. Defaults to 30. [default to 30]

Return type

Vec<::models::SummarySegment>

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_segment_by_id

::models::DetailedSegment get_segment_by_id(ctx, id) Get Segment

Returns the specified segment. read_all scope required in order to retrieve athlete-specific segment information, or to retrieve private segments.

Required Parameters

Name Type Description Notes
ctx context.Context context containing the authentication nil if no authentication
id i64 The identifier of the segment.

Return type

::models::DetailedSegment

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

star_segment

::models::DetailedSegment star_segment(ctx, id, starred) Star Segment

Stars/Unstars the given segment for the authenticated athlete. Requires profile:write scope.

Required Parameters

Name Type Description Notes
ctx context.Context context containing the authentication nil if no authentication
id i64 The identifier of the segment to star.
starred bool If true, star the segment; if false, unstar the segment. [default to false]

Return type

::models::DetailedSegment

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]