Skip to content

Swagger Codegen'd Runalyze Go library for the Runalyze Personal API

Notifications You must be signed in to change notification settings

lildude/runalyze-generated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for runalyze

Go client for the Runalyze Personal 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: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./runalyze"

Documentation for API Endpoints

All URIs are relative to https://runalyze.com

Class Method HTTP request Description
ActivityUploadApi GetActivityByID Get /api/v1/activities/uploads/{id}
ActivityUploadApi UploadActivity Post /api/v1/activities/uploads
HealthMetricsApi CreateBloodPressure Post /api/v1/metrics/bloodPressure Creates a new blood pressure entry
HealthMetricsApi CreateBodyComposition Post /api/v1/metrics/bodyComposition Creates a new body composition entry
HealthMetricsApi CreateHeartRateMax Post /api/v1/metrics/heartRateMax Creates a new maximum heart rate entry
HealthMetricsApi CreateHeartRateRest Post /api/v1/metrics/heartRateRest Creates a new resting heart rate entry
HealthMetricsApi CreateMental Post /api/v1/metrics/mental Creates a new mental state entry
HealthMetricsApi CreateMetrics Post /api/v1/metrics Creates bulk entries of all existing metrics
HealthMetricsApi CreateSleep Post /api/v1/metrics/sleep Creates a new sleeping entry

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author


Generated using the following process:

  1. Download the swagger spec from the docs:
$ mkdir meta
$ pup -f <(curl -sL https://runalyze.com/doc/personal) script#swagger-data text{} | jq -r .spec > meta/runalyze.json

I couldn't find the path to the file but saw the spec in the HTML 😉.

  1. As the spec isn't complete, we need to manually edit the runalyze.json file and...

  2. Add a description to the info section,

  3. Add "servers": [{"url": "https://runalyze.com"}], before "paths"

  4. give all operations meaningful names, ie replace the null in all operationId props with something useful like CreateMetrics

  5. Create a Go specific config file:

$ echo '{"packageName":"runalyze"}' > meta/config.json
  1. Generate the Go library code:
$ swagger-codegen generate --input-spec meta/runalyze.json --config meta/config.json --lang go --output .
  1. Append this README to the end of the generated README:
$ cat meta/README.md >> README.md

Generated using the following process:

  1. Download the swagger spec from the docs:
$ mkdir meta
$ pup -f <(curl -sL https://runalyze.com/doc/personal) script#swagger-data text{} | jq -r .spec > meta/runalyze.json

I couldn't find the path to the file but saw the spec in the HTML 😉.

  1. As the spec isn't complete, we need to manually edit the runalyze.json file and...

  2. Add a description to the info section,

  3. Add "servers": [{"url": "https://runalyze.com"}], before "paths"

  4. give all operations meaningful names, ie replace the null in all operationId props with something useful like CreateMetrics

  5. Create a Go specific config file:

$ echo '{"packageName":"runalyze"}' > meta/config.json
  1. Generate the Go library code:
$ swagger-codegen generate --input-spec meta/runalyze.json --config meta/config.json --lang go --output .
  1. Append this README to the end of the generated README:
$ cat meta/README.md >> README.md

Note: Additional tweaks will be needed to the README.

About

Swagger Codegen'd Runalyze Go library for the Runalyze Personal API

Resources

Stars

Watchers

Forks