polar_accesslink 1.0.2 → 1.0.3

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