polar-accesslink-api-gem 0.1.0

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 (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,20 @@
1
+ # PolarAccesslinkApiGem::TransactionLocation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **transaction_id** | **Integer** | Id of the created transaction | [optional] |
8
+ | **resource_uri** | **String** | Absolute links to the created transaction | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::TransactionLocation.new(
16
+ transaction_id: 122,
17
+ resource_uri: https://polaraccesslink.com/v3/users/21/physical-information-transactions/32
18
+ )
19
+ ```
20
+
data/docs/User.md ADDED
@@ -0,0 +1,36 @@
1
+ # PolarAccesslinkApiGem::User
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **polar_user_id** | **Integer** | User's id in Polar database | [optional] |
8
+ | **member_id** | **String** | User's identifier in partner's database | [optional] |
9
+ | **registration_date** | **Time** | Timestamp marked when ACCEPTED | [optional] |
10
+ | **first_name** | **String** | User's first name | [optional] |
11
+ | **last_name** | **String** | User's surname | [optional] |
12
+ | **birthdate** | **String** | User's birthdate as YYYY-MM-DD | [optional] |
13
+ | **gender** | **String** | User's sex | [optional] |
14
+ | **weight** | **Float** | User's weight in kg | [optional] |
15
+ | **height** | **Float** | Users height in centimeters | [optional] |
16
+ | **field** | [**Array<UserExtraInfo>**](UserExtraInfo.md) | List containing answers given by the user to a number of partner-specific questions. Extra-info is null if there are no required fields defined by the partner. | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'polar-accesslink-api-gem'
22
+
23
+ instance = PolarAccesslinkApiGem::User.new(
24
+ polar_user_id: 2278512,
25
+ member_id: i09u9ujj,
26
+ registration_date: 2011-10-14T12:50:37Z,
27
+ first_name: Eka,
28
+ last_name: Toka,
29
+ birthdate: 1985-09-06,
30
+ gender: MALE,
31
+ weight: 66,
32
+ height: 170,
33
+ field: null
34
+ )
35
+ ```
36
+
@@ -0,0 +1,22 @@
1
+ # PolarAccesslinkApiGem::UserExtraInfo
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **String** | Value provided by the customer | [optional] |
8
+ | **index** | **Integer** | Item index | [optional] |
9
+ | **name** | **String** | Name of the extra info asked from customer | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'polar-accesslink-api-gem'
15
+
16
+ instance = PolarAccesslinkApiGem::UserExtraInfo.new(
17
+ value: 2,
18
+ index: 0,
19
+ name: number-of-children
20
+ )
21
+ ```
22
+
data/docs/UsersApi.md ADDED
@@ -0,0 +1,216 @@
1
+ # PolarAccesslinkApiGem::UsersApi
2
+
3
+ All URIs are relative to *https://www.polaraccesslink.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**delete_user**](UsersApi.md#delete_user) | **DELETE** /v3/users/{user-id} | Delete user |
8
+ | [**get_user_information**](UsersApi.md#get_user_information) | **GET** /v3/users/{user-id} | Get user information |
9
+ | [**register_user**](UsersApi.md#register_user) | **POST** /v3/users | Register user |
10
+
11
+
12
+ ## delete_user
13
+
14
+ > delete_user(user_id)
15
+
16
+ Delete user
17
+
18
+ When partner wishes no longer to receive user data, user can be de-registered.This will revoke the access token authorized by user.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'polar-accesslink-api-gem'
25
+ # setup authorization
26
+ PolarAccesslinkApiGem.configure do |config|
27
+ # Configure OAuth2 access token for authorization: OAuth2
28
+ config.access_token = 'YOUR ACCESS TOKEN'
29
+ end
30
+
31
+ api_instance = PolarAccesslinkApiGem::UsersApi.new
32
+ user_id = 789 # Integer | User identifier
33
+
34
+ begin
35
+ # Delete user
36
+ api_instance.delete_user(user_id)
37
+ rescue PolarAccesslinkApiGem::ApiError => e
38
+ puts "Error when calling UsersApi->delete_user: #{e}"
39
+ end
40
+ ```
41
+
42
+ #### Using the delete_user_with_http_info variant
43
+
44
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
45
+
46
+ > <Array(nil, Integer, Hash)> delete_user_with_http_info(user_id)
47
+
48
+ ```ruby
49
+ begin
50
+ # Delete user
51
+ data, status_code, headers = api_instance.delete_user_with_http_info(user_id)
52
+ p status_code # => 2xx
53
+ p headers # => { ... }
54
+ p data # => nil
55
+ rescue PolarAccesslinkApiGem::ApiError => e
56
+ puts "Error when calling UsersApi->delete_user_with_http_info: #{e}"
57
+ end
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ | Name | Type | Description | Notes |
63
+ | ---- | ---- | ----------- | ----- |
64
+ | **user_id** | **Integer** | User identifier | |
65
+
66
+ ### Return type
67
+
68
+ nil (empty response body)
69
+
70
+ ### Authorization
71
+
72
+ [OAuth2](../README.md#OAuth2)
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: Not defined
77
+ - **Accept**: Not defined
78
+
79
+
80
+ ## get_user_information
81
+
82
+ > <User> get_user_information(user_id)
83
+
84
+ Get user information
85
+
86
+ List user basic information. Note: Although it is possible to get users weight and height from this resource, the [get physical info](#get-physical-info) should be used instead.
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'polar-accesslink-api-gem'
93
+ # setup authorization
94
+ PolarAccesslinkApiGem.configure do |config|
95
+ # Configure OAuth2 access token for authorization: OAuth2
96
+ config.access_token = 'YOUR ACCESS TOKEN'
97
+ end
98
+
99
+ api_instance = PolarAccesslinkApiGem::UsersApi.new
100
+ user_id = 475 # Integer | User identifier
101
+
102
+ begin
103
+ # Get user information
104
+ result = api_instance.get_user_information(user_id)
105
+ p result
106
+ rescue PolarAccesslinkApiGem::ApiError => e
107
+ puts "Error when calling UsersApi->get_user_information: #{e}"
108
+ end
109
+ ```
110
+
111
+ #### Using the get_user_information_with_http_info variant
112
+
113
+ This returns an Array which contains the response data, status code and headers.
114
+
115
+ > <Array(<User>, Integer, Hash)> get_user_information_with_http_info(user_id)
116
+
117
+ ```ruby
118
+ begin
119
+ # Get user information
120
+ data, status_code, headers = api_instance.get_user_information_with_http_info(user_id)
121
+ p status_code # => 2xx
122
+ p headers # => { ... }
123
+ p data # => <User>
124
+ rescue PolarAccesslinkApiGem::ApiError => e
125
+ puts "Error when calling UsersApi->get_user_information_with_http_info: #{e}"
126
+ end
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ | Name | Type | Description | Notes |
132
+ | ---- | ---- | ----------- | ----- |
133
+ | **user_id** | **Integer** | User identifier | |
134
+
135
+ ### Return type
136
+
137
+ [**User**](User.md)
138
+
139
+ ### Authorization
140
+
141
+ [OAuth2](../README.md#OAuth2)
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: Not defined
146
+ - **Accept**: application/json, application/xml
147
+
148
+
149
+ ## register_user
150
+
151
+ > <User> register_user(register)
152
+
153
+ Register user
154
+
155
+ Once partner has been authorized by user, partner must register the user before being able to access its data. API user-id and Polar User Id (polar-user-id) are interchangeable terms.
156
+
157
+ ### Examples
158
+
159
+ ```ruby
160
+ require 'time'
161
+ require 'polar-accesslink-api-gem'
162
+ # setup authorization
163
+ PolarAccesslinkApiGem.configure do |config|
164
+ # Configure OAuth2 access token for authorization: OAuth2
165
+ config.access_token = 'YOUR ACCESS TOKEN'
166
+ end
167
+
168
+ api_instance = PolarAccesslinkApiGem::UsersApi.new
169
+ register = PolarAccesslinkApiGem::Register.new({member_id: 'User_id_999'}) # Register |
170
+
171
+ begin
172
+ # Register user
173
+ result = api_instance.register_user(register)
174
+ p result
175
+ rescue PolarAccesslinkApiGem::ApiError => e
176
+ puts "Error when calling UsersApi->register_user: #{e}"
177
+ end
178
+ ```
179
+
180
+ #### Using the register_user_with_http_info variant
181
+
182
+ This returns an Array which contains the response data, status code and headers.
183
+
184
+ > <Array(<User>, Integer, Hash)> register_user_with_http_info(register)
185
+
186
+ ```ruby
187
+ begin
188
+ # Register user
189
+ data, status_code, headers = api_instance.register_user_with_http_info(register)
190
+ p status_code # => 2xx
191
+ p headers # => { ... }
192
+ p data # => <User>
193
+ rescue PolarAccesslinkApiGem::ApiError => e
194
+ puts "Error when calling UsersApi->register_user_with_http_info: #{e}"
195
+ end
196
+ ```
197
+
198
+ ### Parameters
199
+
200
+ | Name | Type | Description | Notes |
201
+ | ---- | ---- | ----------- | ----- |
202
+ | **register** | [**Register**](Register.md) | | |
203
+
204
+ ### Return type
205
+
206
+ [**User**](User.md)
207
+
208
+ ### Authorization
209
+
210
+ [OAuth2](../README.md#OAuth2)
211
+
212
+ ### HTTP request headers
213
+
214
+ - **Content-Type**: application/xml, application/json
215
+ - **Accept**: application/json, application/xml
216
+
@@ -0,0 +1,18 @@
1
+ # PolarAccesslinkApiGem::WebhookInfo
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**WebhookInfoData**](WebhookInfoData.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'polar-accesslink-api-gem'
13
+
14
+ instance = PolarAccesslinkApiGem::WebhookInfo.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # PolarAccesslinkApiGem::WebhookInfoData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Id of the webhook. | [optional] |
8
+ | **events** | [**WebhookType**](WebhookType.md) | | [optional] |
9
+ | **url** | **String** | Url where the webhook notification is sent. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'polar-accesslink-api-gem'
15
+
16
+ instance = PolarAccesslinkApiGem::WebhookInfoData.new(
17
+ id: abdf33,
18
+ events: null,
19
+ url: https://myapp.example.com/acl_webhook
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # PolarAccesslinkApiGem::WebhookPatch
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **events** | [**Array&lt;WebhookType&gt;**](WebhookType.md) | Type of events to subscribe. | [optional] |
8
+ | **url** | **String** | Url where the webhook notification is sent. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::WebhookPatch.new(
16
+ events: [&quot;EXERCISE&quot;],
17
+ url: https://myapp.example.com/acl_webhook
18
+ )
19
+ ```
20
+
@@ -0,0 +1,26 @@
1
+ # PolarAccesslinkApiGem::WebhookPayloadExercise
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **event** | **String** | Type of available data. | [optional] |
8
+ | **user_id** | **Integer** | Id of the user who has new data. | [optional] |
9
+ | **entity_id** | **String** | Id of the available data. | [optional] |
10
+ | **timestamp** | **Time** | Time when webhook notification is sent. | [optional] |
11
+ | **url** | **String** | Url to the new available data. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'polar-accesslink-api-gem'
17
+
18
+ instance = PolarAccesslinkApiGem::WebhookPayloadExercise.new(
19
+ event: EXERCISE,
20
+ user_id: 475,
21
+ entity_id: aQlC83,
22
+ timestamp: 2018-05-15T14:22:24Z,
23
+ url: https://www.polaraccesslink.com/v3/exercises/aQlC83
24
+ )
25
+ ```
26
+
@@ -0,0 +1,26 @@
1
+ # PolarAccesslinkApiGem::WebhookPayloadSleep
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **event** | **String** | Type of available data. | [optional] |
8
+ | **user_id** | **Integer** | Id of the user who has new data. | [optional] |
9
+ | **date** | **String** | Date of the available sleep data. | [optional] |
10
+ | **timestamp** | **Time** | Time when webhook notification is sent. | [optional] |
11
+ | **url** | **String** | Url to the new available data. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'polar-accesslink-api-gem'
17
+
18
+ instance = PolarAccesslinkApiGem::WebhookPayloadSleep.new(
19
+ event: SLEEP,
20
+ user_id: 475,
21
+ date: 2019-12-31,
22
+ timestamp: 2018-05-15T14:22:24Z,
23
+ url: https://www.polaraccesslink.com/v3/users/sleep/getSleepByDate/2019-12-31
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # PolarAccesslinkApiGem::WebhookPing
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **timestamp** | **Time** | Time when webhook ping is sent. | [optional] |
8
+ | **event** | **String** | Only possible value is PING for ping message. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::WebhookPing.new(
16
+ timestamp: 2018-05-15T14:22:24Z,
17
+ event: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # PolarAccesslinkApiGem::WebhookRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **events** | [**Array&lt;WebhookType&gt;**](WebhookType.md) | Type of events to subscribe. | |
8
+ | **url** | **String** | Url where the webhook notification is sent. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'polar-accesslink-api-gem'
14
+
15
+ instance = PolarAccesslinkApiGem::WebhookRequest.new(
16
+ events: [&quot;EXERCISE&quot;],
17
+ url: https://myapp.example.com/acl_webhook
18
+ )
19
+ ```
20
+