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
data/docs/UsersApi.md
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
# PolarAccesslink::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
|
+
|
13
|
+
## delete_user
|
14
|
+
|
15
|
+
> delete_user(user_id)
|
16
|
+
|
17
|
+
Delete user
|
18
|
+
|
19
|
+
When partner wishes no longer to receive user data, user can be de-registered.This will revoke the access token authorized by user.
|
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::UsersApi.new
|
33
|
+
user_id = 56 # Integer | User identifier
|
34
|
+
|
35
|
+
begin
|
36
|
+
#Delete user
|
37
|
+
api_instance.delete_user(user_id)
|
38
|
+
rescue PolarAccesslink::ApiError => e
|
39
|
+
puts "Exception when calling UsersApi->delete_user: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
|
46
|
+
Name | Type | Description | Notes
|
47
|
+
------------- | ------------- | ------------- | -------------
|
48
|
+
**user_id** | **Integer**| User identifier |
|
49
|
+
|
50
|
+
### Return type
|
51
|
+
|
52
|
+
nil (empty response body)
|
53
|
+
|
54
|
+
### Authorization
|
55
|
+
|
56
|
+
[OAuth2](../README.md#OAuth2)
|
57
|
+
|
58
|
+
### HTTP request headers
|
59
|
+
|
60
|
+
- **Content-Type**: Not defined
|
61
|
+
- **Accept**: Not defined
|
62
|
+
|
63
|
+
|
64
|
+
## get_user_information
|
65
|
+
|
66
|
+
> User get_user_information(user_id)
|
67
|
+
|
68
|
+
Get user information
|
69
|
+
|
70
|
+
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.
|
71
|
+
|
72
|
+
### Example
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
# load the gem
|
76
|
+
require 'openapi_client'
|
77
|
+
# setup authorization
|
78
|
+
OpenapiClient.configure do |config|
|
79
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
80
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
81
|
+
end
|
82
|
+
|
83
|
+
api_instance = PolarAccesslink::UsersApi.new
|
84
|
+
user_id = 475 # Integer | User identifier
|
85
|
+
|
86
|
+
begin
|
87
|
+
#Get user information
|
88
|
+
result = api_instance.get_user_information(user_id)
|
89
|
+
p result
|
90
|
+
rescue PolarAccesslink::ApiError => e
|
91
|
+
puts "Exception when calling UsersApi->get_user_information: #{e}"
|
92
|
+
end
|
93
|
+
```
|
94
|
+
|
95
|
+
### Parameters
|
96
|
+
|
97
|
+
|
98
|
+
Name | Type | Description | Notes
|
99
|
+
------------- | ------------- | ------------- | -------------
|
100
|
+
**user_id** | **Integer**| User identifier |
|
101
|
+
|
102
|
+
### Return type
|
103
|
+
|
104
|
+
[**User**](User.md)
|
105
|
+
|
106
|
+
### Authorization
|
107
|
+
|
108
|
+
[OAuth2](../README.md#OAuth2)
|
109
|
+
|
110
|
+
### HTTP request headers
|
111
|
+
|
112
|
+
- **Content-Type**: Not defined
|
113
|
+
- **Accept**: application/json, application/xml
|
114
|
+
|
115
|
+
|
116
|
+
## register_user
|
117
|
+
|
118
|
+
> User register_user(register)
|
119
|
+
|
120
|
+
Register user
|
121
|
+
|
122
|
+
Once partner has been authorized by user, partner must register user before being able to access her data.
|
123
|
+
|
124
|
+
### Example
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
# load the gem
|
128
|
+
require 'openapi_client'
|
129
|
+
# setup authorization
|
130
|
+
OpenapiClient.configure do |config|
|
131
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
132
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
133
|
+
end
|
134
|
+
|
135
|
+
api_instance = PolarAccesslink::UsersApi.new
|
136
|
+
register = PolarAccesslink::Register.new # Register |
|
137
|
+
|
138
|
+
begin
|
139
|
+
#Register user
|
140
|
+
result = api_instance.register_user(register)
|
141
|
+
p result
|
142
|
+
rescue PolarAccesslink::ApiError => e
|
143
|
+
puts "Exception when calling UsersApi->register_user: #{e}"
|
144
|
+
end
|
145
|
+
```
|
146
|
+
|
147
|
+
### Parameters
|
148
|
+
|
149
|
+
|
150
|
+
Name | Type | Description | Notes
|
151
|
+
------------- | ------------- | ------------- | -------------
|
152
|
+
**register** | [**Register**](Register.md)| |
|
153
|
+
|
154
|
+
### Return type
|
155
|
+
|
156
|
+
[**User**](User.md)
|
157
|
+
|
158
|
+
### Authorization
|
159
|
+
|
160
|
+
[OAuth2](../README.md#OAuth2)
|
161
|
+
|
162
|
+
### HTTP request headers
|
163
|
+
|
164
|
+
- **Content-Type**: application/xml, application/json
|
165
|
+
- **Accept**: application/json, application/xml
|
166
|
+
|
data/docs/WebhookInfo.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# PolarAccesslink::WebhookInfo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**data** | [**WebhookInfoData**](WebhookInfoData.md) | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'OpenapiClient'
|
13
|
+
|
14
|
+
instance = PolarAccesslink::WebhookInfo.new(data: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# PolarAccesslink::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
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'OpenapiClient'
|
15
|
+
|
16
|
+
instance = PolarAccesslink::WebhookInfoData.new(id: abdf33,
|
17
|
+
events: null,
|
18
|
+
url: https://myapp.example.com/acl_webhook)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# PolarAccesslink::WebhookPatch
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**events** | [**Array<WebhookType>**](WebhookType.md) | Type of events to subscribe. | [optional]
|
8
|
+
**url** | **String** | Url where the webhook notification is sent. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OpenapiClient'
|
14
|
+
|
15
|
+
instance = PolarAccesslink::WebhookPatch.new(events: ["EXERCISE","ACTIVITY_SUMMARY"],
|
16
|
+
url: https://myapp.example.com/acl_webhook)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# PolarAccesslink::WebhookPayload
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**event** | [**WebhookType**](WebhookType.md) | | [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** | **DateTime** | Time when webhook notification is sent. | [optional]
|
11
|
+
**url** | **String** | Url to the new available data. | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'OpenapiClient'
|
17
|
+
|
18
|
+
instance = PolarAccesslink::WebhookPayload.new(event: null,
|
19
|
+
user_id: 475,
|
20
|
+
entity_id: aQlC83,
|
21
|
+
timestamp: 2018-05-15T14:22:24Z,
|
22
|
+
url: https://www.polaraccesslink.com/v3/exercises/aQlC83)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/docs/WebhookPing.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# PolarAccesslink::WebhookPing
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**timestamp** | **DateTime** | Time when webhook ping is sent. | [optional]
|
8
|
+
**event** | **String** | Only possible value is PING for ping message. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OpenapiClient'
|
14
|
+
|
15
|
+
instance = PolarAccesslink::WebhookPing.new(timestamp: 2018-05-15T14:22:24Z,
|
16
|
+
event: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# PolarAccesslink::WebhookRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**events** | [**Array<WebhookType>**](WebhookType.md) | Type of events to subscribe. |
|
8
|
+
**url** | **String** | Url where the webhook notification is sent. |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OpenapiClient'
|
14
|
+
|
15
|
+
instance = PolarAccesslink::WebhookRequest.new(events: ["EXERCISE","ACTIVITY_SUMMARY"],
|
16
|
+
url: https://myapp.example.com/acl_webhook)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/WebhookType.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# PolarAccesslink::WebhookType
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'OpenapiClient'
|
12
|
+
|
13
|
+
instance = PolarAccesslink::WebhookType.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/docs/WebhooksApi.md
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
# PolarAccesslink::WebhooksApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://www.polaraccesslink.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_webhook**](WebhooksApi.md#create_webhook) | **POST** /v3/webhooks | Create webhook
|
8
|
+
[**delete_webhook**](WebhooksApi.md#delete_webhook) | **DELETE** /v3/webhooks/{webhook-id} | Delete webhook
|
9
|
+
[**get_webhook**](WebhooksApi.md#get_webhook) | **GET** /v3/webhooks | Get webhook
|
10
|
+
[**update_webhook**](WebhooksApi.md#update_webhook) | **PATCH** /v3/webhooks/{webhook-id} | Update webhook
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## create_webhook
|
15
|
+
|
16
|
+
> CreatedWebhook create_webhook(webhook_request)
|
17
|
+
|
18
|
+
Create webhook
|
19
|
+
|
20
|
+
Create new webhook. When creating webhook the Accesslink sends a ping message to the url in request body. The ping message must be answered with 200 OK or otherwise the webhook is not created. **Note!** Save the *signature_secret_key* from response since this is the only chance to get it.
|
21
|
+
|
22
|
+
### Example
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
# load the gem
|
26
|
+
require 'openapi_client'
|
27
|
+
# setup authorization
|
28
|
+
OpenapiClient.configure do |config|
|
29
|
+
# Configure HTTP basic authorization: Basic
|
30
|
+
config.username = 'YOUR USERNAME'
|
31
|
+
config.password = 'YOUR PASSWORD'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = PolarAccesslink::WebhooksApi.new
|
35
|
+
webhook_request = PolarAccesslink::WebhookRequest.new # WebhookRequest | Webhook to create.
|
36
|
+
|
37
|
+
begin
|
38
|
+
#Create webhook
|
39
|
+
result = api_instance.create_webhook(webhook_request)
|
40
|
+
p result
|
41
|
+
rescue PolarAccesslink::ApiError => e
|
42
|
+
puts "Exception when calling WebhooksApi->create_webhook: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
### Parameters
|
47
|
+
|
48
|
+
|
49
|
+
Name | Type | Description | Notes
|
50
|
+
------------- | ------------- | ------------- | -------------
|
51
|
+
**webhook_request** | [**WebhookRequest**](WebhookRequest.md)| Webhook to create. |
|
52
|
+
|
53
|
+
### Return type
|
54
|
+
|
55
|
+
[**CreatedWebhook**](CreatedWebhook.md)
|
56
|
+
|
57
|
+
### Authorization
|
58
|
+
|
59
|
+
[Basic](../README.md#Basic)
|
60
|
+
|
61
|
+
### HTTP request headers
|
62
|
+
|
63
|
+
- **Content-Type**: application/json
|
64
|
+
- **Accept**: application/json
|
65
|
+
|
66
|
+
|
67
|
+
## delete_webhook
|
68
|
+
|
69
|
+
> delete_webhook(webhook_id)
|
70
|
+
|
71
|
+
Delete webhook
|
72
|
+
|
73
|
+
Delete webhook by id.
|
74
|
+
|
75
|
+
### Example
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
# load the gem
|
79
|
+
require 'openapi_client'
|
80
|
+
# setup authorization
|
81
|
+
OpenapiClient.configure do |config|
|
82
|
+
# Configure HTTP basic authorization: Basic
|
83
|
+
config.username = 'YOUR USERNAME'
|
84
|
+
config.password = 'YOUR PASSWORD'
|
85
|
+
end
|
86
|
+
|
87
|
+
api_instance = PolarAccesslink::WebhooksApi.new
|
88
|
+
webhook_id = 56 # Integer | Webhook id to delete
|
89
|
+
|
90
|
+
begin
|
91
|
+
#Delete webhook
|
92
|
+
api_instance.delete_webhook(webhook_id)
|
93
|
+
rescue PolarAccesslink::ApiError => e
|
94
|
+
puts "Exception when calling WebhooksApi->delete_webhook: #{e}"
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
### Parameters
|
99
|
+
|
100
|
+
|
101
|
+
Name | Type | Description | Notes
|
102
|
+
------------- | ------------- | ------------- | -------------
|
103
|
+
**webhook_id** | **Integer**| Webhook id to delete |
|
104
|
+
|
105
|
+
### Return type
|
106
|
+
|
107
|
+
nil (empty response body)
|
108
|
+
|
109
|
+
### Authorization
|
110
|
+
|
111
|
+
[Basic](../README.md#Basic)
|
112
|
+
|
113
|
+
### HTTP request headers
|
114
|
+
|
115
|
+
- **Content-Type**: Not defined
|
116
|
+
- **Accept**: application/json
|
117
|
+
|
118
|
+
|
119
|
+
## get_webhook
|
120
|
+
|
121
|
+
> WebhookInfo get_webhook
|
122
|
+
|
123
|
+
Get webhook
|
124
|
+
|
125
|
+
Returns created webhook if exists.
|
126
|
+
|
127
|
+
### Example
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
# load the gem
|
131
|
+
require 'openapi_client'
|
132
|
+
# setup authorization
|
133
|
+
OpenapiClient.configure do |config|
|
134
|
+
# Configure HTTP basic authorization: Basic
|
135
|
+
config.username = 'YOUR USERNAME'
|
136
|
+
config.password = 'YOUR PASSWORD'
|
137
|
+
end
|
138
|
+
|
139
|
+
api_instance = PolarAccesslink::WebhooksApi.new
|
140
|
+
|
141
|
+
begin
|
142
|
+
#Get webhook
|
143
|
+
result = api_instance.get_webhook
|
144
|
+
p result
|
145
|
+
rescue PolarAccesslink::ApiError => e
|
146
|
+
puts "Exception when calling WebhooksApi->get_webhook: #{e}"
|
147
|
+
end
|
148
|
+
```
|
149
|
+
|
150
|
+
### Parameters
|
151
|
+
|
152
|
+
This endpoint does not need any parameter.
|
153
|
+
|
154
|
+
### Return type
|
155
|
+
|
156
|
+
[**WebhookInfo**](WebhookInfo.md)
|
157
|
+
|
158
|
+
### Authorization
|
159
|
+
|
160
|
+
[Basic](../README.md#Basic)
|
161
|
+
|
162
|
+
### HTTP request headers
|
163
|
+
|
164
|
+
- **Content-Type**: Not defined
|
165
|
+
- **Accept**: application/json
|
166
|
+
|
167
|
+
|
168
|
+
## update_webhook
|
169
|
+
|
170
|
+
> WebhookInfo update_webhook(webhook_id, webhook_patch)
|
171
|
+
|
172
|
+
Update webhook
|
173
|
+
|
174
|
+
Edit webhook event types and/or url. When updating webhook url the Accesslink sends a ping message to the new address. The ping message must be answered with 200 OK or otherwise the webhook is not updated.
|
175
|
+
|
176
|
+
### Example
|
177
|
+
|
178
|
+
```ruby
|
179
|
+
# load the gem
|
180
|
+
require 'openapi_client'
|
181
|
+
# setup authorization
|
182
|
+
OpenapiClient.configure do |config|
|
183
|
+
# Configure HTTP basic authorization: Basic
|
184
|
+
config.username = 'YOUR USERNAME'
|
185
|
+
config.password = 'YOUR PASSWORD'
|
186
|
+
end
|
187
|
+
|
188
|
+
api_instance = PolarAccesslink::WebhooksApi.new
|
189
|
+
webhook_id = 56 # Integer | Webhook id to update
|
190
|
+
webhook_patch = PolarAccesslink::WebhookPatch.new # WebhookPatch | New value(s) for events and/or url.
|
191
|
+
|
192
|
+
begin
|
193
|
+
#Update webhook
|
194
|
+
result = api_instance.update_webhook(webhook_id, webhook_patch)
|
195
|
+
p result
|
196
|
+
rescue PolarAccesslink::ApiError => e
|
197
|
+
puts "Exception when calling WebhooksApi->update_webhook: #{e}"
|
198
|
+
end
|
199
|
+
```
|
200
|
+
|
201
|
+
### Parameters
|
202
|
+
|
203
|
+
|
204
|
+
Name | Type | Description | Notes
|
205
|
+
------------- | ------------- | ------------- | -------------
|
206
|
+
**webhook_id** | **Integer**| Webhook id to update |
|
207
|
+
**webhook_patch** | [**WebhookPatch**](WebhookPatch.md)| New value(s) for events and/or url. |
|
208
|
+
|
209
|
+
### Return type
|
210
|
+
|
211
|
+
[**WebhookInfo**](WebhookInfo.md)
|
212
|
+
|
213
|
+
### Authorization
|
214
|
+
|
215
|
+
[Basic](../README.md#Basic)
|
216
|
+
|
217
|
+
### HTTP request headers
|
218
|
+
|
219
|
+
- **Content-Type**: application/json
|
220
|
+
- **Accept**: application/json
|
221
|
+
|
data/docs/Zone.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# PolarAccesslink::Zone
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**index** | **Integer** | Zone list index | [optional]
|
8
|
+
**lower_limit** | **Integer** | Lower heart-rate boundary of the zone | [optional]
|
9
|
+
**upper_limit** | **Integer** | Upper heart-rate boundary of the zone | [optional]
|
10
|
+
**in_zone** | **String** | Time duration spent in the zone ISO 8601 | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'OpenapiClient'
|
16
|
+
|
17
|
+
instance = PolarAccesslink::Zone.new(index: 1,
|
18
|
+
lower_limit: 110,
|
19
|
+
upper_limit: 130,
|
20
|
+
in_zone: PT4S)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
data/docs/Zones.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# PolarAccesslink::Zones
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**zone** | [**Array<Zone>**](Zone.md) | List of heart rate zones. | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'OpenapiClient'
|
13
|
+
|
14
|
+
instance = PolarAccesslink::Zones.new(zone: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|