Skip to content

cserteGT3/StravaAPI.jl

Repository files navigation

Julia client for Strava API

Stable Dev Build Status

The code is generated with OpenAPI.jl and PkgTemplates.jl.

Installation

To use the package, just install it (and OpenAPI.jl) with

] add StravaAPI OpenAPI

Usage example

You'll need to authorize towards the Strava API server (not covered by this package). See the documentation here.

With a valid access_token, you can get the logged in athlete:

using StravaAPI
using OpenAPI.Clients: Client, set_header
client = Client("https://www.strava.com/api/v3")
set_header(client, "Authorization", "Bearer $access_token")
api = StravaAPI.AthletesApi(client)
athlete, api_resp = get_logged_in_athlete(api)

Contributing

Contributions are welcome!

Editing the source code

As the source code is generated by OpenAPI.jl, which overwrites the src and docs folders. Therefore every change needs to happen in the generator folder. It is especially true for the documentation (file names start with docs.*). To generate the package code start docker, then run the following in the project root:

julia --project=generator generator/generate.jl

About

Julia client for Strava API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages