Skip to content

spurtli/polar-api-v3

Repository files navigation

polar-api-v3

Polar - the Ruby gem for the Polar Accesslink API

Polar Accesslink API documentation

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 3.40.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://www.polar.com/accesslink

Installation

Build a gem

To build the Ruby code into a gem:

gem build polar-api-v3.gemspec

Then either install the gem locally:

gem install ./polar-api-v3-1.0.0.gem

(for development, run gem install --dev ./polar-api-v3-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'polar-api-v3', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'polar-api-v3', :git => 'https://github.com/spurtli/polar-api-v3.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'polar-api-v3'

# Setup authorization
Polar.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = Polar::DailyActivityApi.new
transaction_id = 56 # Integer | Transaction identifier
user_id = 56 # Integer | User identifier

begin
  #Commit transaction
  api_instance.commit_activity_transaction(transaction_id, user_id)
rescue Polar::ApiError => e
  puts "Exception when calling DailyActivityApi->commit_activity_transaction: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://www.polaraccesslink.com

Class Method HTTP request Description
Polar::DailyActivityApi commit_activity_transaction PUT /v3/users/{user-id}/activity-transactions/{transaction-id} Commit transaction
Polar::DailyActivityApi create_activity_transaction POST /v3/users/{user-id}/activity-transactions Create transaction
Polar::DailyActivityApi get_activity_summary GET /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id} Get activity summary
Polar::DailyActivityApi get_step_samples GET /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id}/step-samples Get step samples
Polar::DailyActivityApi get_zone_samples GET /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id}/zone-samples Get zone samples
Polar::DailyActivityApi list_activities GET /v3/users/{user-id}/activity-transactions/{transaction-id} List activities
Polar::ExercisesApi get_exercise_fit_without_transaction GET /v3/exercises/{exerciseId}/fit Get exercise FIT
Polar::ExercisesApi get_exercise_without_transaction GET /v3/exercises/{exerciseId} Get exercise
Polar::ExercisesApi list_exercises_without_transaction GET /v3/exercises List exercises
Polar::PhysicalInfoApi commit_physical_info_transaction PUT /v3/users/{user-id}/physical-information-transactions/{transaction-id} Commit transaction
Polar::PhysicalInfoApi create_physical_info_transaction POST /v3/users/{user-id}/physical-information-transactions Create transaction
Polar::PhysicalInfoApi get_physical_info GET /v3/users/{user-id}/physical-information-transactions/{transaction-id}/physical-informations/{physical-info-id} Get physical info
Polar::PhysicalInfoApi list_physical_infos GET /v3/users/{user-id}/physical-information-transactions/{transaction-id} List physical infos
Polar::PullNotificationsApi list GET /v3/notifications List
Polar::TrainingDataApi commit_exercise_transaction PUT /v3/users/{user-id}/exercise-transactions/{transaction-id} Commit transaction
Polar::TrainingDataApi create_exercise_transaction POST /v3/users/{user-id}/exercise-transactions Create transaction
Polar::TrainingDataApi get_available_samples GET /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples Get available samples
Polar::TrainingDataApi get_exercise_summary GET /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id} Get exercise summary
Polar::TrainingDataApi get_fit GET /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/fit Get FIT (beta)
Polar::TrainingDataApi get_gpx GET /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/gpx Get GPX
Polar::TrainingDataApi get_heart_rate_zones GET /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/heart-rate-zones Get heart rate zones
Polar::TrainingDataApi get_samples GET /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples/{type-id} Get samples
Polar::TrainingDataApi get_tcx GET /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/tcx Get TCX
Polar::TrainingDataApi list_exercises GET /v3/users/{user-id}/exercise-transactions/{transaction-id} List exercises
Polar::UsersApi delete_user DELETE /v3/users/{user-id} Delete user
Polar::UsersApi get_user_information GET /v3/users/{user-id} Get user information
Polar::UsersApi register_user POST /v3/users Register user
Polar::WebhooksApi create_webhook POST /v3/webhooks Create webhook
Polar::WebhooksApi delete_webhook DELETE /v3/webhooks/{webhook-id} Delete webhook
Polar::WebhooksApi get_webhook GET /v3/webhooks Get webhook
Polar::WebhooksApi update_webhook PATCH /v3/webhooks/{webhook-id} Update webhook

Documentation for Models

Documentation for Authorization

Basic

  • Type: HTTP basic authentication

OAuth2

Releases

No releases published

Packages

No packages published