polar-accesslink-api-gem 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +182 -0
  4. data/Rakefile +10 -0
  5. data/docs/Activity.md +34 -0
  6. data/docs/ActivityLog.md +18 -0
  7. data/docs/ActivityStepSample.md +20 -0
  8. data/docs/ActivityStepSamples.md +20 -0
  9. data/docs/ActivityZoneSample.md +20 -0
  10. data/docs/ActivityZoneSamples.md +20 -0
  11. data/docs/AvailableSleep.md +22 -0
  12. data/docs/AvailableSleeps.md +18 -0
  13. data/docs/AvailableUserData.md +22 -0
  14. data/docs/AvailableUserDatas.md +18 -0
  15. data/docs/CreatedWebhook.md +18 -0
  16. data/docs/CreatedWebhookData.md +24 -0
  17. data/docs/DailyActivityApi.md +440 -0
  18. data/docs/DurationZone.md +20 -0
  19. data/docs/Error.md +26 -0
  20. data/docs/Exercise.md +54 -0
  21. data/docs/ExerciseHashId.md +52 -0
  22. data/docs/Exercises.md +18 -0
  23. data/docs/ExercisesApi.md +214 -0
  24. data/docs/HeartRate.md +20 -0
  25. data/docs/NightlyRecharge.md +38 -0
  26. data/docs/NightlyRechargeApi.md +144 -0
  27. data/docs/Nights.md +18 -0
  28. data/docs/PhysicalInfoApi.md +294 -0
  29. data/docs/PhysicalInformation.md +40 -0
  30. data/docs/PhysicalInformations.md +18 -0
  31. data/docs/PullNotificationsApi.md +75 -0
  32. data/docs/Recharges.md +18 -0
  33. data/docs/Register.md +18 -0
  34. data/docs/Sample.md +22 -0
  35. data/docs/Samples.md +18 -0
  36. data/docs/Sleep.md +64 -0
  37. data/docs/SleepApi.md +211 -0
  38. data/docs/TrainingDataApi.md +744 -0
  39. data/docs/TransactionLocation.md +20 -0
  40. data/docs/User.md +36 -0
  41. data/docs/UserExtraInfo.md +22 -0
  42. data/docs/UsersApi.md +216 -0
  43. data/docs/WebhookInfo.md +18 -0
  44. data/docs/WebhookInfoData.md +22 -0
  45. data/docs/WebhookPatch.md +20 -0
  46. data/docs/WebhookPayloadExercise.md +26 -0
  47. data/docs/WebhookPayloadSleep.md +26 -0
  48. data/docs/WebhookPing.md +20 -0
  49. data/docs/WebhookRequest.md +20 -0
  50. data/docs/WebhookType.md +15 -0
  51. data/docs/WebhooksApi.md +289 -0
  52. data/docs/Zone.md +24 -0
  53. data/docs/Zones.md +18 -0
  54. data/git_push.sh +58 -0
  55. data/lib/polar-accesslink-api-gem/api/daily_activity_api.rb +469 -0
  56. data/lib/polar-accesslink-api-gem/api/exercises_api.rb +205 -0
  57. data/lib/polar-accesslink-api-gem/api/nightly_recharge_api.rb +142 -0
  58. data/lib/polar-accesslink-api-gem/api/physical_info_api.rb +296 -0
  59. data/lib/polar-accesslink-api-gem/api/pull_notifications_api.rb +79 -0
  60. data/lib/polar-accesslink-api-gem/api/sleep_api.rb +199 -0
  61. data/lib/polar-accesslink-api-gem/api/training_data_api.rb +785 -0
  62. data/lib/polar-accesslink-api-gem/api/users_api.rb +221 -0
  63. data/lib/polar-accesslink-api-gem/api/webhooks_api.rb +278 -0
  64. data/lib/polar-accesslink-api-gem/api_client.rb +390 -0
  65. data/lib/polar-accesslink-api-gem/api_error.rb +57 -0
  66. data/lib/polar-accesslink-api-gem/configuration.rb +284 -0
  67. data/lib/polar-accesslink-api-gem/models/activity.rb +300 -0
  68. data/lib/polar-accesslink-api-gem/models/activity_log.rb +222 -0
  69. data/lib/polar-accesslink-api-gem/models/activity_step_sample.rb +230 -0
  70. data/lib/polar-accesslink-api-gem/models/activity_step_samples.rb +232 -0
  71. data/lib/polar-accesslink-api-gem/models/activity_zone_sample.rb +232 -0
  72. data/lib/polar-accesslink-api-gem/models/activity_zone_samples.rb +232 -0
  73. data/lib/polar-accesslink-api-gem/models/available_sleep.rb +239 -0
  74. data/lib/polar-accesslink-api-gem/models/available_sleeps.rb +221 -0
  75. data/lib/polar-accesslink-api-gem/models/available_user_data.rb +274 -0
  76. data/lib/polar-accesslink-api-gem/models/available_user_datas.rb +222 -0
  77. data/lib/polar-accesslink-api-gem/models/created_webhook.rb +218 -0
  78. data/lib/polar-accesslink-api-gem/models/created_webhook_data.rb +248 -0
  79. data/lib/polar-accesslink-api-gem/models/duration_zone.rb +230 -0
  80. data/lib/polar-accesslink-api-gem/models/error.rb +260 -0
  81. data/lib/polar-accesslink-api-gem/models/exercise.rb +399 -0
  82. data/lib/polar-accesslink-api-gem/models/exercise_hash_id.rb +389 -0
  83. data/lib/polar-accesslink-api-gem/models/exercises.rb +222 -0
  84. data/lib/polar-accesslink-api-gem/models/heart_rate.rb +230 -0
  85. data/lib/polar-accesslink-api-gem/models/nightly_recharge.rb +319 -0
  86. data/lib/polar-accesslink-api-gem/models/nights.rb +222 -0
  87. data/lib/polar-accesslink-api-gem/models/physical_information.rb +364 -0
  88. data/lib/polar-accesslink-api-gem/models/physical_informations.rb +222 -0
  89. data/lib/polar-accesslink-api-gem/models/recharges.rb +222 -0
  90. data/lib/polar-accesslink-api-gem/models/register.rb +225 -0
  91. data/lib/polar-accesslink-api-gem/models/sample.rb +240 -0
  92. data/lib/polar-accesslink-api-gem/models/samples.rb +222 -0
  93. data/lib/polar-accesslink-api-gem/models/sleep.rb +449 -0
  94. data/lib/polar-accesslink-api-gem/models/transaction_location.rb +230 -0
  95. data/lib/polar-accesslink-api-gem/models/user.rb +346 -0
  96. data/lib/polar-accesslink-api-gem/models/user_extra_info.rb +240 -0
  97. data/lib/polar-accesslink-api-gem/models/webhook_info.rb +218 -0
  98. data/lib/polar-accesslink-api-gem/models/webhook_info_data.rb +238 -0
  99. data/lib/polar-accesslink-api-gem/models/webhook_patch.rb +231 -0
  100. data/lib/polar-accesslink-api-gem/models/webhook_payload_exercise.rb +260 -0
  101. data/lib/polar-accesslink-api-gem/models/webhook_payload_sleep.rb +260 -0
  102. data/lib/polar-accesslink-api-gem/models/webhook_ping.rb +264 -0
  103. data/lib/polar-accesslink-api-gem/models/webhook_request.rb +241 -0
  104. data/lib/polar-accesslink-api-gem/models/webhook_type.rb +36 -0
  105. data/lib/polar-accesslink-api-gem/models/zone.rb +250 -0
  106. data/lib/polar-accesslink-api-gem/models/zones.rb +222 -0
  107. data/lib/polar-accesslink-api-gem/version.rb +15 -0
  108. data/lib/polar-accesslink-api-gem.rb +88 -0
  109. data/polar-accesslink-api-gem.gemspec +38 -0
  110. data/spec/api/daily_activity_api_spec.rb +114 -0
  111. data/spec/api/exercises_api_spec.rb +70 -0
  112. data/spec/api/nightly_recharge_api_spec.rb +58 -0
  113. data/spec/api/physical_info_api_spec.rb +87 -0
  114. data/spec/api/pull_notifications_api_spec.rb +46 -0
  115. data/spec/api/sleep_api_spec.rb +69 -0
  116. data/spec/api/training_data_api_spec.rb +173 -0
  117. data/spec/api/users_api_spec.rb +71 -0
  118. data/spec/api/webhooks_api_spec.rb +83 -0
  119. data/spec/api_client_spec.rb +226 -0
  120. data/spec/configuration_spec.rb +42 -0
  121. data/spec/models/activity_log_spec.rb +34 -0
  122. data/spec/models/activity_spec.rb +82 -0
  123. data/spec/models/activity_step_sample_spec.rb +40 -0
  124. data/spec/models/activity_step_samples_spec.rb +40 -0
  125. data/spec/models/activity_zone_sample_spec.rb +40 -0
  126. data/spec/models/activity_zone_samples_spec.rb +40 -0
  127. data/spec/models/available_sleep_spec.rb +46 -0
  128. data/spec/models/available_sleeps_spec.rb +34 -0
  129. data/spec/models/available_user_data_spec.rb +50 -0
  130. data/spec/models/available_user_datas_spec.rb +34 -0
  131. data/spec/models/created_webhook_data_spec.rb +52 -0
  132. data/spec/models/created_webhook_spec.rb +34 -0
  133. data/spec/models/duration_zone_spec.rb +40 -0
  134. data/spec/models/error_spec.rb +58 -0
  135. data/spec/models/exercise_hash_id_spec.rb +136 -0
  136. data/spec/models/exercise_spec.rb +142 -0
  137. data/spec/models/exercises_spec.rb +34 -0
  138. data/spec/models/heart_rate_spec.rb +40 -0
  139. data/spec/models/nightly_recharge_spec.rb +94 -0
  140. data/spec/models/nights_spec.rb +34 -0
  141. data/spec/models/physical_information_spec.rb +104 -0
  142. data/spec/models/physical_informations_spec.rb +34 -0
  143. data/spec/models/recharges_spec.rb +34 -0
  144. data/spec/models/register_spec.rb +34 -0
  145. data/spec/models/sample_spec.rb +46 -0
  146. data/spec/models/samples_spec.rb +34 -0
  147. data/spec/models/sleep_spec.rb +172 -0
  148. data/spec/models/transaction_location_spec.rb +40 -0
  149. data/spec/models/user_extra_info_spec.rb +46 -0
  150. data/spec/models/user_spec.rb +92 -0
  151. data/spec/models/webhook_info_data_spec.rb +46 -0
  152. data/spec/models/webhook_info_spec.rb +34 -0
  153. data/spec/models/webhook_patch_spec.rb +40 -0
  154. data/spec/models/webhook_payload_exercise_spec.rb +58 -0
  155. data/spec/models/webhook_payload_sleep_spec.rb +58 -0
  156. data/spec/models/webhook_ping_spec.rb +44 -0
  157. data/spec/models/webhook_request_spec.rb +40 -0
  158. data/spec/models/webhook_type_spec.rb +28 -0
  159. data/spec/models/zone_spec.rb +52 -0
  160. data/spec/models/zones_spec.rb +34 -0
  161. data/spec/spec_helper.rb +111 -0
  162. metadata +295 -0
@@ -0,0 +1,24 @@
1
+ # PolarAccesslinkApiGem::CreatedWebhookData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Id of the new webhook. | [optional] |
8
+ | **events** | [**WebhookType**](WebhookType.md) | | [optional] |
9
+ | **url** | **String** | Url where the webhook notification is sent. | [optional] |
10
+ | **signature_secret_key** | **String** | Security key for verifying that sender is actually Polar. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'polar-accesslink-api-gem'
16
+
17
+ instance = PolarAccesslinkApiGem::CreatedWebhookData.new(
18
+ id: abdf33,
19
+ events: null,
20
+ url: https://myapp.example.com/acl_webhook,
21
+ signature_secret_key: abe1f3ae-fd33-11e8-8eb2-f2801f1b9fd1
22
+ )
23
+ ```
24
+
@@ -0,0 +1,440 @@
1
+ # PolarAccesslinkApiGem::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
+ ## commit_activity_transaction
16
+
17
+ > commit_activity_transaction(transaction_id, user_id)
18
+
19
+ Commit transaction
20
+
21
+ After successfully retrieving activity summary data within a transaction, partners are expected to commit the transaction.
22
+
23
+ ### Examples
24
+
25
+ ```ruby
26
+ require 'time'
27
+ require 'polar-accesslink-api-gem'
28
+ # setup authorization
29
+ PolarAccesslinkApiGem.configure do |config|
30
+ # Configure OAuth2 access token for authorization: OAuth2
31
+ config.access_token = 'YOUR ACCESS TOKEN'
32
+ end
33
+
34
+ api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
35
+ transaction_id = 789 # Integer | Transaction identifier
36
+ user_id = 56 # Integer | User identifier
37
+
38
+ begin
39
+ # Commit transaction
40
+ api_instance.commit_activity_transaction(transaction_id, user_id)
41
+ rescue PolarAccesslinkApiGem::ApiError => e
42
+ puts "Error when calling DailyActivityApi->commit_activity_transaction: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the commit_activity_transaction_with_http_info variant
47
+
48
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
49
+
50
+ > <Array(nil, Integer, Hash)> commit_activity_transaction_with_http_info(transaction_id, user_id)
51
+
52
+ ```ruby
53
+ begin
54
+ # Commit transaction
55
+ data, status_code, headers = api_instance.commit_activity_transaction_with_http_info(transaction_id, user_id)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => nil
59
+ rescue PolarAccesslinkApiGem::ApiError => e
60
+ puts "Error when calling DailyActivityApi->commit_activity_transaction_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **transaction_id** | **Integer** | Transaction identifier | |
69
+ | **user_id** | **Integer** | User identifier | |
70
+
71
+ ### Return type
72
+
73
+ nil (empty response body)
74
+
75
+ ### Authorization
76
+
77
+ [OAuth2](../README.md#OAuth2)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: Not defined
82
+ - **Accept**: Not defined
83
+
84
+
85
+ ## create_activity_transaction
86
+
87
+ > <TransactionLocation> create_activity_transaction(user_id)
88
+
89
+ Create transaction
90
+
91
+ Initiate activity transaction. Check for new activity summaries and create a new transaction if found.
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'polar-accesslink-api-gem'
98
+ # setup authorization
99
+ PolarAccesslinkApiGem.configure do |config|
100
+ # Configure OAuth2 access token for authorization: OAuth2
101
+ config.access_token = 'YOUR ACCESS TOKEN'
102
+ end
103
+
104
+ api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
105
+ user_id = 56 # Integer | User identifier
106
+
107
+ begin
108
+ # Create transaction
109
+ result = api_instance.create_activity_transaction(user_id)
110
+ p result
111
+ rescue PolarAccesslinkApiGem::ApiError => e
112
+ puts "Error when calling DailyActivityApi->create_activity_transaction: #{e}"
113
+ end
114
+ ```
115
+
116
+ #### Using the create_activity_transaction_with_http_info variant
117
+
118
+ This returns an Array which contains the response data, status code and headers.
119
+
120
+ > <Array(<TransactionLocation>, Integer, Hash)> create_activity_transaction_with_http_info(user_id)
121
+
122
+ ```ruby
123
+ begin
124
+ # Create transaction
125
+ data, status_code, headers = api_instance.create_activity_transaction_with_http_info(user_id)
126
+ p status_code # => 2xx
127
+ p headers # => { ... }
128
+ p data # => <TransactionLocation>
129
+ rescue PolarAccesslinkApiGem::ApiError => e
130
+ puts "Error when calling DailyActivityApi->create_activity_transaction_with_http_info: #{e}"
131
+ end
132
+ ```
133
+
134
+ ### Parameters
135
+
136
+ | Name | Type | Description | Notes |
137
+ | ---- | ---- | ----------- | ----- |
138
+ | **user_id** | **Integer** | User identifier | |
139
+
140
+ ### Return type
141
+
142
+ [**TransactionLocation**](TransactionLocation.md)
143
+
144
+ ### Authorization
145
+
146
+ [OAuth2](../README.md#OAuth2)
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: Not defined
151
+ - **Accept**: application/json, application/xml
152
+
153
+
154
+ ## get_activity_summary
155
+
156
+ > <Activity> get_activity_summary(user_id, transaction_id, activity_id)
157
+
158
+ Get activity summary
159
+
160
+ ### Examples
161
+
162
+ ```ruby
163
+ require 'time'
164
+ require 'polar-accesslink-api-gem'
165
+ # setup authorization
166
+ PolarAccesslinkApiGem.configure do |config|
167
+ # Configure OAuth2 access token for authorization: OAuth2
168
+ config.access_token = 'YOUR ACCESS TOKEN'
169
+ end
170
+
171
+ api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
172
+ user_id = 56 # Integer | User identifier
173
+ transaction_id = 56 # Integer | Transaction identifier
174
+ activity_id = 56 # Integer | Activity summary identifier
175
+
176
+ begin
177
+ # Get activity summary
178
+ result = api_instance.get_activity_summary(user_id, transaction_id, activity_id)
179
+ p result
180
+ rescue PolarAccesslinkApiGem::ApiError => e
181
+ puts "Error when calling DailyActivityApi->get_activity_summary: #{e}"
182
+ end
183
+ ```
184
+
185
+ #### Using the get_activity_summary_with_http_info variant
186
+
187
+ This returns an Array which contains the response data, status code and headers.
188
+
189
+ > <Array(<Activity>, Integer, Hash)> get_activity_summary_with_http_info(user_id, transaction_id, activity_id)
190
+
191
+ ```ruby
192
+ begin
193
+ # Get activity summary
194
+ data, status_code, headers = api_instance.get_activity_summary_with_http_info(user_id, transaction_id, activity_id)
195
+ p status_code # => 2xx
196
+ p headers # => { ... }
197
+ p data # => <Activity>
198
+ rescue PolarAccesslinkApiGem::ApiError => e
199
+ puts "Error when calling DailyActivityApi->get_activity_summary_with_http_info: #{e}"
200
+ end
201
+ ```
202
+
203
+ ### Parameters
204
+
205
+ | Name | Type | Description | Notes |
206
+ | ---- | ---- | ----------- | ----- |
207
+ | **user_id** | **Integer** | User identifier | |
208
+ | **transaction_id** | **Integer** | Transaction identifier | |
209
+ | **activity_id** | **Integer** | Activity summary identifier | |
210
+
211
+ ### Return type
212
+
213
+ [**Activity**](Activity.md)
214
+
215
+ ### Authorization
216
+
217
+ [OAuth2](../README.md#OAuth2)
218
+
219
+ ### HTTP request headers
220
+
221
+ - **Content-Type**: Not defined
222
+ - **Accept**: application/json, application/xml
223
+
224
+
225
+ ## get_step_samples
226
+
227
+ > <ActivityStepSamples> get_step_samples(user_id, transaction_id, activity_id)
228
+
229
+ Get step samples
230
+
231
+ Get activity step samples. Example data can be seen from [appendix](#activity-step-time-series).
232
+
233
+ ### Examples
234
+
235
+ ```ruby
236
+ require 'time'
237
+ require 'polar-accesslink-api-gem'
238
+ # setup authorization
239
+ PolarAccesslinkApiGem.configure do |config|
240
+ # Configure OAuth2 access token for authorization: OAuth2
241
+ config.access_token = 'YOUR ACCESS TOKEN'
242
+ end
243
+
244
+ api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
245
+ user_id = 56 # Integer | User identifier
246
+ transaction_id = 56 # Integer | Transaction identifier
247
+ activity_id = 56 # Integer | Activity summary identifier
248
+
249
+ begin
250
+ # Get step samples
251
+ result = api_instance.get_step_samples(user_id, transaction_id, activity_id)
252
+ p result
253
+ rescue PolarAccesslinkApiGem::ApiError => e
254
+ puts "Error when calling DailyActivityApi->get_step_samples: #{e}"
255
+ end
256
+ ```
257
+
258
+ #### Using the get_step_samples_with_http_info variant
259
+
260
+ This returns an Array which contains the response data, status code and headers.
261
+
262
+ > <Array(<ActivityStepSamples>, Integer, Hash)> get_step_samples_with_http_info(user_id, transaction_id, activity_id)
263
+
264
+ ```ruby
265
+ begin
266
+ # Get step samples
267
+ data, status_code, headers = api_instance.get_step_samples_with_http_info(user_id, transaction_id, activity_id)
268
+ p status_code # => 2xx
269
+ p headers # => { ... }
270
+ p data # => <ActivityStepSamples>
271
+ rescue PolarAccesslinkApiGem::ApiError => e
272
+ puts "Error when calling DailyActivityApi->get_step_samples_with_http_info: #{e}"
273
+ end
274
+ ```
275
+
276
+ ### Parameters
277
+
278
+ | Name | Type | Description | Notes |
279
+ | ---- | ---- | ----------- | ----- |
280
+ | **user_id** | **Integer** | User identifier | |
281
+ | **transaction_id** | **Integer** | Transaction identifier | |
282
+ | **activity_id** | **Integer** | Activity summary identifier | |
283
+
284
+ ### Return type
285
+
286
+ [**ActivityStepSamples**](ActivityStepSamples.md)
287
+
288
+ ### Authorization
289
+
290
+ [OAuth2](../README.md#OAuth2)
291
+
292
+ ### HTTP request headers
293
+
294
+ - **Content-Type**: Not defined
295
+ - **Accept**: application/json, application/xml
296
+
297
+
298
+ ## get_zone_samples
299
+
300
+ > <ActivityZoneSamples> get_zone_samples(user_id, transaction_id, activity_id)
301
+
302
+ Get zone samples
303
+
304
+ Get activity zone samples. Example data can be seen from [appendix](#activity-zone-time-series).
305
+
306
+ ### Examples
307
+
308
+ ```ruby
309
+ require 'time'
310
+ require 'polar-accesslink-api-gem'
311
+ # setup authorization
312
+ PolarAccesslinkApiGem.configure do |config|
313
+ # Configure OAuth2 access token for authorization: OAuth2
314
+ config.access_token = 'YOUR ACCESS TOKEN'
315
+ end
316
+
317
+ api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
318
+ user_id = 56 # Integer | User identifier
319
+ transaction_id = 56 # Integer | Transaction identifier
320
+ activity_id = 56 # Integer | Activity summary identifier
321
+
322
+ begin
323
+ # Get zone samples
324
+ result = api_instance.get_zone_samples(user_id, transaction_id, activity_id)
325
+ p result
326
+ rescue PolarAccesslinkApiGem::ApiError => e
327
+ puts "Error when calling DailyActivityApi->get_zone_samples: #{e}"
328
+ end
329
+ ```
330
+
331
+ #### Using the get_zone_samples_with_http_info variant
332
+
333
+ This returns an Array which contains the response data, status code and headers.
334
+
335
+ > <Array(<ActivityZoneSamples>, Integer, Hash)> get_zone_samples_with_http_info(user_id, transaction_id, activity_id)
336
+
337
+ ```ruby
338
+ begin
339
+ # Get zone samples
340
+ data, status_code, headers = api_instance.get_zone_samples_with_http_info(user_id, transaction_id, activity_id)
341
+ p status_code # => 2xx
342
+ p headers # => { ... }
343
+ p data # => <ActivityZoneSamples>
344
+ rescue PolarAccesslinkApiGem::ApiError => e
345
+ puts "Error when calling DailyActivityApi->get_zone_samples_with_http_info: #{e}"
346
+ end
347
+ ```
348
+
349
+ ### Parameters
350
+
351
+ | Name | Type | Description | Notes |
352
+ | ---- | ---- | ----------- | ----- |
353
+ | **user_id** | **Integer** | User identifier | |
354
+ | **transaction_id** | **Integer** | Transaction identifier | |
355
+ | **activity_id** | **Integer** | Activity summary identifier | |
356
+
357
+ ### Return type
358
+
359
+ [**ActivityZoneSamples**](ActivityZoneSamples.md)
360
+
361
+ ### Authorization
362
+
363
+ [OAuth2](../README.md#OAuth2)
364
+
365
+ ### HTTP request headers
366
+
367
+ - **Content-Type**: Not defined
368
+ - **Accept**: application/json, application/xml
369
+
370
+
371
+ ## list_activities
372
+
373
+ > <ActivityLog> list_activities(transaction_id, user_id)
374
+
375
+ List activities
376
+
377
+ List new activity data. After successfully initiating a transaction, activity summaries included within it can be retrieved with the provided transactionId.
378
+
379
+ ### Examples
380
+
381
+ ```ruby
382
+ require 'time'
383
+ require 'polar-accesslink-api-gem'
384
+ # setup authorization
385
+ PolarAccesslinkApiGem.configure do |config|
386
+ # Configure OAuth2 access token for authorization: OAuth2
387
+ config.access_token = 'YOUR ACCESS TOKEN'
388
+ end
389
+
390
+ api_instance = PolarAccesslinkApiGem::DailyActivityApi.new
391
+ transaction_id = 789 # Integer | Transaction identifier
392
+ user_id = 56 # Integer | User identifier
393
+
394
+ begin
395
+ # List activities
396
+ result = api_instance.list_activities(transaction_id, user_id)
397
+ p result
398
+ rescue PolarAccesslinkApiGem::ApiError => e
399
+ puts "Error when calling DailyActivityApi->list_activities: #{e}"
400
+ end
401
+ ```
402
+
403
+ #### Using the list_activities_with_http_info variant
404
+
405
+ This returns an Array which contains the response data, status code and headers.
406
+
407
+ > <Array(<ActivityLog>, Integer, Hash)> list_activities_with_http_info(transaction_id, user_id)
408
+
409
+ ```ruby
410
+ begin
411
+ # List activities
412
+ data, status_code, headers = api_instance.list_activities_with_http_info(transaction_id, user_id)
413
+ p status_code # => 2xx
414
+ p headers # => { ... }
415
+ p data # => <ActivityLog>
416
+ rescue PolarAccesslinkApiGem::ApiError => e
417
+ puts "Error when calling DailyActivityApi->list_activities_with_http_info: #{e}"
418
+ end
419
+ ```
420
+
421
+ ### Parameters
422
+
423
+ | Name | Type | Description | Notes |
424
+ | ---- | ---- | ----------- | ----- |
425
+ | **transaction_id** | **Integer** | Transaction identifier | |
426
+ | **user_id** | **Integer** | User identifier | |
427
+
428
+ ### Return type
429
+
430
+ [**ActivityLog**](ActivityLog.md)
431
+
432
+ ### Authorization
433
+
434
+ [OAuth2](../README.md#OAuth2)
435
+
436
+ ### HTTP request headers
437
+
438
+ - **Content-Type**: Not defined
439
+ - **Accept**: application/json, application/xml
440
+