polar-accesslink-api-gem 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +182 -0
  4. data/Rakefile +10 -0
  5. data/docs/Activity.md +34 -0
  6. data/docs/ActivityLog.md +18 -0
  7. data/docs/ActivityStepSample.md +20 -0
  8. data/docs/ActivityStepSamples.md +20 -0
  9. data/docs/ActivityZoneSample.md +20 -0
  10. data/docs/ActivityZoneSamples.md +20 -0
  11. data/docs/AvailableSleep.md +22 -0
  12. data/docs/AvailableSleeps.md +18 -0
  13. data/docs/AvailableUserData.md +22 -0
  14. data/docs/AvailableUserDatas.md +18 -0
  15. data/docs/CreatedWebhook.md +18 -0
  16. data/docs/CreatedWebhookData.md +24 -0
  17. data/docs/DailyActivityApi.md +440 -0
  18. data/docs/DurationZone.md +20 -0
  19. data/docs/Error.md +26 -0
  20. data/docs/Exercise.md +54 -0
  21. data/docs/ExerciseHashId.md +52 -0
  22. data/docs/Exercises.md +18 -0
  23. data/docs/ExercisesApi.md +214 -0
  24. data/docs/HeartRate.md +20 -0
  25. data/docs/NightlyRecharge.md +38 -0
  26. data/docs/NightlyRechargeApi.md +144 -0
  27. data/docs/Nights.md +18 -0
  28. data/docs/PhysicalInfoApi.md +294 -0
  29. data/docs/PhysicalInformation.md +40 -0
  30. data/docs/PhysicalInformations.md +18 -0
  31. data/docs/PullNotificationsApi.md +75 -0
  32. data/docs/Recharges.md +18 -0
  33. data/docs/Register.md +18 -0
  34. data/docs/Sample.md +22 -0
  35. data/docs/Samples.md +18 -0
  36. data/docs/Sleep.md +64 -0
  37. data/docs/SleepApi.md +211 -0
  38. data/docs/TrainingDataApi.md +744 -0
  39. data/docs/TransactionLocation.md +20 -0
  40. data/docs/User.md +36 -0
  41. data/docs/UserExtraInfo.md +22 -0
  42. data/docs/UsersApi.md +216 -0
  43. data/docs/WebhookInfo.md +18 -0
  44. data/docs/WebhookInfoData.md +22 -0
  45. data/docs/WebhookPatch.md +20 -0
  46. data/docs/WebhookPayloadExercise.md +26 -0
  47. data/docs/WebhookPayloadSleep.md +26 -0
  48. data/docs/WebhookPing.md +20 -0
  49. data/docs/WebhookRequest.md +20 -0
  50. data/docs/WebhookType.md +15 -0
  51. data/docs/WebhooksApi.md +289 -0
  52. data/docs/Zone.md +24 -0
  53. data/docs/Zones.md +18 -0
  54. data/git_push.sh +58 -0
  55. data/lib/polar-accesslink-api-gem/api/daily_activity_api.rb +469 -0
  56. data/lib/polar-accesslink-api-gem/api/exercises_api.rb +205 -0
  57. data/lib/polar-accesslink-api-gem/api/nightly_recharge_api.rb +142 -0
  58. data/lib/polar-accesslink-api-gem/api/physical_info_api.rb +296 -0
  59. data/lib/polar-accesslink-api-gem/api/pull_notifications_api.rb +79 -0
  60. data/lib/polar-accesslink-api-gem/api/sleep_api.rb +199 -0
  61. data/lib/polar-accesslink-api-gem/api/training_data_api.rb +785 -0
  62. data/lib/polar-accesslink-api-gem/api/users_api.rb +221 -0
  63. data/lib/polar-accesslink-api-gem/api/webhooks_api.rb +278 -0
  64. data/lib/polar-accesslink-api-gem/api_client.rb +390 -0
  65. data/lib/polar-accesslink-api-gem/api_error.rb +57 -0
  66. data/lib/polar-accesslink-api-gem/configuration.rb +284 -0
  67. data/lib/polar-accesslink-api-gem/models/activity.rb +300 -0
  68. data/lib/polar-accesslink-api-gem/models/activity_log.rb +222 -0
  69. data/lib/polar-accesslink-api-gem/models/activity_step_sample.rb +230 -0
  70. data/lib/polar-accesslink-api-gem/models/activity_step_samples.rb +232 -0
  71. data/lib/polar-accesslink-api-gem/models/activity_zone_sample.rb +232 -0
  72. data/lib/polar-accesslink-api-gem/models/activity_zone_samples.rb +232 -0
  73. data/lib/polar-accesslink-api-gem/models/available_sleep.rb +239 -0
  74. data/lib/polar-accesslink-api-gem/models/available_sleeps.rb +221 -0
  75. data/lib/polar-accesslink-api-gem/models/available_user_data.rb +274 -0
  76. data/lib/polar-accesslink-api-gem/models/available_user_datas.rb +222 -0
  77. data/lib/polar-accesslink-api-gem/models/created_webhook.rb +218 -0
  78. data/lib/polar-accesslink-api-gem/models/created_webhook_data.rb +248 -0
  79. data/lib/polar-accesslink-api-gem/models/duration_zone.rb +230 -0
  80. data/lib/polar-accesslink-api-gem/models/error.rb +260 -0
  81. data/lib/polar-accesslink-api-gem/models/exercise.rb +399 -0
  82. data/lib/polar-accesslink-api-gem/models/exercise_hash_id.rb +389 -0
  83. data/lib/polar-accesslink-api-gem/models/exercises.rb +222 -0
  84. data/lib/polar-accesslink-api-gem/models/heart_rate.rb +230 -0
  85. data/lib/polar-accesslink-api-gem/models/nightly_recharge.rb +319 -0
  86. data/lib/polar-accesslink-api-gem/models/nights.rb +222 -0
  87. data/lib/polar-accesslink-api-gem/models/physical_information.rb +364 -0
  88. data/lib/polar-accesslink-api-gem/models/physical_informations.rb +222 -0
  89. data/lib/polar-accesslink-api-gem/models/recharges.rb +222 -0
  90. data/lib/polar-accesslink-api-gem/models/register.rb +225 -0
  91. data/lib/polar-accesslink-api-gem/models/sample.rb +240 -0
  92. data/lib/polar-accesslink-api-gem/models/samples.rb +222 -0
  93. data/lib/polar-accesslink-api-gem/models/sleep.rb +449 -0
  94. data/lib/polar-accesslink-api-gem/models/transaction_location.rb +230 -0
  95. data/lib/polar-accesslink-api-gem/models/user.rb +346 -0
  96. data/lib/polar-accesslink-api-gem/models/user_extra_info.rb +240 -0
  97. data/lib/polar-accesslink-api-gem/models/webhook_info.rb +218 -0
  98. data/lib/polar-accesslink-api-gem/models/webhook_info_data.rb +238 -0
  99. data/lib/polar-accesslink-api-gem/models/webhook_patch.rb +231 -0
  100. data/lib/polar-accesslink-api-gem/models/webhook_payload_exercise.rb +260 -0
  101. data/lib/polar-accesslink-api-gem/models/webhook_payload_sleep.rb +260 -0
  102. data/lib/polar-accesslink-api-gem/models/webhook_ping.rb +264 -0
  103. data/lib/polar-accesslink-api-gem/models/webhook_request.rb +241 -0
  104. data/lib/polar-accesslink-api-gem/models/webhook_type.rb +36 -0
  105. data/lib/polar-accesslink-api-gem/models/zone.rb +250 -0
  106. data/lib/polar-accesslink-api-gem/models/zones.rb +222 -0
  107. data/lib/polar-accesslink-api-gem/version.rb +15 -0
  108. data/lib/polar-accesslink-api-gem.rb +88 -0
  109. data/polar-accesslink-api-gem.gemspec +38 -0
  110. data/spec/api/daily_activity_api_spec.rb +114 -0
  111. data/spec/api/exercises_api_spec.rb +70 -0
  112. data/spec/api/nightly_recharge_api_spec.rb +58 -0
  113. data/spec/api/physical_info_api_spec.rb +87 -0
  114. data/spec/api/pull_notifications_api_spec.rb +46 -0
  115. data/spec/api/sleep_api_spec.rb +69 -0
  116. data/spec/api/training_data_api_spec.rb +173 -0
  117. data/spec/api/users_api_spec.rb +71 -0
  118. data/spec/api/webhooks_api_spec.rb +83 -0
  119. data/spec/api_client_spec.rb +226 -0
  120. data/spec/configuration_spec.rb +42 -0
  121. data/spec/models/activity_log_spec.rb +34 -0
  122. data/spec/models/activity_spec.rb +82 -0
  123. data/spec/models/activity_step_sample_spec.rb +40 -0
  124. data/spec/models/activity_step_samples_spec.rb +40 -0
  125. data/spec/models/activity_zone_sample_spec.rb +40 -0
  126. data/spec/models/activity_zone_samples_spec.rb +40 -0
  127. data/spec/models/available_sleep_spec.rb +46 -0
  128. data/spec/models/available_sleeps_spec.rb +34 -0
  129. data/spec/models/available_user_data_spec.rb +50 -0
  130. data/spec/models/available_user_datas_spec.rb +34 -0
  131. data/spec/models/created_webhook_data_spec.rb +52 -0
  132. data/spec/models/created_webhook_spec.rb +34 -0
  133. data/spec/models/duration_zone_spec.rb +40 -0
  134. data/spec/models/error_spec.rb +58 -0
  135. data/spec/models/exercise_hash_id_spec.rb +136 -0
  136. data/spec/models/exercise_spec.rb +142 -0
  137. data/spec/models/exercises_spec.rb +34 -0
  138. data/spec/models/heart_rate_spec.rb +40 -0
  139. data/spec/models/nightly_recharge_spec.rb +94 -0
  140. data/spec/models/nights_spec.rb +34 -0
  141. data/spec/models/physical_information_spec.rb +104 -0
  142. data/spec/models/physical_informations_spec.rb +34 -0
  143. data/spec/models/recharges_spec.rb +34 -0
  144. data/spec/models/register_spec.rb +34 -0
  145. data/spec/models/sample_spec.rb +46 -0
  146. data/spec/models/samples_spec.rb +34 -0
  147. data/spec/models/sleep_spec.rb +172 -0
  148. data/spec/models/transaction_location_spec.rb +40 -0
  149. data/spec/models/user_extra_info_spec.rb +46 -0
  150. data/spec/models/user_spec.rb +92 -0
  151. data/spec/models/webhook_info_data_spec.rb +46 -0
  152. data/spec/models/webhook_info_spec.rb +34 -0
  153. data/spec/models/webhook_patch_spec.rb +40 -0
  154. data/spec/models/webhook_payload_exercise_spec.rb +58 -0
  155. data/spec/models/webhook_payload_sleep_spec.rb +58 -0
  156. data/spec/models/webhook_ping_spec.rb +44 -0
  157. data/spec/models/webhook_request_spec.rb +40 -0
  158. data/spec/models/webhook_type_spec.rb +28 -0
  159. data/spec/models/zone_spec.rb +52 -0
  160. data/spec/models/zones_spec.rb +34 -0
  161. data/spec/spec_helper.rb +111 -0
  162. metadata +295 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ca576125e55833b907ceb6017f16fed560c71b96d1132f103de8b744246b7f5b
4
+ data.tar.gz: 75a9bbc1f3e88ea962e4d7ab7254ffee6dc292b3c2a4cbff0de99fb1eb2ef6f5
5
+ SHA512:
6
+ metadata.gz: 1a14356ea2001f15f19a506edc18f66b87f1385242838f781341c2710b67c5d2bf94defa2c4931b872c0e2892998bd5215f090371dd7b2f54ebf7c9030a3ea8a
7
+ data.tar.gz: db7d1cb92ebb9d3feb512b87367156f84656be626d66d1854cbc53ade483dde941efb923febaeff4e1f4d6905e17030188d482d5a58fc7a6b1b72e0cba3acccf
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,182 @@
1
+ # polar-accesslink-api-gem
2
+
3
+ PolarAccesslinkApiGem - the Ruby gem for the Polar Accesslink API
4
+
5
+ Polar Accesslink API documentation
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: 3.78.0
10
+ - Package version: 0.1.0
11
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
+ For more information, please visit [https://www.polar.com/accesslink](https://www.polar.com/accesslink)
13
+
14
+ ## Installation
15
+
16
+ ### Build a gem
17
+
18
+ To build the Ruby code into a gem:
19
+
20
+ ```shell
21
+ gem build polar-accesslink-api-gem.gemspec
22
+ ```
23
+
24
+ Then either install the gem locally:
25
+
26
+ ```shell
27
+ gem install ./polar-accesslink-api-gem-0.1.0.gem
28
+ ```
29
+
30
+ (for development, run `gem install --dev ./polar-accesslink-api-gem-0.1.0.gem` to install the development dependencies)
31
+
32
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
+
34
+ Finally add this to the Gemfile:
35
+
36
+ gem 'polar-accesslink-api-gem', '~> 0.1.0'
37
+
38
+ ### Install from Git
39
+
40
+ 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:
41
+
42
+ gem 'polar-accesslink-api-gem', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
43
+
44
+ ### Include the Ruby code directly
45
+
46
+ Include the Ruby code directly using `-I` as follows:
47
+
48
+ ```shell
49
+ ruby -Ilib script.rb
50
+ ```
51
+
52
+ ## Getting Started
53
+
54
+ Please follow the [installation](#installation) procedure and then run the following code:
55
+
56
+ ```ruby
57
+ # Load the gem
58
+ require 'polar-accesslink-api-gem'
59
+
60
+ # Setup authorization
61
+ PolarAccesslinkApiGem.configure do |config|
62
+ # Configure OAuth2 access token for authorization: OAuth2
63
+ config.access_token = 'YOUR ACCESS TOKEN'
64
+ end
65
+
66
+ api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
67
+ transaction_id = 789 # Integer | Transaction identifier
68
+ user_id = 56 # Integer | User identifier
69
+
70
+ begin
71
+ #Commit transaction
72
+ api_instance.commit_activity_transaction(transaction_id, user_id)
73
+ rescue PolarAccesslinkApiGem::ApiError => e
74
+ puts "Exception when calling DailyActivityApi->commit_activity_transaction: #{e}"
75
+ end
76
+
77
+ ```
78
+
79
+ ## Documentation for API Endpoints
80
+
81
+ All URIs are relative to *https://www.polaraccesslink.com*
82
+
83
+ Class | Method | HTTP request | Description
84
+ ------------ | ------------- | ------------- | -------------
85
+ *PolarAccesslinkApiGem::DailyActivityApi* | [**commit_activity_transaction**](docs/DailyActivityApi.md#commit_activity_transaction) | **PUT** /v3/users/{user-id}/activity-transactions/{transaction-id} | Commit transaction
86
+ *PolarAccesslinkApiGem::DailyActivityApi* | [**create_activity_transaction**](docs/DailyActivityApi.md#create_activity_transaction) | **POST** /v3/users/{user-id}/activity-transactions | Create transaction
87
+ *PolarAccesslinkApiGem::DailyActivityApi* | [**get_activity_summary**](docs/DailyActivityApi.md#get_activity_summary) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id} | Get activity summary
88
+ *PolarAccesslinkApiGem::DailyActivityApi* | [**get_step_samples**](docs/DailyActivityApi.md#get_step_samples) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id}/step-samples | Get step samples
89
+ *PolarAccesslinkApiGem::DailyActivityApi* | [**get_zone_samples**](docs/DailyActivityApi.md#get_zone_samples) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id}/zone-samples | Get zone samples
90
+ *PolarAccesslinkApiGem::DailyActivityApi* | [**list_activities**](docs/DailyActivityApi.md#list_activities) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id} | List activities
91
+ *PolarAccesslinkApiGem::ExercisesApi* | [**get_exercise_fit_without_transaction**](docs/ExercisesApi.md#get_exercise_fit_without_transaction) | **GET** /v3/exercises/{exerciseId}/fit | Get exercise FIT
92
+ *PolarAccesslinkApiGem::ExercisesApi* | [**get_exercise_without_transaction**](docs/ExercisesApi.md#get_exercise_without_transaction) | **GET** /v3/exercises/{exerciseId} | Get exercise
93
+ *PolarAccesslinkApiGem::ExercisesApi* | [**list_exercises_without_transaction**](docs/ExercisesApi.md#list_exercises_without_transaction) | **GET** /v3/exercises | List exercises
94
+ *PolarAccesslinkApiGem::NightlyRechargeApi* | [**list_nightly_recharge**](docs/NightlyRechargeApi.md#list_nightly_recharge) | **GET** /v3/users/nightly-recharge | List Nightly Recharges
95
+ *PolarAccesslinkApiGem::NightlyRechargeApi* | [**v3_users_nightly_recharge_date_get**](docs/NightlyRechargeApi.md#v3_users_nightly_recharge_date_get) | **GET** /v3/users/nightly-recharge/{date} | Get Nightly Recharge
96
+ *PolarAccesslinkApiGem::PhysicalInfoApi* | [**commit_physical_info_transaction**](docs/PhysicalInfoApi.md#commit_physical_info_transaction) | **PUT** /v3/users/{user-id}/physical-information-transactions/{transaction-id} | Commit transaction
97
+ *PolarAccesslinkApiGem::PhysicalInfoApi* | [**create_physical_info_transaction**](docs/PhysicalInfoApi.md#create_physical_info_transaction) | **POST** /v3/users/{user-id}/physical-information-transactions | Create transaction
98
+ *PolarAccesslinkApiGem::PhysicalInfoApi* | [**get_physical_info**](docs/PhysicalInfoApi.md#get_physical_info) | **GET** /v3/users/{user-id}/physical-information-transactions/{transaction-id}/physical-informations/{physical-info-id} | Get physical info
99
+ *PolarAccesslinkApiGem::PhysicalInfoApi* | [**list_physical_infos**](docs/PhysicalInfoApi.md#list_physical_infos) | **GET** /v3/users/{user-id}/physical-information-transactions/{transaction-id} | List physical infos
100
+ *PolarAccesslinkApiGem::PullNotificationsApi* | [**list**](docs/PullNotificationsApi.md#list) | **GET** /v3/notifications | List
101
+ *PolarAccesslinkApiGem::SleepApi* | [**list_nights**](docs/SleepApi.md#list_nights) | **GET** /v3/users/sleep | List nights
102
+ *PolarAccesslinkApiGem::SleepApi* | [**v3_users_sleep_available_get**](docs/SleepApi.md#v3_users_sleep_available_get) | **GET** /v3/users/sleep/available | Get available sleep times
103
+ *PolarAccesslinkApiGem::SleepApi* | [**v3_users_sleep_date_get**](docs/SleepApi.md#v3_users_sleep_date_get) | **GET** /v3/users/sleep/{date} | Get Sleep
104
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**commit_exercise_transaction**](docs/TrainingDataApi.md#commit_exercise_transaction) | **PUT** /v3/users/{user-id}/exercise-transactions/{transaction-id} | Commit transaction
105
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**create_exercise_transaction**](docs/TrainingDataApi.md#create_exercise_transaction) | **POST** /v3/users/{user-id}/exercise-transactions | Create transaction
106
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**get_available_samples**](docs/TrainingDataApi.md#get_available_samples) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples | Get available samples
107
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**get_exercise_summary**](docs/TrainingDataApi.md#get_exercise_summary) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id} | Get exercise summary
108
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**get_fit**](docs/TrainingDataApi.md#get_fit) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/fit | Get FIT (beta)
109
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**get_gpx**](docs/TrainingDataApi.md#get_gpx) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/gpx | Get GPX
110
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**get_heart_rate_zones**](docs/TrainingDataApi.md#get_heart_rate_zones) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/heart-rate-zones | Get heart rate zones
111
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**get_samples**](docs/TrainingDataApi.md#get_samples) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples/{type-id} | Get samples
112
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**get_tcx**](docs/TrainingDataApi.md#get_tcx) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/tcx | Get TCX
113
+ *PolarAccesslinkApiGem::TrainingDataApi* | [**list_exercises**](docs/TrainingDataApi.md#list_exercises) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id} | List exercises
114
+ *PolarAccesslinkApiGem::UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /v3/users/{user-id} | Delete user
115
+ *PolarAccesslinkApiGem::UsersApi* | [**get_user_information**](docs/UsersApi.md#get_user_information) | **GET** /v3/users/{user-id} | Get user information
116
+ *PolarAccesslinkApiGem::UsersApi* | [**register_user**](docs/UsersApi.md#register_user) | **POST** /v3/users | Register user
117
+ *PolarAccesslinkApiGem::WebhooksApi* | [**create_webhook**](docs/WebhooksApi.md#create_webhook) | **POST** /v3/webhooks | Create webhook
118
+ *PolarAccesslinkApiGem::WebhooksApi* | [**delete_webhook**](docs/WebhooksApi.md#delete_webhook) | **DELETE** /v3/webhooks/{webhook-id} | Delete webhook
119
+ *PolarAccesslinkApiGem::WebhooksApi* | [**get_webhook**](docs/WebhooksApi.md#get_webhook) | **GET** /v3/webhooks | Get webhook
120
+ *PolarAccesslinkApiGem::WebhooksApi* | [**update_webhook**](docs/WebhooksApi.md#update_webhook) | **PATCH** /v3/webhooks/{webhook-id} | Update webhook
121
+
122
+
123
+ ## Documentation for Models
124
+
125
+ - [PolarAccesslinkApiGem::Activity](docs/Activity.md)
126
+ - [PolarAccesslinkApiGem::ActivityLog](docs/ActivityLog.md)
127
+ - [PolarAccesslinkApiGem::ActivityStepSample](docs/ActivityStepSample.md)
128
+ - [PolarAccesslinkApiGem::ActivityStepSamples](docs/ActivityStepSamples.md)
129
+ - [PolarAccesslinkApiGem::ActivityZoneSample](docs/ActivityZoneSample.md)
130
+ - [PolarAccesslinkApiGem::ActivityZoneSamples](docs/ActivityZoneSamples.md)
131
+ - [PolarAccesslinkApiGem::AvailableSleep](docs/AvailableSleep.md)
132
+ - [PolarAccesslinkApiGem::AvailableSleeps](docs/AvailableSleeps.md)
133
+ - [PolarAccesslinkApiGem::AvailableUserData](docs/AvailableUserData.md)
134
+ - [PolarAccesslinkApiGem::AvailableUserDatas](docs/AvailableUserDatas.md)
135
+ - [PolarAccesslinkApiGem::CreatedWebhook](docs/CreatedWebhook.md)
136
+ - [PolarAccesslinkApiGem::CreatedWebhookData](docs/CreatedWebhookData.md)
137
+ - [PolarAccesslinkApiGem::DurationZone](docs/DurationZone.md)
138
+ - [PolarAccesslinkApiGem::Error](docs/Error.md)
139
+ - [PolarAccesslinkApiGem::Exercise](docs/Exercise.md)
140
+ - [PolarAccesslinkApiGem::ExerciseHashId](docs/ExerciseHashId.md)
141
+ - [PolarAccesslinkApiGem::Exercises](docs/Exercises.md)
142
+ - [PolarAccesslinkApiGem::HeartRate](docs/HeartRate.md)
143
+ - [PolarAccesslinkApiGem::NightlyRecharge](docs/NightlyRecharge.md)
144
+ - [PolarAccesslinkApiGem::Nights](docs/Nights.md)
145
+ - [PolarAccesslinkApiGem::PhysicalInformation](docs/PhysicalInformation.md)
146
+ - [PolarAccesslinkApiGem::PhysicalInformations](docs/PhysicalInformations.md)
147
+ - [PolarAccesslinkApiGem::Recharges](docs/Recharges.md)
148
+ - [PolarAccesslinkApiGem::Register](docs/Register.md)
149
+ - [PolarAccesslinkApiGem::Sample](docs/Sample.md)
150
+ - [PolarAccesslinkApiGem::Samples](docs/Samples.md)
151
+ - [PolarAccesslinkApiGem::Sleep](docs/Sleep.md)
152
+ - [PolarAccesslinkApiGem::TransactionLocation](docs/TransactionLocation.md)
153
+ - [PolarAccesslinkApiGem::User](docs/User.md)
154
+ - [PolarAccesslinkApiGem::UserExtraInfo](docs/UserExtraInfo.md)
155
+ - [PolarAccesslinkApiGem::WebhookInfo](docs/WebhookInfo.md)
156
+ - [PolarAccesslinkApiGem::WebhookInfoData](docs/WebhookInfoData.md)
157
+ - [PolarAccesslinkApiGem::WebhookPatch](docs/WebhookPatch.md)
158
+ - [PolarAccesslinkApiGem::WebhookPayloadExercise](docs/WebhookPayloadExercise.md)
159
+ - [PolarAccesslinkApiGem::WebhookPayloadSleep](docs/WebhookPayloadSleep.md)
160
+ - [PolarAccesslinkApiGem::WebhookPing](docs/WebhookPing.md)
161
+ - [PolarAccesslinkApiGem::WebhookRequest](docs/WebhookRequest.md)
162
+ - [PolarAccesslinkApiGem::WebhookType](docs/WebhookType.md)
163
+ - [PolarAccesslinkApiGem::Zone](docs/Zone.md)
164
+ - [PolarAccesslinkApiGem::Zones](docs/Zones.md)
165
+
166
+
167
+ ## Documentation for Authorization
168
+
169
+
170
+ ### Basic
171
+
172
+ - **Type**: HTTP basic authentication
173
+
174
+ ### OAuth2
175
+
176
+
177
+ - **Type**: OAuth
178
+ - **Flow**: accessCode
179
+ - **Authorization URL**: https://flow.polar.com/oauth2/authorization
180
+ - **Scopes**:
181
+ - accesslink.read_all: Allows read access to user's data
182
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
data/docs/Activity.md ADDED
@@ -0,0 +1,34 @@
1
+ # PolarAccesslinkApiGem::Activity
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | Activity summary id | [optional] |
8
+ | **polar_user** | **String** | Absolute link to user owning the activity | [optional] |
9
+ | **transaction_id** | **Integer** | Id of the activity-transaction this training was transferred in | [optional] |
10
+ | **date** | **String** | Date when activity summary was recorded, in format YYYY-MM-DD | [optional] |
11
+ | **created** | **String** | The time activity summary was created in Accesslink, in format YYYY-MM-DDTHH:mm:ss.SSS | [optional] |
12
+ | **calories** | **Integer** | Total daily calories in kilo calories including BMR | [optional] |
13
+ | **active_calories** | **Integer** | Total daily calories not including BMR. Precise calculation requires that user's physical data is entered into Polar Flow | [optional] |
14
+ | **duration** | **String** | The time interval as specified in ISO 8601 | [optional] |
15
+ | **active_steps** | **Integer** | You could consider this as a kind of activity unit. If you take one step the active-steps should increase by one and any activity comparable to one physical step would also increase the number by one | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'polar-accesslink-api-gem'
21
+
22
+ instance = PolarAccesslinkApiGem::Activity.new(
23
+ id: 1234,
24
+ polar_user: https://www.polaraccesslink/v3/users/1,
25
+ transaction_id: 179879,
26
+ date: 2010-12-31,
27
+ created: 2016-04-27T20:11:33.000Z,
28
+ calories: 2329,
29
+ active_calories: 428,
30
+ duration: PT2H44M,
31
+ active_steps: 250
32
+ )
33
+ ```
34
+
@@ -0,0 +1,18 @@
1
+ # PolarAccesslinkApiGem::ActivityLog
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **activity_log** | **Array<String>** | Absolute links to individual activity summaries within the transaction | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'polar-accesslink-api-gem'
13
+
14
+ instance = PolarAccesslinkApiGem::ActivityLog.new(
15
+ activity_log: ["https://www.polaraccesslink.com/v3/users/12/activity-transactions/34/activities/56","https://www.polaraccesslink.com/v3/users/12/activity-transactions/34/activities/120"]
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # PolarAccesslinkApiGem::ActivityStepSample
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **steps** | **Integer** | Number of steps in sample segment. If element is null, step samples are not available for current segment. | [optional] |
8
+ | **time** | **String** | Start time of sample segment. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::ActivityStepSample.new(
16
+ steps: null,
17
+ time: 12:37:33.000
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # PolarAccesslinkApiGem::ActivityStepSamples
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **interval** | **Integer** | Sample interval in minutes. | [optional] |
8
+ | **samples** | [**Array<ActivityStepSample>**](ActivityStepSample.md) | List of individual step sample objects. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::ActivityStepSamples.new(
16
+ interval: null,
17
+ samples: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # PolarAccesslinkApiGem::ActivityZoneSample
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **activity_zones** | [**Array<DurationZone>**](DurationZone.md) | List of heart rate zones with duration. | [optional] |
8
+ | **time** | **String** | Start time of sample segment. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::ActivityZoneSample.new(
16
+ activity_zones: null,
17
+ time: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # PolarAccesslinkApiGem::ActivityZoneSamples
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **interval** | **Integer** | Sample interval in minutes. | [optional] |
8
+ | **samples** | [**Array<ActivityZoneSample>**](ActivityZoneSample.md) | List of individual zone sample objects. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::ActivityZoneSamples.new(
16
+ interval: null,
17
+ samples: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # PolarAccesslinkApiGem::AvailableSleep
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **date** | **Date** | Result date of the sleep | [optional] |
8
+ | **start_time** | **Time** | Start timestamp of the sleep as ISO-8601 datetime string | [optional] |
9
+ | **end_time** | **Time** | End timestamp of the sleep as ISO-8601 datetime string | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'polar-accesslink-api-gem'
15
+
16
+ instance = PolarAccesslinkApiGem::AvailableSleep.new(
17
+ date: Wed Jan 01 01:00:00 CET 2020,
18
+ start_time: 2020-01-01T00:39:07+03:00,
19
+ end_time: 2020-01-01T09:39:07+03:00
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # PolarAccesslinkApiGem::AvailableSleeps
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **available** | [**Array<AvailableSleep>**](AvailableSleep.md) | List of available sleep data | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'polar-accesslink-api-gem'
13
+
14
+ instance = PolarAccesslinkApiGem::AvailableSleeps.new(
15
+ available: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # PolarAccesslinkApiGem::AvailableUserData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **user_id** | **Integer** | User identifier who has available data. | [optional] |
8
+ | **data_type** | **String** | Type of available data. | [optional] |
9
+ | **url** | **String** | URI pointing to transaction initiation endpoint for user | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'polar-accesslink-api-gem'
15
+
16
+ instance = PolarAccesslinkApiGem::AvailableUserData.new(
17
+ user_id: 475,
18
+ data_type: ACTIVITY_SUMMARY,
19
+ url: https://www.polaraccesslink.com/v3/users/475/activity-transactions
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # PolarAccesslinkApiGem::AvailableUserDatas
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **available_user_data** | [**Array<AvailableUserData>**](AvailableUserData.md) | List of available user datas. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'polar-accesslink-api-gem'
13
+
14
+ instance = PolarAccesslinkApiGem::AvailableUserDatas.new(
15
+ available_user_data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # PolarAccesslinkApiGem::CreatedWebhook
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**CreatedWebhookData**](CreatedWebhookData.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'polar-accesslink-api-gem'
13
+
14
+ instance = PolarAccesslinkApiGem::CreatedWebhook.new(
15
+ data: null
16
+ )
17
+ ```
18
+