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.
This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.
org.openapitools.codegen.languages.RustClientCodegen
bash
docker run --rm -it \
-v "${PWD}:/host" \
openapitools/openapi-generator-cli \
"generate" \
"-i" "https://developers.strava.com/swagger/swagger.json" \
"-g" "rust" \
"-o" "/host/strava-client" \
"--additional-properties=supportMultipleResponses=true,useSingleRequestParameter=true,packageName=strava_client" \
"--skip-validate-spec"
Put the package under your project folder in a directory named strava_client
and add the following to Cargo.toml
under [dependencies]
:
strava_client = { path = "./strava_client" }
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}/exportgpx | Export Route GPX RoutesApi | getrouteastcx | GET /routes/{id}/exporttcx | Export Route TCX RoutesApi | getroutebyid | GET /routes/{id} | Get Route *RoutesApi* | getroutesbyathleteid | GET /athletes/{id}/routes | List Athlete Routes *SegmentEffortsApi* | geteffortsbysegmentid | GET /segmentefforts | List Segment Efforts SegmentEffortsApi | getsegmenteffortbyid | GET /segmentefforts/{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 /segmentefforts/{id}/streams | Get Segment Effort Streams *StreamsApi* | getsegmentstreams | GET /segments/{id}/streams | Get Segment Streams *UploadsApi* | createupload | POST /uploads | Upload Activity UploadsApi | getuploadby_id | GET /uploads/{uploadId} | Get Upload
To get access to the crate's generated documentation, use:
cargo doc --open