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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +70 -0
- data/README.md +170 -0
- data/Rakefile +10 -0
- data/docs/Activity.md +33 -0
- data/docs/ActivityLog.md +17 -0
- data/docs/ActivityStepSample.md +19 -0
- data/docs/ActivityStepSamples.md +19 -0
- data/docs/ActivityZoneSample.md +19 -0
- data/docs/ActivityZoneSamples.md +19 -0
- data/docs/AvailableUserData.md +21 -0
- data/docs/AvailableUserDatas.md +17 -0
- data/docs/CreatedWebhook.md +17 -0
- data/docs/CreatedWebhookData.md +23 -0
- data/docs/DailyActivityApi.md +339 -0
- data/docs/DurationZone.md +19 -0
- data/docs/Error.md +25 -0
- data/docs/Exercise.md +47 -0
- data/docs/ExerciseHashId.md +45 -0
- data/docs/Exercises.md +17 -0
- data/docs/ExercisesApi.md +163 -0
- data/docs/HeartRate.md +19 -0
- data/docs/PhysicalInfoApi.md +227 -0
- data/docs/PhysicalInformation.md +39 -0
- data/docs/PhysicalInformations.md +17 -0
- data/docs/PullNotificationsApi.md +58 -0
- data/docs/Register.md +17 -0
- data/docs/Sample.md +21 -0
- data/docs/Samples.md +17 -0
- data/docs/TrainingDataApi.md +571 -0
- data/docs/TransactionLocation.md +19 -0
- data/docs/User.md +35 -0
- data/docs/UserExtraInfo.md +21 -0
- data/docs/UsersApi.md +166 -0
- data/docs/WebhookInfo.md +17 -0
- data/docs/WebhookInfoData.md +21 -0
- data/docs/WebhookPatch.md +19 -0
- data/docs/WebhookPayload.md +25 -0
- data/docs/WebhookPing.md +19 -0
- data/docs/WebhookRequest.md +19 -0
- data/docs/WebhookType.md +16 -0
- data/docs/WebhooksApi.md +221 -0
- data/docs/Zone.md +23 -0
- data/docs/Zones.md +17 -0
- data/lib/.DS_Store +0 -0
- data/lib/polar_accesslink/.DS_Store +0 -0
- data/lib/polar_accesslink/api/daily_activity_api.rb +463 -0
- data/lib/polar_accesslink/api/exercises_api.rb +202 -0
- data/lib/polar_accesslink/api/physical_info_api.rb +292 -0
- data/lib/polar_accesslink/api/pull_notifications_api.rb +78 -0
- data/lib/polar_accesslink/api/training_data_api.rb +772 -0
- data/lib/polar_accesslink/api/users_api.rb +218 -0
- data/lib/polar_accesslink/api/webhooks_api.rb +274 -0
- data/lib/polar_accesslink/api_client.rb +386 -0
- data/lib/polar_accesslink/api_error.rb +57 -0
- data/lib/polar_accesslink/configuration.rb +255 -0
- data/lib/polar_accesslink/models/activity.rb +288 -0
- data/lib/polar_accesslink/models/activity_log.rb +210 -0
- data/lib/polar_accesslink/models/activity_step_sample.rb +218 -0
- data/lib/polar_accesslink/models/activity_step_samples.rb +220 -0
- data/lib/polar_accesslink/models/activity_zone_sample.rb +220 -0
- data/lib/polar_accesslink/models/activity_zone_samples.rb +220 -0
- data/lib/polar_accesslink/models/available_user_data.rb +262 -0
- data/lib/polar_accesslink/models/available_user_datas.rb +210 -0
- data/lib/polar_accesslink/models/created_webhook.rb +206 -0
- data/lib/polar_accesslink/models/created_webhook_data.rb +236 -0
- data/lib/polar_accesslink/models/duration_zone.rb +218 -0
- data/lib/polar_accesslink/models/error.rb +248 -0
- data/lib/polar_accesslink/models/exercise.rb +357 -0
- data/lib/polar_accesslink/models/exercise_hash_id.rb +347 -0
- data/lib/polar_accesslink/models/exercises.rb +210 -0
- data/lib/polar_accesslink/models/heart_rate.rb +218 -0
- data/lib/polar_accesslink/models/physical_information.rb +352 -0
- data/lib/polar_accesslink/models/physical_informations.rb +210 -0
- data/lib/polar_accesslink/models/register.rb +213 -0
- data/lib/polar_accesslink/models/sample.rb +228 -0
- data/lib/polar_accesslink/models/samples.rb +210 -0
- data/lib/polar_accesslink/models/transaction_location.rb +218 -0
- data/lib/polar_accesslink/models/user.rb +334 -0
- data/lib/polar_accesslink/models/user_extra_info.rb +228 -0
- data/lib/polar_accesslink/models/webhook_info.rb +206 -0
- data/lib/polar_accesslink/models/webhook_info_data.rb +226 -0
- data/lib/polar_accesslink/models/webhook_patch.rb +219 -0
- data/lib/polar_accesslink/models/webhook_payload.rb +246 -0
- data/lib/polar_accesslink/models/webhook_ping.rb +252 -0
- data/lib/polar_accesslink/models/webhook_request.rb +229 -0
- data/lib/polar_accesslink/models/webhook_type.rb +37 -0
- data/lib/polar_accesslink/models/zone.rb +238 -0
- data/lib/polar_accesslink/models/zones.rb +210 -0
- data/lib/polar_accesslink/version.rb +15 -0
- data/lib/polar_accesslink.rb +79 -0
- data/polar_accesslink-1.0.0.gem +0 -0
- data/polar_accesslink.gemspec +38 -0
- data/spec/api/daily_activity_api_spec.rb +114 -0
- data/spec/api/exercises_api_spec.rb +70 -0
- data/spec/api/physical_info_api_spec.rb +87 -0
- data/spec/api/pull_notifications_api_spec.rb +46 -0
- data/spec/api/training_data_api_spec.rb +172 -0
- data/spec/api/users_api_spec.rb +71 -0
- data/spec/api/webhooks_api_spec.rb +83 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/activity_log_spec.rb +41 -0
- data/spec/models/activity_spec.rb +89 -0
- data/spec/models/activity_step_sample_spec.rb +47 -0
- data/spec/models/activity_step_samples_spec.rb +47 -0
- data/spec/models/activity_zone_sample_spec.rb +47 -0
- data/spec/models/activity_zone_samples_spec.rb +47 -0
- data/spec/models/available_user_data_spec.rb +57 -0
- data/spec/models/available_user_datas_spec.rb +41 -0
- data/spec/models/created_webhook_data_spec.rb +59 -0
- data/spec/models/created_webhook_spec.rb +41 -0
- data/spec/models/duration_zone_spec.rb +47 -0
- data/spec/models/error_spec.rb +65 -0
- data/spec/models/exercise_hash_id_spec.rb +125 -0
- data/spec/models/exercise_spec.rb +131 -0
- data/spec/models/exercises_spec.rb +41 -0
- data/spec/models/heart_rate_spec.rb +47 -0
- data/spec/models/physical_information_spec.rb +111 -0
- data/spec/models/physical_informations_spec.rb +41 -0
- data/spec/models/register_spec.rb +41 -0
- data/spec/models/sample_spec.rb +53 -0
- data/spec/models/samples_spec.rb +41 -0
- data/spec/models/transaction_location_spec.rb +47 -0
- data/spec/models/user_extra_info_spec.rb +53 -0
- data/spec/models/user_spec.rb +99 -0
- data/spec/models/webhook_info_data_spec.rb +53 -0
- data/spec/models/webhook_info_spec.rb +41 -0
- data/spec/models/webhook_patch_spec.rb +47 -0
- data/spec/models/webhook_payload_spec.rb +65 -0
- data/spec/models/webhook_ping_spec.rb +51 -0
- data/spec/models/webhook_request_spec.rb +47 -0
- data/spec/models/webhook_type_spec.rb +35 -0
- data/spec/models/zone_spec.rb +59 -0
- data/spec/models/zones_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +282 -0
@@ -0,0 +1,339 @@
|
|
1
|
+
# PolarAccesslink::DailyActivityApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://www.polaraccesslink.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**commit_activity_transaction**](DailyActivityApi.md#commit_activity_transaction) | **PUT** /v3/users/{user-id}/activity-transactions/{transaction-id} | Commit transaction
|
8
|
+
[**create_activity_transaction**](DailyActivityApi.md#create_activity_transaction) | **POST** /v3/users/{user-id}/activity-transactions | Create transaction
|
9
|
+
[**get_activity_summary**](DailyActivityApi.md#get_activity_summary) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id} | Get activity summary
|
10
|
+
[**get_step_samples**](DailyActivityApi.md#get_step_samples) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id}/step-samples | Get step samples
|
11
|
+
[**get_zone_samples**](DailyActivityApi.md#get_zone_samples) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id}/activities/{activity-id}/zone-samples | Get zone samples
|
12
|
+
[**list_activities**](DailyActivityApi.md#list_activities) | **GET** /v3/users/{user-id}/activity-transactions/{transaction-id} | List activities
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## commit_activity_transaction
|
17
|
+
|
18
|
+
> commit_activity_transaction(transaction_id, user_id)
|
19
|
+
|
20
|
+
Commit transaction
|
21
|
+
|
22
|
+
After successfully retrieving activity summary data within a transaction, partners are expected to commit the transaction.
|
23
|
+
|
24
|
+
### Example
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
# load the gem
|
28
|
+
require 'openapi_client'
|
29
|
+
# setup authorization
|
30
|
+
OpenapiClient.configure do |config|
|
31
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
32
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = PolarAccesslink::DailyActivityApi.new
|
36
|
+
transaction_id = 56 # Integer | Transaction identifier
|
37
|
+
user_id = 56 # Integer | User identifier
|
38
|
+
|
39
|
+
begin
|
40
|
+
#Commit transaction
|
41
|
+
api_instance.commit_activity_transaction(transaction_id, user_id)
|
42
|
+
rescue PolarAccesslink::ApiError => e
|
43
|
+
puts "Exception when calling DailyActivityApi->commit_activity_transaction: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
|
50
|
+
Name | Type | Description | Notes
|
51
|
+
------------- | ------------- | ------------- | -------------
|
52
|
+
**transaction_id** | **Integer**| Transaction identifier |
|
53
|
+
**user_id** | **Integer**| User identifier |
|
54
|
+
|
55
|
+
### Return type
|
56
|
+
|
57
|
+
nil (empty response body)
|
58
|
+
|
59
|
+
### Authorization
|
60
|
+
|
61
|
+
[OAuth2](../README.md#OAuth2)
|
62
|
+
|
63
|
+
### HTTP request headers
|
64
|
+
|
65
|
+
- **Content-Type**: Not defined
|
66
|
+
- **Accept**: Not defined
|
67
|
+
|
68
|
+
|
69
|
+
## create_activity_transaction
|
70
|
+
|
71
|
+
> TransactionLocation create_activity_transaction(user_id)
|
72
|
+
|
73
|
+
Create transaction
|
74
|
+
|
75
|
+
Initiate activity transaction. Check for new activity summaries and create a new transaction if found.
|
76
|
+
|
77
|
+
### Example
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
# load the gem
|
81
|
+
require 'openapi_client'
|
82
|
+
# setup authorization
|
83
|
+
OpenapiClient.configure do |config|
|
84
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
85
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
86
|
+
end
|
87
|
+
|
88
|
+
api_instance = PolarAccesslink::DailyActivityApi.new
|
89
|
+
user_id = 56 # Integer | User identifier
|
90
|
+
|
91
|
+
begin
|
92
|
+
#Create transaction
|
93
|
+
result = api_instance.create_activity_transaction(user_id)
|
94
|
+
p result
|
95
|
+
rescue PolarAccesslink::ApiError => e
|
96
|
+
puts "Exception when calling DailyActivityApi->create_activity_transaction: #{e}"
|
97
|
+
end
|
98
|
+
```
|
99
|
+
|
100
|
+
### Parameters
|
101
|
+
|
102
|
+
|
103
|
+
Name | Type | Description | Notes
|
104
|
+
------------- | ------------- | ------------- | -------------
|
105
|
+
**user_id** | **Integer**| User identifier |
|
106
|
+
|
107
|
+
### Return type
|
108
|
+
|
109
|
+
[**TransactionLocation**](TransactionLocation.md)
|
110
|
+
|
111
|
+
### Authorization
|
112
|
+
|
113
|
+
[OAuth2](../README.md#OAuth2)
|
114
|
+
|
115
|
+
### HTTP request headers
|
116
|
+
|
117
|
+
- **Content-Type**: Not defined
|
118
|
+
- **Accept**: application/json, application/xml
|
119
|
+
|
120
|
+
|
121
|
+
## get_activity_summary
|
122
|
+
|
123
|
+
> Activity get_activity_summary(user_id, transaction_id, activity_id)
|
124
|
+
|
125
|
+
Get activity summary
|
126
|
+
|
127
|
+
### Example
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
# load the gem
|
131
|
+
require 'openapi_client'
|
132
|
+
# setup authorization
|
133
|
+
OpenapiClient.configure do |config|
|
134
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
135
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
136
|
+
end
|
137
|
+
|
138
|
+
api_instance = PolarAccesslink::DailyActivityApi.new
|
139
|
+
user_id = 56 # Integer | User identifier
|
140
|
+
transaction_id = 56 # Integer | Transaction identifier
|
141
|
+
activity_id = 56 # Integer | Activity summary identifier
|
142
|
+
|
143
|
+
begin
|
144
|
+
#Get activity summary
|
145
|
+
result = api_instance.get_activity_summary(user_id, transaction_id, activity_id)
|
146
|
+
p result
|
147
|
+
rescue PolarAccesslink::ApiError => e
|
148
|
+
puts "Exception when calling DailyActivityApi->get_activity_summary: #{e}"
|
149
|
+
end
|
150
|
+
```
|
151
|
+
|
152
|
+
### Parameters
|
153
|
+
|
154
|
+
|
155
|
+
Name | Type | Description | Notes
|
156
|
+
------------- | ------------- | ------------- | -------------
|
157
|
+
**user_id** | **Integer**| User identifier |
|
158
|
+
**transaction_id** | **Integer**| Transaction identifier |
|
159
|
+
**activity_id** | **Integer**| Activity summary identifier |
|
160
|
+
|
161
|
+
### Return type
|
162
|
+
|
163
|
+
[**Activity**](Activity.md)
|
164
|
+
|
165
|
+
### Authorization
|
166
|
+
|
167
|
+
[OAuth2](../README.md#OAuth2)
|
168
|
+
|
169
|
+
### HTTP request headers
|
170
|
+
|
171
|
+
- **Content-Type**: Not defined
|
172
|
+
- **Accept**: application/json, application/xml
|
173
|
+
|
174
|
+
|
175
|
+
## get_step_samples
|
176
|
+
|
177
|
+
> ActivityStepSamples get_step_samples(user_id, transaction_id, activity_id)
|
178
|
+
|
179
|
+
Get step samples
|
180
|
+
|
181
|
+
Get activity step samples. Example data can be seen from [appendix](#activity-step-time-series).
|
182
|
+
|
183
|
+
### Example
|
184
|
+
|
185
|
+
```ruby
|
186
|
+
# load the gem
|
187
|
+
require 'openapi_client'
|
188
|
+
# setup authorization
|
189
|
+
OpenapiClient.configure do |config|
|
190
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
191
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
192
|
+
end
|
193
|
+
|
194
|
+
api_instance = PolarAccesslink::DailyActivityApi.new
|
195
|
+
user_id = 56 # Integer | User identifier
|
196
|
+
transaction_id = 56 # Integer | Transaction identifier
|
197
|
+
activity_id = 56 # Integer | Activity summary identifier
|
198
|
+
|
199
|
+
begin
|
200
|
+
#Get step samples
|
201
|
+
result = api_instance.get_step_samples(user_id, transaction_id, activity_id)
|
202
|
+
p result
|
203
|
+
rescue PolarAccesslink::ApiError => e
|
204
|
+
puts "Exception when calling DailyActivityApi->get_step_samples: #{e}"
|
205
|
+
end
|
206
|
+
```
|
207
|
+
|
208
|
+
### Parameters
|
209
|
+
|
210
|
+
|
211
|
+
Name | Type | Description | Notes
|
212
|
+
------------- | ------------- | ------------- | -------------
|
213
|
+
**user_id** | **Integer**| User identifier |
|
214
|
+
**transaction_id** | **Integer**| Transaction identifier |
|
215
|
+
**activity_id** | **Integer**| Activity summary identifier |
|
216
|
+
|
217
|
+
### Return type
|
218
|
+
|
219
|
+
[**ActivityStepSamples**](ActivityStepSamples.md)
|
220
|
+
|
221
|
+
### Authorization
|
222
|
+
|
223
|
+
[OAuth2](../README.md#OAuth2)
|
224
|
+
|
225
|
+
### HTTP request headers
|
226
|
+
|
227
|
+
- **Content-Type**: Not defined
|
228
|
+
- **Accept**: application/json, application/xml
|
229
|
+
|
230
|
+
|
231
|
+
## get_zone_samples
|
232
|
+
|
233
|
+
> ActivityZoneSamples get_zone_samples(user_id, transaction_id, activity_id)
|
234
|
+
|
235
|
+
Get zone samples
|
236
|
+
|
237
|
+
Get activity zone samples. Example data can be seen from [appendix](#activity-zone-time-series).
|
238
|
+
|
239
|
+
### Example
|
240
|
+
|
241
|
+
```ruby
|
242
|
+
# load the gem
|
243
|
+
require 'openapi_client'
|
244
|
+
# setup authorization
|
245
|
+
OpenapiClient.configure do |config|
|
246
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
247
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
248
|
+
end
|
249
|
+
|
250
|
+
api_instance = PolarAccesslink::DailyActivityApi.new
|
251
|
+
user_id = 56 # Integer | User identifier
|
252
|
+
transaction_id = 56 # Integer | Transaction identifier
|
253
|
+
activity_id = 56 # Integer | Activity summary identifier
|
254
|
+
|
255
|
+
begin
|
256
|
+
#Get zone samples
|
257
|
+
result = api_instance.get_zone_samples(user_id, transaction_id, activity_id)
|
258
|
+
p result
|
259
|
+
rescue PolarAccesslink::ApiError => e
|
260
|
+
puts "Exception when calling DailyActivityApi->get_zone_samples: #{e}"
|
261
|
+
end
|
262
|
+
```
|
263
|
+
|
264
|
+
### Parameters
|
265
|
+
|
266
|
+
|
267
|
+
Name | Type | Description | Notes
|
268
|
+
------------- | ------------- | ------------- | -------------
|
269
|
+
**user_id** | **Integer**| User identifier |
|
270
|
+
**transaction_id** | **Integer**| Transaction identifier |
|
271
|
+
**activity_id** | **Integer**| Activity summary identifier |
|
272
|
+
|
273
|
+
### Return type
|
274
|
+
|
275
|
+
[**ActivityZoneSamples**](ActivityZoneSamples.md)
|
276
|
+
|
277
|
+
### Authorization
|
278
|
+
|
279
|
+
[OAuth2](../README.md#OAuth2)
|
280
|
+
|
281
|
+
### HTTP request headers
|
282
|
+
|
283
|
+
- **Content-Type**: Not defined
|
284
|
+
- **Accept**: application/json, application/xml
|
285
|
+
|
286
|
+
|
287
|
+
## list_activities
|
288
|
+
|
289
|
+
> ActivityLog list_activities(transaction_id, user_id)
|
290
|
+
|
291
|
+
List activities
|
292
|
+
|
293
|
+
List new activity data. After successfully initiating a transaction, activity summaries included within it can be retrieved with the provided transactionId.
|
294
|
+
|
295
|
+
### Example
|
296
|
+
|
297
|
+
```ruby
|
298
|
+
# load the gem
|
299
|
+
require 'openapi_client'
|
300
|
+
# setup authorization
|
301
|
+
OpenapiClient.configure do |config|
|
302
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
303
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
304
|
+
end
|
305
|
+
|
306
|
+
api_instance = PolarAccesslink::DailyActivityApi.new
|
307
|
+
transaction_id = 56 # Integer | Transaction identifier
|
308
|
+
user_id = 56 # Integer | User identifier
|
309
|
+
|
310
|
+
begin
|
311
|
+
#List activities
|
312
|
+
result = api_instance.list_activities(transaction_id, user_id)
|
313
|
+
p result
|
314
|
+
rescue PolarAccesslink::ApiError => e
|
315
|
+
puts "Exception when calling DailyActivityApi->list_activities: #{e}"
|
316
|
+
end
|
317
|
+
```
|
318
|
+
|
319
|
+
### Parameters
|
320
|
+
|
321
|
+
|
322
|
+
Name | Type | Description | Notes
|
323
|
+
------------- | ------------- | ------------- | -------------
|
324
|
+
**transaction_id** | **Integer**| Transaction identifier |
|
325
|
+
**user_id** | **Integer**| User identifier |
|
326
|
+
|
327
|
+
### Return type
|
328
|
+
|
329
|
+
[**ActivityLog**](ActivityLog.md)
|
330
|
+
|
331
|
+
### Authorization
|
332
|
+
|
333
|
+
[OAuth2](../README.md#OAuth2)
|
334
|
+
|
335
|
+
### HTTP request headers
|
336
|
+
|
337
|
+
- **Content-Type**: Not defined
|
338
|
+
- **Accept**: application/json, application/xml
|
339
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# PolarAccesslink::DurationZone
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**index** | **Integer** | Activity zone index | [optional]
|
8
|
+
**inzone** | **String** | Time duration spent in the zone ISO 8601 | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OpenapiClient'
|
14
|
+
|
15
|
+
instance = PolarAccesslink::DurationZone.new(index: 1,
|
16
|
+
inzone: PT51M5S)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/Error.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# PolarAccesslink::Error
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**timestamp** | [**Timestamp**](Timestamp.md) | Timestamp of the error. | [optional]
|
8
|
+
**status** | **Integer** | Http status code | [optional]
|
9
|
+
**error_type** | **String** | Error type. | [optional]
|
10
|
+
**message** | **String** | Human readable error message. | [optional]
|
11
|
+
**corr_id** | **String** | Correlation id of the response for problem solving and debugging use. | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'OpenapiClient'
|
17
|
+
|
18
|
+
instance = PolarAccesslink::Error.new(timestamp: null,
|
19
|
+
status: null,
|
20
|
+
error_type: null,
|
21
|
+
message: null,
|
22
|
+
corr_id: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/docs/Exercise.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# PolarAccesslink::Exercise
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **Integer** | Id of the trainining session | [optional]
|
8
|
+
**upload_time** | **String** | Time of the transfer from wrist unit to Polar database | [optional]
|
9
|
+
**polar_user** | **String** | Absolute link to Polar user owning the training | [optional]
|
10
|
+
**transaction_id** | **Integer** | Id of the exercise-transaction this training was transferred in | [optional]
|
11
|
+
**device** | **String** | Polar product used in training | [optional]
|
12
|
+
**start_time** | **String** | Start time of the training session in local time | [optional]
|
13
|
+
**duration** | **String** | The duration of the training session as specified in ISO8601 | [optional]
|
14
|
+
**calories** | **Integer** | Expended calories during training in kilocalories | [optional]
|
15
|
+
**distance** | **Float** | Distance in meters travelled during training | [optional]
|
16
|
+
**heart_rate** | [**HeartRate**](HeartRate.md) | | [optional]
|
17
|
+
**training_load** | **Float** | Training load effect to user | [optional]
|
18
|
+
**sport** | **String** | Sport name | [optional]
|
19
|
+
**has_route** | **Boolean** | Boolean indicating if the exercise has route data | [optional]
|
20
|
+
**club_id** | **Integer** | Has value if the exercise is from \"Flow For Club\", otherwise not printed. Value -1 indicates that there were errors finding the club | [optional]
|
21
|
+
**club_name** | **String** | Has value if the exercise is from \"Flow For Club\", otherwise not printed. Value \"Ambiguous club location. Please contact support.\" is printed in case of error (and the club-id is -1). | [optional]
|
22
|
+
**detailed_sport_info** | **String** | String containing the name of a Polar Flow-compatible sport, if one is set for the exercise. | [optional]
|
23
|
+
|
24
|
+
## Code Sample
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'OpenapiClient'
|
28
|
+
|
29
|
+
instance = PolarAccesslink::Exercise.new(id: 1937529874,
|
30
|
+
upload_time: 2008-10-13T10:40:02.000Z,
|
31
|
+
polar_user: https://www.polaraccesslink/v3/users/1,
|
32
|
+
transaction_id: 179879,
|
33
|
+
device: Polar M400,
|
34
|
+
start_time: 2008-10-13T10:40:02.000Z,
|
35
|
+
duration: PT2H44M,
|
36
|
+
calories: 530,
|
37
|
+
distance: 1600,
|
38
|
+
heart_rate: null,
|
39
|
+
training_load: 143.22,
|
40
|
+
sport: OTHER,
|
41
|
+
has_route: true,
|
42
|
+
club_id: 999,
|
43
|
+
club_name: Polar Club,
|
44
|
+
detailed_sport_info: WATERSPORTS_WATERSKI)
|
45
|
+
```
|
46
|
+
|
47
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# PolarAccesslink::ExerciseHashId
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | Hashed id of the trainining session | [optional]
|
8
|
+
**upload_time** | **String** | Time of the transfer from wrist unit to Polar database | [optional]
|
9
|
+
**polar_user** | **String** | Absolute link to Polar user owning the training | [optional]
|
10
|
+
**device** | **String** | Polar product used in training | [optional]
|
11
|
+
**start_time** | **String** | Start time of the training session in local time | [optional]
|
12
|
+
**duration** | **String** | The duration of the training session as specified in ISO8601 | [optional]
|
13
|
+
**calories** | **Integer** | Expended calories during training in kilocalories | [optional]
|
14
|
+
**distance** | **Float** | Distance in meters travelled during training | [optional]
|
15
|
+
**heart_rate** | [**HeartRate**](HeartRate.md) | | [optional]
|
16
|
+
**training_load** | **Float** | Training load effect to user | [optional]
|
17
|
+
**sport** | **String** | Sport name | [optional]
|
18
|
+
**has_route** | **Boolean** | Boolean indicating if the exercise has route data | [optional]
|
19
|
+
**club_id** | **Integer** | Has value if the exercise is from \"Flow For Club\", otherwise not printed. Value -1 indicates that there were errors finding the club | [optional]
|
20
|
+
**club_name** | **String** | Has value if the exercise is from \"Flow For Club\", otherwise not printed. Value \"Ambiguous club location. Please contact support.\" is printed in case of error (and the club-id is -1). | [optional]
|
21
|
+
**detailed_sport_info** | **String** | String containing the name of a Polar Flow-compatible sport, if one is set for the exercise. | [optional]
|
22
|
+
|
23
|
+
## Code Sample
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'OpenapiClient'
|
27
|
+
|
28
|
+
instance = PolarAccesslink::ExerciseHashId.new(id: 2AC312F,
|
29
|
+
upload_time: 2008-10-13T10:40:02.000Z,
|
30
|
+
polar_user: https://www.polaraccesslink/v3/users/1,
|
31
|
+
device: Polar M400,
|
32
|
+
start_time: 2008-10-13T10:40:02.000Z,
|
33
|
+
duration: PT2H44M,
|
34
|
+
calories: 530,
|
35
|
+
distance: 1600,
|
36
|
+
heart_rate: null,
|
37
|
+
training_load: 143.22,
|
38
|
+
sport: OTHER,
|
39
|
+
has_route: true,
|
40
|
+
club_id: 999,
|
41
|
+
club_name: Polar Club,
|
42
|
+
detailed_sport_info: WATERSPORTS_WATERSKI)
|
43
|
+
```
|
44
|
+
|
45
|
+
|
data/docs/Exercises.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# PolarAccesslink::Exercises
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**exercises** | **Array<String>** | Absolute links to individual exercises within the transaction | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'OpenapiClient'
|
13
|
+
|
14
|
+
instance = PolarAccesslink::Exercises.new(exercises: ["https://www.polaraccesslink.com/v3/users/12/exercise-transactions/34/exercises/56","https://www.polaraccesslink.com/v3/users/12/exercise-transactions/34/exercises/120"])
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,163 @@
|
|
1
|
+
# PolarAccesslink::ExercisesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://www.polaraccesslink.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_exercise_fit_without_transaction**](ExercisesApi.md#get_exercise_fit_without_transaction) | **GET** /v3/exercises/{exerciseId}/fit | Get exercise FIT
|
8
|
+
[**get_exercise_without_transaction**](ExercisesApi.md#get_exercise_without_transaction) | **GET** /v3/exercises/{exerciseId} | Get exercise
|
9
|
+
[**list_exercises_without_transaction**](ExercisesApi.md#list_exercises_without_transaction) | **GET** /v3/exercises | List exercises
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## get_exercise_fit_without_transaction
|
14
|
+
|
15
|
+
> String get_exercise_fit_without_transaction(exercise_id)
|
16
|
+
|
17
|
+
Get exercise FIT
|
18
|
+
|
19
|
+
FIT file for users exercise.
|
20
|
+
|
21
|
+
### Example
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
# load the gem
|
25
|
+
require 'openapi_client'
|
26
|
+
# setup authorization
|
27
|
+
OpenapiClient.configure do |config|
|
28
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
29
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = PolarAccesslink::ExercisesApi.new
|
33
|
+
exercise_id = 'exercise_id_example' # String | Hashed exercise id.
|
34
|
+
|
35
|
+
begin
|
36
|
+
#Get exercise FIT
|
37
|
+
result = api_instance.get_exercise_fit_without_transaction(exercise_id)
|
38
|
+
p result
|
39
|
+
rescue PolarAccesslink::ApiError => e
|
40
|
+
puts "Exception when calling ExercisesApi->get_exercise_fit_without_transaction: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
### Parameters
|
45
|
+
|
46
|
+
|
47
|
+
Name | Type | Description | Notes
|
48
|
+
------------- | ------------- | ------------- | -------------
|
49
|
+
**exercise_id** | **String**| Hashed exercise id. |
|
50
|
+
|
51
|
+
### Return type
|
52
|
+
|
53
|
+
**String**
|
54
|
+
|
55
|
+
### Authorization
|
56
|
+
|
57
|
+
[OAuth2](../README.md#OAuth2)
|
58
|
+
|
59
|
+
### HTTP request headers
|
60
|
+
|
61
|
+
- **Content-Type**: Not defined
|
62
|
+
- **Accept**: */*
|
63
|
+
|
64
|
+
|
65
|
+
## get_exercise_without_transaction
|
66
|
+
|
67
|
+
> ExerciseHashId get_exercise_without_transaction(exercise_id)
|
68
|
+
|
69
|
+
Get exercise
|
70
|
+
|
71
|
+
Get users exercise using hashed id.
|
72
|
+
|
73
|
+
### Example
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
# load the gem
|
77
|
+
require 'openapi_client'
|
78
|
+
# setup authorization
|
79
|
+
OpenapiClient.configure do |config|
|
80
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
81
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
82
|
+
end
|
83
|
+
|
84
|
+
api_instance = PolarAccesslink::ExercisesApi.new
|
85
|
+
exercise_id = 'exercise_id_example' # String | Hashed exercise id.
|
86
|
+
|
87
|
+
begin
|
88
|
+
#Get exercise
|
89
|
+
result = api_instance.get_exercise_without_transaction(exercise_id)
|
90
|
+
p result
|
91
|
+
rescue PolarAccesslink::ApiError => e
|
92
|
+
puts "Exception when calling ExercisesApi->get_exercise_without_transaction: #{e}"
|
93
|
+
end
|
94
|
+
```
|
95
|
+
|
96
|
+
### Parameters
|
97
|
+
|
98
|
+
|
99
|
+
Name | Type | Description | Notes
|
100
|
+
------------- | ------------- | ------------- | -------------
|
101
|
+
**exercise_id** | **String**| Hashed exercise id. |
|
102
|
+
|
103
|
+
### Return type
|
104
|
+
|
105
|
+
[**ExerciseHashId**](ExerciseHashId.md)
|
106
|
+
|
107
|
+
### Authorization
|
108
|
+
|
109
|
+
[OAuth2](../README.md#OAuth2)
|
110
|
+
|
111
|
+
### HTTP request headers
|
112
|
+
|
113
|
+
- **Content-Type**: Not defined
|
114
|
+
- **Accept**: application/json
|
115
|
+
|
116
|
+
|
117
|
+
## list_exercises_without_transaction
|
118
|
+
|
119
|
+
> Array<ExerciseHashId> list_exercises_without_transaction
|
120
|
+
|
121
|
+
List exercises
|
122
|
+
|
123
|
+
List users exercises available in Accesslink.
|
124
|
+
|
125
|
+
### Example
|
126
|
+
|
127
|
+
```ruby
|
128
|
+
# load the gem
|
129
|
+
require 'openapi_client'
|
130
|
+
# setup authorization
|
131
|
+
OpenapiClient.configure do |config|
|
132
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
133
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
134
|
+
end
|
135
|
+
|
136
|
+
api_instance = PolarAccesslink::ExercisesApi.new
|
137
|
+
|
138
|
+
begin
|
139
|
+
#List exercises
|
140
|
+
result = api_instance.list_exercises_without_transaction
|
141
|
+
p result
|
142
|
+
rescue PolarAccesslink::ApiError => e
|
143
|
+
puts "Exception when calling ExercisesApi->list_exercises_without_transaction: #{e}"
|
144
|
+
end
|
145
|
+
```
|
146
|
+
|
147
|
+
### Parameters
|
148
|
+
|
149
|
+
This endpoint does not need any parameter.
|
150
|
+
|
151
|
+
### Return type
|
152
|
+
|
153
|
+
[**Array<ExerciseHashId>**](ExerciseHashId.md)
|
154
|
+
|
155
|
+
### Authorization
|
156
|
+
|
157
|
+
[OAuth2](../README.md#OAuth2)
|
158
|
+
|
159
|
+
### HTTP request headers
|
160
|
+
|
161
|
+
- **Content-Type**: Not defined
|
162
|
+
- **Accept**: application/json
|
163
|
+
|
data/docs/HeartRate.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# PolarAccesslink::HeartRate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**average** | **Integer** | Average heart-rate | [optional]
|
8
|
+
**maximum** | **Integer** | Maximum heart-rate | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OpenapiClient'
|
14
|
+
|
15
|
+
instance = PolarAccesslink::HeartRate.new(average: 129,
|
16
|
+
maximum: 147)
|
17
|
+
```
|
18
|
+
|
19
|
+
|