polar-accesslink-api-gem
PolarAccesslinkApiGem - 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.78.0
- Package version: 0.1.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-accesslink-api-gem.gemspec
Then either install the gem locally:
gem install ./polar-accesslink-api-gem-0.1.0.gem
(for development, run gem install --dev ./polar-accesslink-api-gem-0.1.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-api-gem', '~> 0.1.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-accesslink-api-gem', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.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-gem'
# Setup authorization
PolarAccesslinkApiGem.configure do |config|
# Configure OAuth2 access token for authorization: OAuth2
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
transaction_id = 789 # Integer | Transaction identifier
user_id = 56 # Integer | User identifier
begin
#Commit transaction
api_instance.commit_activity_transaction(transaction_id, user_id)
rescue PolarAccesslinkApiGem::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 |
---|---|---|---|
PolarAccesslinkApiGem::DailyActivityApi | commit_activity_transaction | PUT /v3/users/user-id/activity-transactions/transaction-id | Commit transaction |
PolarAccesslinkApiGem::DailyActivityApi | create_activity_transaction | POST /v3/users/user-id/activity-transactions | Create transaction |
PolarAccesslinkApiGem::DailyActivityApi | get_activity_summary | GET /v3/users/user-id/activity-transactions/transaction-id/activities/activity-id | Get activity summary |
PolarAccesslinkApiGem::DailyActivityApi | get_step_samples | GET /v3/users/user-id/activity-transactions/transaction-id/activities/activity-id/step-samples | Get step samples |
PolarAccesslinkApiGem::DailyActivityApi | get_zone_samples | GET /v3/users/user-id/activity-transactions/transaction-id/activities/activity-id/zone-samples | Get zone samples |
PolarAccesslinkApiGem::DailyActivityApi | list_activities | GET /v3/users/user-id/activity-transactions/transaction-id | List activities |
PolarAccesslinkApiGem::ExercisesApi | get_exercise_fit_without_transaction | GET /v3/exercises/exerciseId/fit | Get exercise FIT |
PolarAccesslinkApiGem::ExercisesApi | get_exercise_without_transaction | GET /v3/exercises/exerciseId | Get exercise |
PolarAccesslinkApiGem::ExercisesApi | list_exercises_without_transaction | GET /v3/exercises | List exercises |
PolarAccesslinkApiGem::NightlyRechargeApi | list_nightly_recharge | GET /v3/users/nightly-recharge | List Nightly Recharges |
PolarAccesslinkApiGem::NightlyRechargeApi | v3_users_nightly_recharge_date_get | GET /v3/users/nightly-recharge/date | Get Nightly Recharge |
PolarAccesslinkApiGem::PhysicalInfoApi | commit_physical_info_transaction | PUT /v3/users/user-id/physical-information-transactions/transaction-id | Commit transaction |
PolarAccesslinkApiGem::PhysicalInfoApi | create_physical_info_transaction | POST /v3/users/user-id/physical-information-transactions | Create transaction |
PolarAccesslinkApiGem::PhysicalInfoApi | get_physical_info | GET /v3/users/user-id/physical-information-transactions/transaction-id/physical-informations/physical-info-id | Get physical info |
PolarAccesslinkApiGem::PhysicalInfoApi | list_physical_infos | GET /v3/users/user-id/physical-information-transactions/transaction-id | List physical infos |
PolarAccesslinkApiGem::PullNotificationsApi | list | GET /v3/notifications | List |
PolarAccesslinkApiGem::SleepApi | list_nights | GET /v3/users/sleep | List nights |
PolarAccesslinkApiGem::SleepApi | v3_users_sleep_available_get | GET /v3/users/sleep/available | Get available sleep times |
PolarAccesslinkApiGem::SleepApi | v3_users_sleep_date_get | GET /v3/users/sleep/date | Get Sleep |
PolarAccesslinkApiGem::TrainingDataApi | commit_exercise_transaction | PUT /v3/users/user-id/exercise-transactions/transaction-id | Commit transaction |
PolarAccesslinkApiGem::TrainingDataApi | create_exercise_transaction | POST /v3/users/user-id/exercise-transactions | Create transaction |
PolarAccesslinkApiGem::TrainingDataApi | get_available_samples | GET /v3/users/user-id/exercise-transactions/transaction-id/exercises/exercise-id/samples | Get available samples |
PolarAccesslinkApiGem::TrainingDataApi | get_exercise_summary | GET /v3/users/user-id/exercise-transactions/transaction-id/exercises/exercise-id | Get exercise summary |
PolarAccesslinkApiGem::TrainingDataApi | get_fit | GET /v3/users/user-id/exercise-transactions/transaction-id/exercises/exercise-id/fit | Get FIT (beta) |
PolarAccesslinkApiGem::TrainingDataApi | get_gpx | GET /v3/users/user-id/exercise-transactions/transaction-id/exercises/exercise-id/gpx | Get GPX |
PolarAccesslinkApiGem::TrainingDataApi | get_heart_rate_zones | GET /v3/users/user-id/exercise-transactions/transaction-id/exercises/exercise-id/heart-rate-zones | Get heart rate zones |
PolarAccesslinkApiGem::TrainingDataApi | get_samples | GET /v3/users/user-id/exercise-transactions/transaction-id/exercises/exercise-id/samples/type-id | Get samples |
PolarAccesslinkApiGem::TrainingDataApi | get_tcx | GET /v3/users/user-id/exercise-transactions/transaction-id/exercises/exercise-id/tcx | Get TCX |
PolarAccesslinkApiGem::TrainingDataApi | list_exercises | GET /v3/users/user-id/exercise-transactions/transaction-id | List exercises |
PolarAccesslinkApiGem::UsersApi | delete_user | DELETE /v3/users/user-id | Delete user |
PolarAccesslinkApiGem::UsersApi | get_user_information | GET /v3/users/user-id | Get user information |
PolarAccesslinkApiGem::UsersApi | register_user | POST /v3/users | Register user |
PolarAccesslinkApiGem::WebhooksApi | create_webhook | POST /v3/webhooks | Create webhook |
PolarAccesslinkApiGem::WebhooksApi | delete_webhook | DELETE /v3/webhooks/webhook-id | Delete webhook |
PolarAccesslinkApiGem::WebhooksApi | get_webhook | GET /v3/webhooks | Get webhook |
PolarAccesslinkApiGem::WebhooksApi | update_webhook | PATCH /v3/webhooks/webhook-id | Update webhook |
Documentation for Models
- PolarAccesslinkApiGem::Activity
- PolarAccesslinkApiGem::ActivityLog
- PolarAccesslinkApiGem::ActivityStepSample
- PolarAccesslinkApiGem::ActivityStepSamples
- PolarAccesslinkApiGem::ActivityZoneSample
- PolarAccesslinkApiGem::ActivityZoneSamples
- PolarAccesslinkApiGem::AvailableSleep
- PolarAccesslinkApiGem::AvailableSleeps
- PolarAccesslinkApiGem::AvailableUserData
- PolarAccesslinkApiGem::AvailableUserDatas
- PolarAccesslinkApiGem::CreatedWebhook
- PolarAccesslinkApiGem::CreatedWebhookData
- PolarAccesslinkApiGem::DurationZone
- PolarAccesslinkApiGem::Error
- PolarAccesslinkApiGem::Exercise
- PolarAccesslinkApiGem::ExerciseHashId
- PolarAccesslinkApiGem::Exercises
- PolarAccesslinkApiGem::HeartRate
- PolarAccesslinkApiGem::NightlyRecharge
- PolarAccesslinkApiGem::Nights
- PolarAccesslinkApiGem::PhysicalInformation
- PolarAccesslinkApiGem::PhysicalInformations
- PolarAccesslinkApiGem::Recharges
- PolarAccesslinkApiGem::Register
- PolarAccesslinkApiGem::Sample
- PolarAccesslinkApiGem::Samples
- PolarAccesslinkApiGem::Sleep
- PolarAccesslinkApiGem::TransactionLocation
- PolarAccesslinkApiGem::User
- PolarAccesslinkApiGem::UserExtraInfo
- PolarAccesslinkApiGem::WebhookInfo
- PolarAccesslinkApiGem::WebhookInfoData
- PolarAccesslinkApiGem::WebhookPatch
- PolarAccesslinkApiGem::WebhookPayloadExercise
- PolarAccesslinkApiGem::WebhookPayloadSleep
- PolarAccesslinkApiGem::WebhookPing
- PolarAccesslinkApiGem::WebhookRequest
- PolarAccesslinkApiGem::WebhookType
- PolarAccesslinkApiGem::Zone
- PolarAccesslinkApiGem::Zones
Documentation for Authorization
Basic
- Type: HTTP basic authentication
OAuth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://flow.polar.com/oauth2/authorization
- Scopes:
- accesslink.read_all: Allows read access to user's data