Git Product home page Git Product logo

strava's Introduction

Go API client for strava

Strava API

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 "./strava"

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
RunningRacesApi GetRunningRaceById Get /running_races/{id} Get Running Race
RunningRacesApi GetRunningRaces Get /running_races List Running Races
SegmentEffortsApi GetEffortsBySegmentId Get /segments/{id}/all_efforts List Segment Efforts
SegmentEffortsApi GetSegmentEffortById Get /segment_efforts/{id} Get Segment Effort
SegmentsApi ExploreSegments Get /segments/explore Explore segments
SegmentsApi GetLeaderboardBySegmentId Get /segments/{id}/leaderboard Get Segment Leaderboard
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

strava's People

Contributors

dwj300 avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

vangent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.