polar_accesslink 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +70 -0
  4. data/README.md +170 -0
  5. data/Rakefile +10 -0
  6. data/docs/Activity.md +33 -0
  7. data/docs/ActivityLog.md +17 -0
  8. data/docs/ActivityStepSample.md +19 -0
  9. data/docs/ActivityStepSamples.md +19 -0
  10. data/docs/ActivityZoneSample.md +19 -0
  11. data/docs/ActivityZoneSamples.md +19 -0
  12. data/docs/AvailableUserData.md +21 -0
  13. data/docs/AvailableUserDatas.md +17 -0
  14. data/docs/CreatedWebhook.md +17 -0
  15. data/docs/CreatedWebhookData.md +23 -0
  16. data/docs/DailyActivityApi.md +339 -0
  17. data/docs/DurationZone.md +19 -0
  18. data/docs/Error.md +25 -0
  19. data/docs/Exercise.md +47 -0
  20. data/docs/ExerciseHashId.md +45 -0
  21. data/docs/Exercises.md +17 -0
  22. data/docs/ExercisesApi.md +163 -0
  23. data/docs/HeartRate.md +19 -0
  24. data/docs/PhysicalInfoApi.md +227 -0
  25. data/docs/PhysicalInformation.md +39 -0
  26. data/docs/PhysicalInformations.md +17 -0
  27. data/docs/PullNotificationsApi.md +58 -0
  28. data/docs/Register.md +17 -0
  29. data/docs/Sample.md +21 -0
  30. data/docs/Samples.md +17 -0
  31. data/docs/TrainingDataApi.md +571 -0
  32. data/docs/TransactionLocation.md +19 -0
  33. data/docs/User.md +35 -0
  34. data/docs/UserExtraInfo.md +21 -0
  35. data/docs/UsersApi.md +166 -0
  36. data/docs/WebhookInfo.md +17 -0
  37. data/docs/WebhookInfoData.md +21 -0
  38. data/docs/WebhookPatch.md +19 -0
  39. data/docs/WebhookPayload.md +25 -0
  40. data/docs/WebhookPing.md +19 -0
  41. data/docs/WebhookRequest.md +19 -0
  42. data/docs/WebhookType.md +16 -0
  43. data/docs/WebhooksApi.md +221 -0
  44. data/docs/Zone.md +23 -0
  45. data/docs/Zones.md +17 -0
  46. data/lib/.DS_Store +0 -0
  47. data/lib/polar_accesslink/.DS_Store +0 -0
  48. data/lib/polar_accesslink/api/daily_activity_api.rb +463 -0
  49. data/lib/polar_accesslink/api/exercises_api.rb +202 -0
  50. data/lib/polar_accesslink/api/physical_info_api.rb +292 -0
  51. data/lib/polar_accesslink/api/pull_notifications_api.rb +78 -0
  52. data/lib/polar_accesslink/api/training_data_api.rb +772 -0
  53. data/lib/polar_accesslink/api/users_api.rb +218 -0
  54. data/lib/polar_accesslink/api/webhooks_api.rb +274 -0
  55. data/lib/polar_accesslink/api_client.rb +386 -0
  56. data/lib/polar_accesslink/api_error.rb +57 -0
  57. data/lib/polar_accesslink/configuration.rb +255 -0
  58. data/lib/polar_accesslink/models/activity.rb +288 -0
  59. data/lib/polar_accesslink/models/activity_log.rb +210 -0
  60. data/lib/polar_accesslink/models/activity_step_sample.rb +218 -0
  61. data/lib/polar_accesslink/models/activity_step_samples.rb +220 -0
  62. data/lib/polar_accesslink/models/activity_zone_sample.rb +220 -0
  63. data/lib/polar_accesslink/models/activity_zone_samples.rb +220 -0
  64. data/lib/polar_accesslink/models/available_user_data.rb +262 -0
  65. data/lib/polar_accesslink/models/available_user_datas.rb +210 -0
  66. data/lib/polar_accesslink/models/created_webhook.rb +206 -0
  67. data/lib/polar_accesslink/models/created_webhook_data.rb +236 -0
  68. data/lib/polar_accesslink/models/duration_zone.rb +218 -0
  69. data/lib/polar_accesslink/models/error.rb +248 -0
  70. data/lib/polar_accesslink/models/exercise.rb +357 -0
  71. data/lib/polar_accesslink/models/exercise_hash_id.rb +347 -0
  72. data/lib/polar_accesslink/models/exercises.rb +210 -0
  73. data/lib/polar_accesslink/models/heart_rate.rb +218 -0
  74. data/lib/polar_accesslink/models/physical_information.rb +352 -0
  75. data/lib/polar_accesslink/models/physical_informations.rb +210 -0
  76. data/lib/polar_accesslink/models/register.rb +213 -0
  77. data/lib/polar_accesslink/models/sample.rb +228 -0
  78. data/lib/polar_accesslink/models/samples.rb +210 -0
  79. data/lib/polar_accesslink/models/transaction_location.rb +218 -0
  80. data/lib/polar_accesslink/models/user.rb +334 -0
  81. data/lib/polar_accesslink/models/user_extra_info.rb +228 -0
  82. data/lib/polar_accesslink/models/webhook_info.rb +206 -0
  83. data/lib/polar_accesslink/models/webhook_info_data.rb +226 -0
  84. data/lib/polar_accesslink/models/webhook_patch.rb +219 -0
  85. data/lib/polar_accesslink/models/webhook_payload.rb +246 -0
  86. data/lib/polar_accesslink/models/webhook_ping.rb +252 -0
  87. data/lib/polar_accesslink/models/webhook_request.rb +229 -0
  88. data/lib/polar_accesslink/models/webhook_type.rb +37 -0
  89. data/lib/polar_accesslink/models/zone.rb +238 -0
  90. data/lib/polar_accesslink/models/zones.rb +210 -0
  91. data/lib/polar_accesslink/version.rb +15 -0
  92. data/lib/polar_accesslink.rb +79 -0
  93. data/polar_accesslink-1.0.0.gem +0 -0
  94. data/polar_accesslink.gemspec +38 -0
  95. data/spec/api/daily_activity_api_spec.rb +114 -0
  96. data/spec/api/exercises_api_spec.rb +70 -0
  97. data/spec/api/physical_info_api_spec.rb +87 -0
  98. data/spec/api/pull_notifications_api_spec.rb +46 -0
  99. data/spec/api/training_data_api_spec.rb +172 -0
  100. data/spec/api/users_api_spec.rb +71 -0
  101. data/spec/api/webhooks_api_spec.rb +83 -0
  102. data/spec/api_client_spec.rb +226 -0
  103. data/spec/configuration_spec.rb +42 -0
  104. data/spec/models/activity_log_spec.rb +41 -0
  105. data/spec/models/activity_spec.rb +89 -0
  106. data/spec/models/activity_step_sample_spec.rb +47 -0
  107. data/spec/models/activity_step_samples_spec.rb +47 -0
  108. data/spec/models/activity_zone_sample_spec.rb +47 -0
  109. data/spec/models/activity_zone_samples_spec.rb +47 -0
  110. data/spec/models/available_user_data_spec.rb +57 -0
  111. data/spec/models/available_user_datas_spec.rb +41 -0
  112. data/spec/models/created_webhook_data_spec.rb +59 -0
  113. data/spec/models/created_webhook_spec.rb +41 -0
  114. data/spec/models/duration_zone_spec.rb +47 -0
  115. data/spec/models/error_spec.rb +65 -0
  116. data/spec/models/exercise_hash_id_spec.rb +125 -0
  117. data/spec/models/exercise_spec.rb +131 -0
  118. data/spec/models/exercises_spec.rb +41 -0
  119. data/spec/models/heart_rate_spec.rb +47 -0
  120. data/spec/models/physical_information_spec.rb +111 -0
  121. data/spec/models/physical_informations_spec.rb +41 -0
  122. data/spec/models/register_spec.rb +41 -0
  123. data/spec/models/sample_spec.rb +53 -0
  124. data/spec/models/samples_spec.rb +41 -0
  125. data/spec/models/transaction_location_spec.rb +47 -0
  126. data/spec/models/user_extra_info_spec.rb +53 -0
  127. data/spec/models/user_spec.rb +99 -0
  128. data/spec/models/webhook_info_data_spec.rb +53 -0
  129. data/spec/models/webhook_info_spec.rb +41 -0
  130. data/spec/models/webhook_patch_spec.rb +47 -0
  131. data/spec/models/webhook_payload_spec.rb +65 -0
  132. data/spec/models/webhook_ping_spec.rb +51 -0
  133. data/spec/models/webhook_request_spec.rb +47 -0
  134. data/spec/models/webhook_type_spec.rb +35 -0
  135. data/spec/models/zone_spec.rb +59 -0
  136. data/spec/models/zones_spec.rb +41 -0
  137. data/spec/spec_helper.rb +111 -0
  138. metadata +282 -0
@@ -0,0 +1,571 @@
1
+ # PolarAccesslink::TrainingDataApi
2
+
3
+ All URIs are relative to *https://www.polaraccesslink.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**commit_exercise_transaction**](TrainingDataApi.md#commit_exercise_transaction) | **PUT** /v3/users/{user-id}/exercise-transactions/{transaction-id} | Commit transaction
8
+ [**create_exercise_transaction**](TrainingDataApi.md#create_exercise_transaction) | **POST** /v3/users/{user-id}/exercise-transactions | Create transaction
9
+ [**get_available_samples**](TrainingDataApi.md#get_available_samples) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples | Get available samples
10
+ [**get_exercise_summary**](TrainingDataApi.md#get_exercise_summary) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id} | Get exercise summary
11
+ [**get_fit**](TrainingDataApi.md#get_fit) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/fit | Get FIT (beta)
12
+ [**get_gpx**](TrainingDataApi.md#get_gpx) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/gpx | Get GPX
13
+ [**get_heart_rate_zones**](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
14
+ [**get_samples**](TrainingDataApi.md#get_samples) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples/{type-id} | Get samples
15
+ [**get_tcx**](TrainingDataApi.md#get_tcx) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/tcx | Get TCX
16
+ [**list_exercises**](TrainingDataApi.md#list_exercises) | **GET** /v3/users/{user-id}/exercise-transactions/{transaction-id} | List exercises
17
+
18
+
19
+
20
+ ## commit_exercise_transaction
21
+
22
+ > commit_exercise_transaction(transaction_id, user_id)
23
+
24
+ Commit transaction
25
+
26
+ After successfully retrieving training session data within a transaction, partners are expected to commit the transaction.
27
+
28
+ ### Example
29
+
30
+ ```ruby
31
+ # load the gem
32
+ require 'openapi_client'
33
+ # setup authorization
34
+ OpenapiClient.configure do |config|
35
+ # Configure OAuth2 access token for authorization: OAuth2
36
+ config.access_token = 'YOUR ACCESS TOKEN'
37
+ end
38
+
39
+ api_instance = PolarAccesslink::TrainingDataApi.new
40
+ transaction_id = 56 # Integer | Transaction identifier
41
+ user_id = 56 # Integer | User identifier
42
+
43
+ begin
44
+ #Commit transaction
45
+ api_instance.commit_exercise_transaction(transaction_id, user_id)
46
+ rescue PolarAccesslink::ApiError => e
47
+ puts "Exception when calling TrainingDataApi->commit_exercise_transaction: #{e}"
48
+ end
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+
54
+ Name | Type | Description | Notes
55
+ ------------- | ------------- | ------------- | -------------
56
+ **transaction_id** | **Integer**| Transaction identifier |
57
+ **user_id** | **Integer**| User identifier |
58
+
59
+ ### Return type
60
+
61
+ nil (empty response body)
62
+
63
+ ### Authorization
64
+
65
+ [OAuth2](../README.md#OAuth2)
66
+
67
+ ### HTTP request headers
68
+
69
+ - **Content-Type**: Not defined
70
+ - **Accept**: Not defined
71
+
72
+
73
+ ## create_exercise_transaction
74
+
75
+ > TransactionLocation create_exercise_transaction(user_id)
76
+
77
+ Create transaction
78
+
79
+ Check for new training data and create a new transaction if found.
80
+
81
+ ### Example
82
+
83
+ ```ruby
84
+ # load the gem
85
+ require 'openapi_client'
86
+ # setup authorization
87
+ OpenapiClient.configure do |config|
88
+ # Configure OAuth2 access token for authorization: OAuth2
89
+ config.access_token = 'YOUR ACCESS TOKEN'
90
+ end
91
+
92
+ api_instance = PolarAccesslink::TrainingDataApi.new
93
+ user_id = 56 # Integer | User identifier
94
+
95
+ begin
96
+ #Create transaction
97
+ result = api_instance.create_exercise_transaction(user_id)
98
+ p result
99
+ rescue PolarAccesslink::ApiError => e
100
+ puts "Exception when calling TrainingDataApi->create_exercise_transaction: #{e}"
101
+ end
102
+ ```
103
+
104
+ ### Parameters
105
+
106
+
107
+ Name | Type | Description | Notes
108
+ ------------- | ------------- | ------------- | -------------
109
+ **user_id** | **Integer**| User identifier |
110
+
111
+ ### Return type
112
+
113
+ [**TransactionLocation**](TransactionLocation.md)
114
+
115
+ ### Authorization
116
+
117
+ [OAuth2](../README.md#OAuth2)
118
+
119
+ ### HTTP request headers
120
+
121
+ - **Content-Type**: Not defined
122
+ - **Accept**: application/json, application/xml
123
+
124
+
125
+ ## get_available_samples
126
+
127
+ > Samples get_available_samples(user_id, transaction_id, exercise_id)
128
+
129
+ Get available samples
130
+
131
+ Retrieve list of links to available samples in training session
132
+
133
+ ### Example
134
+
135
+ ```ruby
136
+ # load the gem
137
+ require 'openapi_client'
138
+ # setup authorization
139
+ OpenapiClient.configure do |config|
140
+ # Configure OAuth2 access token for authorization: OAuth2
141
+ config.access_token = 'YOUR ACCESS TOKEN'
142
+ end
143
+
144
+ api_instance = PolarAccesslink::TrainingDataApi.new
145
+ user_id = 56 # Integer | User identifier
146
+ transaction_id = 56 # Integer | Transaction identifier
147
+ exercise_id = 56 # Integer | Exercise identifier
148
+
149
+ begin
150
+ #Get available samples
151
+ result = api_instance.get_available_samples(user_id, transaction_id, exercise_id)
152
+ p result
153
+ rescue PolarAccesslink::ApiError => e
154
+ puts "Exception when calling TrainingDataApi->get_available_samples: #{e}"
155
+ end
156
+ ```
157
+
158
+ ### Parameters
159
+
160
+
161
+ Name | Type | Description | Notes
162
+ ------------- | ------------- | ------------- | -------------
163
+ **user_id** | **Integer**| User identifier |
164
+ **transaction_id** | **Integer**| Transaction identifier |
165
+ **exercise_id** | **Integer**| Exercise identifier |
166
+
167
+ ### Return type
168
+
169
+ [**Samples**](Samples.md)
170
+
171
+ ### Authorization
172
+
173
+ [OAuth2](../README.md#OAuth2)
174
+
175
+ ### HTTP request headers
176
+
177
+ - **Content-Type**: Not defined
178
+ - **Accept**: application/json, application/xml
179
+
180
+
181
+ ## get_exercise_summary
182
+
183
+ > Exercise get_exercise_summary(user_id, transaction_id, exercise_id)
184
+
185
+ Get exercise summary
186
+
187
+ Retrieve training session summary data
188
+
189
+ ### Example
190
+
191
+ ```ruby
192
+ # load the gem
193
+ require 'openapi_client'
194
+ # setup authorization
195
+ OpenapiClient.configure do |config|
196
+ # Configure OAuth2 access token for authorization: OAuth2
197
+ config.access_token = 'YOUR ACCESS TOKEN'
198
+ end
199
+
200
+ api_instance = PolarAccesslink::TrainingDataApi.new
201
+ user_id = 56 # Integer | User identifier
202
+ transaction_id = 56 # Integer | Transaction identifier
203
+ exercise_id = 56 # Integer | Exercise identifier
204
+
205
+ begin
206
+ #Get exercise summary
207
+ result = api_instance.get_exercise_summary(user_id, transaction_id, exercise_id)
208
+ p result
209
+ rescue PolarAccesslink::ApiError => e
210
+ puts "Exception when calling TrainingDataApi->get_exercise_summary: #{e}"
211
+ end
212
+ ```
213
+
214
+ ### Parameters
215
+
216
+
217
+ Name | Type | Description | Notes
218
+ ------------- | ------------- | ------------- | -------------
219
+ **user_id** | **Integer**| User identifier |
220
+ **transaction_id** | **Integer**| Transaction identifier |
221
+ **exercise_id** | **Integer**| Exercise identifier |
222
+
223
+ ### Return type
224
+
225
+ [**Exercise**](Exercise.md)
226
+
227
+ ### Authorization
228
+
229
+ [OAuth2](../README.md#OAuth2)
230
+
231
+ ### HTTP request headers
232
+
233
+ - **Content-Type**: Not defined
234
+ - **Accept**: application/json, application/xml
235
+
236
+
237
+ ## get_fit
238
+
239
+ > String get_fit(user_id, transaction_id, exercise_id)
240
+
241
+ Get FIT (beta)
242
+
243
+ Retrieve exercise in FIT format. **Note!** This interface is in beta phase. If there is anything we can help you with or you want to give us feedback, please contact [Support](#support).
244
+
245
+ ### Example
246
+
247
+ ```ruby
248
+ # load the gem
249
+ require 'openapi_client'
250
+ # setup authorization
251
+ OpenapiClient.configure do |config|
252
+ # Configure OAuth2 access token for authorization: OAuth2
253
+ config.access_token = 'YOUR ACCESS TOKEN'
254
+ end
255
+
256
+ api_instance = PolarAccesslink::TrainingDataApi.new
257
+ user_id = 56 # Integer | User identifier
258
+ transaction_id = 56 # Integer | Transaction identifier
259
+ exercise_id = 56 # Integer | Exercise identifier
260
+
261
+ begin
262
+ #Get FIT (beta)
263
+ result = api_instance.get_fit(user_id, transaction_id, exercise_id)
264
+ p result
265
+ rescue PolarAccesslink::ApiError => e
266
+ puts "Exception when calling TrainingDataApi->get_fit: #{e}"
267
+ end
268
+ ```
269
+
270
+ ### Parameters
271
+
272
+
273
+ Name | Type | Description | Notes
274
+ ------------- | ------------- | ------------- | -------------
275
+ **user_id** | **Integer**| User identifier |
276
+ **transaction_id** | **Integer**| Transaction identifier |
277
+ **exercise_id** | **Integer**| Exercise identifier |
278
+
279
+ ### Return type
280
+
281
+ **String**
282
+
283
+ ### Authorization
284
+
285
+ [OAuth2](../README.md#OAuth2)
286
+
287
+ ### HTTP request headers
288
+
289
+ - **Content-Type**: Not defined
290
+ - **Accept**: */*
291
+
292
+
293
+ ## get_gpx
294
+
295
+ > String get_gpx(user_id, transaction_id, exercise_id)
296
+
297
+ Get GPX
298
+
299
+ Retrieve training session summary data in GPX format
300
+
301
+ ### Example
302
+
303
+ ```ruby
304
+ # load the gem
305
+ require 'openapi_client'
306
+ # setup authorization
307
+ OpenapiClient.configure do |config|
308
+ # Configure OAuth2 access token for authorization: OAuth2
309
+ config.access_token = 'YOUR ACCESS TOKEN'
310
+ end
311
+
312
+ api_instance = PolarAccesslink::TrainingDataApi.new
313
+ user_id = 56 # Integer | User identifier
314
+ transaction_id = 56 # Integer | Transaction identifier
315
+ exercise_id = 56 # Integer | Exercise identifier
316
+
317
+ begin
318
+ #Get GPX
319
+ result = api_instance.get_gpx(user_id, transaction_id, exercise_id)
320
+ p result
321
+ rescue PolarAccesslink::ApiError => e
322
+ puts "Exception when calling TrainingDataApi->get_gpx: #{e}"
323
+ end
324
+ ```
325
+
326
+ ### Parameters
327
+
328
+
329
+ Name | Type | Description | Notes
330
+ ------------- | ------------- | ------------- | -------------
331
+ **user_id** | **Integer**| User identifier |
332
+ **transaction_id** | **Integer**| Transaction identifier |
333
+ **exercise_id** | **Integer**| Exercise identifier |
334
+
335
+ ### Return type
336
+
337
+ **String**
338
+
339
+ ### Authorization
340
+
341
+ [OAuth2](../README.md#OAuth2)
342
+
343
+ ### HTTP request headers
344
+
345
+ - **Content-Type**: Not defined
346
+ - **Accept**: application/gpx+xml
347
+
348
+
349
+ ## get_heart_rate_zones
350
+
351
+ > Zones get_heart_rate_zones(user_id, transaction_id, exercise_id)
352
+
353
+ Get heart rate zones
354
+
355
+ Retrieve heart rate zones in training session
356
+
357
+ ### Example
358
+
359
+ ```ruby
360
+ # load the gem
361
+ require 'openapi_client'
362
+ # setup authorization
363
+ OpenapiClient.configure do |config|
364
+ # Configure OAuth2 access token for authorization: OAuth2
365
+ config.access_token = 'YOUR ACCESS TOKEN'
366
+ end
367
+
368
+ api_instance = PolarAccesslink::TrainingDataApi.new
369
+ user_id = 56 # Integer | User identifier
370
+ transaction_id = 56 # Integer | Transaction identifier
371
+ exercise_id = 56 # Integer | Exercise identifier
372
+
373
+ begin
374
+ #Get heart rate zones
375
+ result = api_instance.get_heart_rate_zones(user_id, transaction_id, exercise_id)
376
+ p result
377
+ rescue PolarAccesslink::ApiError => e
378
+ puts "Exception when calling TrainingDataApi->get_heart_rate_zones: #{e}"
379
+ end
380
+ ```
381
+
382
+ ### Parameters
383
+
384
+
385
+ Name | Type | Description | Notes
386
+ ------------- | ------------- | ------------- | -------------
387
+ **user_id** | **Integer**| User identifier |
388
+ **transaction_id** | **Integer**| Transaction identifier |
389
+ **exercise_id** | **Integer**| Exercise identifier |
390
+
391
+ ### Return type
392
+
393
+ [**Zones**](Zones.md)
394
+
395
+ ### Authorization
396
+
397
+ [OAuth2](../README.md#OAuth2)
398
+
399
+ ### HTTP request headers
400
+
401
+ - **Content-Type**: Not defined
402
+ - **Accept**: application/json, application/xml
403
+
404
+
405
+ ## get_samples
406
+
407
+ > Sample get_samples(type_id, user_id, transaction_id, exercise_id)
408
+
409
+ Get samples
410
+
411
+ Retrieve sample data of given type
412
+
413
+ ### Example
414
+
415
+ ```ruby
416
+ # load the gem
417
+ require 'openapi_client'
418
+ # setup authorization
419
+ OpenapiClient.configure do |config|
420
+ # Configure OAuth2 access token for authorization: OAuth2
421
+ config.access_token = 'YOUR ACCESS TOKEN'
422
+ end
423
+
424
+ api_instance = PolarAccesslink::TrainingDataApi.new
425
+ type_id = 'type_id_example' # String | Sample type id
426
+ user_id = 56 # Integer | User identifier
427
+ transaction_id = 56 # Integer | Transaction identifier
428
+ exercise_id = 56 # Integer | Exercise identifier
429
+
430
+ begin
431
+ #Get samples
432
+ result = api_instance.get_samples(type_id, user_id, transaction_id, exercise_id)
433
+ p result
434
+ rescue PolarAccesslink::ApiError => e
435
+ puts "Exception when calling TrainingDataApi->get_samples: #{e}"
436
+ end
437
+ ```
438
+
439
+ ### Parameters
440
+
441
+
442
+ Name | Type | Description | Notes
443
+ ------------- | ------------- | ------------- | -------------
444
+ **type_id** | **String**| Sample type id |
445
+ **user_id** | **Integer**| User identifier |
446
+ **transaction_id** | **Integer**| Transaction identifier |
447
+ **exercise_id** | **Integer**| Exercise identifier |
448
+
449
+ ### Return type
450
+
451
+ [**Sample**](Sample.md)
452
+
453
+ ### Authorization
454
+
455
+ [OAuth2](../README.md#OAuth2)
456
+
457
+ ### HTTP request headers
458
+
459
+ - **Content-Type**: Not defined
460
+ - **Accept**: application/json, application/xml
461
+
462
+
463
+ ## get_tcx
464
+
465
+ > String get_tcx(user_id, transaction_id, exercise_id)
466
+
467
+ Get TCX
468
+
469
+ Retrieve exercise in TCX format
470
+
471
+ ### Example
472
+
473
+ ```ruby
474
+ # load the gem
475
+ require 'openapi_client'
476
+ # setup authorization
477
+ OpenapiClient.configure do |config|
478
+ # Configure OAuth2 access token for authorization: OAuth2
479
+ config.access_token = 'YOUR ACCESS TOKEN'
480
+ end
481
+
482
+ api_instance = PolarAccesslink::TrainingDataApi.new
483
+ user_id = 56 # Integer | User identifier
484
+ transaction_id = 56 # Integer | Transaction identifier
485
+ exercise_id = 56 # Integer | Exercise identifier
486
+
487
+ begin
488
+ #Get TCX
489
+ result = api_instance.get_tcx(user_id, transaction_id, exercise_id)
490
+ p result
491
+ rescue PolarAccesslink::ApiError => e
492
+ puts "Exception when calling TrainingDataApi->get_tcx: #{e}"
493
+ end
494
+ ```
495
+
496
+ ### Parameters
497
+
498
+
499
+ Name | Type | Description | Notes
500
+ ------------- | ------------- | ------------- | -------------
501
+ **user_id** | **Integer**| User identifier |
502
+ **transaction_id** | **Integer**| Transaction identifier |
503
+ **exercise_id** | **Integer**| Exercise identifier |
504
+
505
+ ### Return type
506
+
507
+ **String**
508
+
509
+ ### Authorization
510
+
511
+ [OAuth2](../README.md#OAuth2)
512
+
513
+ ### HTTP request headers
514
+
515
+ - **Content-Type**: Not defined
516
+ - **Accept**: application/vnd.garmin.tcx+xml
517
+
518
+
519
+ ## list_exercises
520
+
521
+ > Exercises list_exercises(transaction_id, user_id)
522
+
523
+ List exercises
524
+
525
+ After successfully initiating a transaction, training sessions included within it can be retrieved with the provided transactionId.
526
+
527
+ ### Example
528
+
529
+ ```ruby
530
+ # load the gem
531
+ require 'openapi_client'
532
+ # setup authorization
533
+ OpenapiClient.configure do |config|
534
+ # Configure OAuth2 access token for authorization: OAuth2
535
+ config.access_token = 'YOUR ACCESS TOKEN'
536
+ end
537
+
538
+ api_instance = PolarAccesslink::TrainingDataApi.new
539
+ transaction_id = 56 # Integer | Transaction identifier
540
+ user_id = 56 # Integer | User identifier
541
+
542
+ begin
543
+ #List exercises
544
+ result = api_instance.list_exercises(transaction_id, user_id)
545
+ p result
546
+ rescue PolarAccesslink::ApiError => e
547
+ puts "Exception when calling TrainingDataApi->list_exercises: #{e}"
548
+ end
549
+ ```
550
+
551
+ ### Parameters
552
+
553
+
554
+ Name | Type | Description | Notes
555
+ ------------- | ------------- | ------------- | -------------
556
+ **transaction_id** | **Integer**| Transaction identifier |
557
+ **user_id** | **Integer**| User identifier |
558
+
559
+ ### Return type
560
+
561
+ [**Exercises**](Exercises.md)
562
+
563
+ ### Authorization
564
+
565
+ [OAuth2](../README.md#OAuth2)
566
+
567
+ ### HTTP request headers
568
+
569
+ - **Content-Type**: Not defined
570
+ - **Accept**: application/json, application/xml
571
+
@@ -0,0 +1,19 @@
1
+ # PolarAccesslink::TransactionLocation
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **transaction_id** | **Integer** | Id of the created transaction | [optional]
8
+ **resource_uri** | **String** | Absolute links to the created transaction | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'OpenapiClient'
14
+
15
+ instance = PolarAccesslink::TransactionLocation.new(transaction_id: 122,
16
+ resource_uri: https://polaraccesslink.com/v3/users/21/physical-information-transactions/32)
17
+ ```
18
+
19
+
data/docs/User.md ADDED
@@ -0,0 +1,35 @@
1
+ # PolarAccesslink::User
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **polar_user_id** | **Integer** | User's id in Polar database | [optional]
8
+ **member_id** | **String** | User's identifier in partner's database | [optional]
9
+ **registration_date** | **DateTime** | Timestamp marked when ACCEPTED | [optional]
10
+ **first_name** | **String** | User's first name | [optional]
11
+ **last_name** | **String** | User's surname | [optional]
12
+ **birthdate** | **String** | User's birthdate as YYYY-MM-DD | [optional]
13
+ **gender** | **String** | User's sex | [optional]
14
+ **weight** | **Float** | User's weight in kg | [optional]
15
+ **height** | **Float** | Users height in centimeters | [optional]
16
+ **field** | [**Array<UserExtraInfo>**](UserExtraInfo.md) | List containing answers given by the user to a number of partner-specific questions. Extra-info is null if there are no required fields defined by the partner. | [optional]
17
+
18
+ ## Code Sample
19
+
20
+ ```ruby
21
+ require 'OpenapiClient'
22
+
23
+ instance = PolarAccesslink::User.new(polar_user_id: 2278512,
24
+ member_id: i09u9ujj,
25
+ registration_date: 2011-10-14T12:50:37Z,
26
+ first_name: Eka,
27
+ last_name: Toka,
28
+ birthdate: 1985-09-06T00:00:00.000Z,
29
+ gender: MALE,
30
+ weight: 66,
31
+ height: 170,
32
+ field: null)
33
+ ```
34
+
35
+
@@ -0,0 +1,21 @@
1
+ # PolarAccesslink::UserExtraInfo
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **value** | **String** | Value provided by the customer | [optional]
8
+ **index** | **Integer** | Item index | [optional]
9
+ **name** | **String** | Name of the extra info asked from customer | [optional]
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'OpenapiClient'
15
+
16
+ instance = PolarAccesslink::UserExtraInfo.new(value: 2,
17
+ index: 0,
18
+ name: number-of-children)
19
+ ```
20
+
21
+