Skip to content

timvw/strava-client

Repository files navigation

Rust API client for Strava

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 OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 3.0.0
  • Package version: 3.0.0
  • Build package: org.openapitools.codegen.languages.RustClientCodegen
 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"

Installation

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" }

Documentation for API Endpoints

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

Class Method HTTP request Description
ActivitiesApi create_activity POST /activities Create an Activity
ActivitiesApi get_activity_by_id GET /activities/{id} Get Activity
ActivitiesApi get_comments_by_activity_id GET /activities/{id}/comments List Activity Comments
ActivitiesApi get_kudoers_by_activity_id GET /activities/{id}/kudos List Activity Kudoers
ActivitiesApi get_laps_by_activity_id GET /activities/{id}/laps List Activity Laps
ActivitiesApi get_logged_in_athlete_activities GET /athlete/activities List Athlete Activities
ActivitiesApi get_zones_by_activity_id GET /activities/{id}/zones Get Activity Zones
ActivitiesApi update_activity_by_id PUT /activities/{id} Update Activity
AthletesApi get_logged_in_athlete GET /athlete Get Authenticated Athlete
AthletesApi get_logged_in_athlete_zones GET /athlete/zones Get Zones
AthletesApi get_stats GET /athletes/{id}/stats Get Athlete Stats
AthletesApi update_logged_in_athlete PUT /athlete Update Athlete
ClubsApi get_club_activities_by_id GET /clubs/{id}/activities List Club Activities
ClubsApi get_club_admins_by_id GET /clubs/{id}/admins List Club Administrators
ClubsApi get_club_by_id GET /clubs/{id} Get Club
ClubsApi get_club_members_by_id GET /clubs/{id}/members List Club Members
ClubsApi get_logged_in_athlete_clubs GET /athlete/clubs List Athlete Clubs
GearsApi get_gear_by_id GET /gear/{id} Get Equipment
RoutesApi get_route_as_gpx GET /routes/{id}/export_gpx Export Route GPX
RoutesApi get_route_as_tcx GET /routes/{id}/export_tcx Export Route TCX
RoutesApi get_route_by_id GET /routes/{id} Get Route
RoutesApi get_routes_by_athlete_id GET /athletes/{id}/routes List Athlete Routes
SegmentEffortsApi get_efforts_by_segment_id GET /segment_efforts List Segment Efforts
SegmentEffortsApi get_segment_effort_by_id GET /segment_efforts/{id} Get Segment Effort
SegmentsApi explore_segments GET /segments/explore Explore segments
SegmentsApi get_logged_in_athlete_starred_segments GET /segments/starred List Starred Segments
SegmentsApi get_segment_by_id GET /segments/{id} Get Segment
SegmentsApi star_segment PUT /segments/{id}/starred Star Segment
StreamsApi get_activity_streams GET /activities/{id}/streams Get Activity Streams
StreamsApi get_route_streams GET /routes/{id}/streams Get Route Streams
StreamsApi get_segment_effort_streams GET /segment_efforts/{id}/streams Get Segment Effort Streams
StreamsApi get_segment_streams GET /segments/{id}/streams Get Segment Streams
UploadsApi create_upload POST /uploads Upload Activity
UploadsApi get_upload_by_id GET /uploads/{uploadId} Get Upload

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

Tim Van Wassenhove.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published