The code is generated with OpenAPI.jl and PkgTemplates.jl.
To use the package, just install it (and OpenAPI.jl) with
] add StravaAPI OpenAPIYou'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)Contributions are welcome!
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