PolarAccesslink

PolarAccesslink - the Ruby gem for the Polar Accesslink API

Polar Accesslink API documentation

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 3.59.0
  • Package version: 1.0.0
  • Build package: io.swagger.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_accesslink.gemspec

Then either install the gem locally:

gem install ./polar_accesslink-1.0.0.gem

(for development, run gem install --dev ./polar_accesslink-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_accesslink', '~> 1.0.0'

Install from Git

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

gem 'polar_accesslink', :git => 'https://github.com/udiudi/PolarAccesslink.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_accesslink'

api_instance = PolarAccesslink::DailyActivityApi.new

transaction_id = nil # Object | Transaction identifier

user_id = nil # Object | User identifier


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

Documentation for API Endpoints

All URIs are relative to https://localhost

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

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.