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
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'
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 using -I
as follows:
ruby -Ilib script.rb
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
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 |
- Polar::Activity
- Polar::ActivityLog
- Polar::ActivityStepSample
- Polar::ActivityStepSamples
- Polar::ActivityZoneSample
- Polar::ActivityZoneSamples
- Polar::AvailableUserData
- Polar::AvailableUserDatas
- Polar::CreatedWebhook
- Polar::CreatedWebhookData
- Polar::DurationZone
- Polar::Error
- Polar::Exercise
- Polar::ExerciseHashId
- Polar::Exercises
- Polar::HeartRate
- Polar::PhysicalInformation
- Polar::PhysicalInformations
- Polar::Register
- Polar::Sample
- Polar::Samples
- Polar::TransactionLocation
- Polar::User
- Polar::UserExtraInfo
- Polar::WebhookInfo
- Polar::WebhookInfoData
- Polar::WebhookPatch
- Polar::WebhookPayload
- Polar::WebhookPing
- Polar::WebhookRequest
- Polar::WebhookType
- Polar::Zone
- Polar::Zones
- Type: HTTP basic authentication
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://flow.polar.com/oauth2/authorization
- Scopes:
- accesslink.read_all: Allows read access to user's data