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.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -5
- data/README.md +20 -65
- data/Rakefile +0 -2
- data/docs/DailyActivityApi.md +96 -123
- data/docs/ExercisesApi.md +35 -55
- data/docs/NightlyRechargeApi.md +96 -0
- data/docs/PhysicalInfoApi.md +60 -79
- data/docs/PullNotificationsApi.md +11 -20
- data/docs/SleepApi.md +137 -0
- data/docs/TrainingDataApi.md +175 -213
- data/docs/UsersApi.md +33 -56
- data/docs/WebhooksApi.md +43 -80
- data/git_push.sh +55 -0
- data/lib/polar_accesslink.rb +5 -36
- data/lib/polar_accesslink/api/daily_activity_api.rb +101 -201
- data/lib/polar_accesslink/api/exercises_api.rb +43 -81
- data/lib/polar_accesslink/api/nightly_recharge_api.rb +115 -0
- data/lib/polar_accesslink/api/physical_info_api.rb +65 -114
- data/lib/polar_accesslink/api/pull_notifications_api.rb +15 -27
- data/lib/polar_accesslink/api/sleep_api.rb +158 -0
- data/lib/polar_accesslink/api/training_data_api.rb +178 -332
- data/lib/polar_accesslink/api/users_api.rb +42 -96
- data/lib/polar_accesslink/api/webhooks_api.rb +59 -126
- data/lib/polar_accesslink/api_client.rb +45 -41
- data/lib/polar_accesslink/api_error.rb +3 -22
- data/lib/polar_accesslink/configuration.rb +9 -62
- data/lib/polar_accesslink/version.rb +3 -3
- data/polar_accesslink.gemspec +2 -1
- data/spec/api/daily_activity_api_spec.rb +11 -11
- data/spec/api/exercises_api_spec.rb +9 -9
- data/spec/api/nightly_recharge_api_spec.rb +58 -0
- data/spec/api/physical_info_api_spec.rb +9 -9
- data/spec/api/pull_notifications_api_spec.rb +7 -7
- data/spec/api/sleep_api_spec.rb +69 -0
- data/spec/api/training_data_api_spec.rb +16 -15
- data/spec/api/users_api_spec.rb +8 -9
- data/spec/api/webhooks_api_spec.rb +11 -13
- data/spec/api_client_spec.rb +21 -4
- data/spec/configuration_spec.rb +6 -6
- data/spec/spec_helper.rb +3 -3
- metadata +36 -145
- data/docs/Activity.md +0 -33
- data/docs/ActivityLog.md +0 -17
- data/docs/ActivityStepSample.md +0 -19
- data/docs/ActivityStepSamples.md +0 -19
- data/docs/ActivityZoneSample.md +0 -19
- data/docs/ActivityZoneSamples.md +0 -19
- data/docs/AvailableUserData.md +0 -21
- data/docs/AvailableUserDatas.md +0 -17
- data/docs/CreatedWebhook.md +0 -17
- data/docs/CreatedWebhookData.md +0 -23
- data/docs/DurationZone.md +0 -19
- data/docs/Error.md +0 -25
- data/docs/Exercise.md +0 -47
- data/docs/ExerciseHashId.md +0 -45
- data/docs/Exercises.md +0 -17
- data/docs/HeartRate.md +0 -19
- data/docs/PhysicalInformation.md +0 -39
- data/docs/PhysicalInformations.md +0 -17
- data/docs/Register.md +0 -17
- data/docs/Sample.md +0 -21
- data/docs/Samples.md +0 -17
- data/docs/TransactionLocation.md +0 -19
- data/docs/User.md +0 -35
- data/docs/UserExtraInfo.md +0 -21
- data/docs/WebhookInfo.md +0 -17
- data/docs/WebhookInfoData.md +0 -21
- data/docs/WebhookPatch.md +0 -19
- data/docs/WebhookPayload.md +0 -25
- data/docs/WebhookPing.md +0 -19
- data/docs/WebhookRequest.md +0 -19
- data/docs/WebhookType.md +0 -16
- data/docs/Zone.md +0 -23
- data/docs/Zones.md +0 -17
- data/lib/polar_accesslink/models/activity.rb +0 -288
- data/lib/polar_accesslink/models/activity_log.rb +0 -210
- data/lib/polar_accesslink/models/activity_step_sample.rb +0 -218
- data/lib/polar_accesslink/models/activity_step_samples.rb +0 -220
- data/lib/polar_accesslink/models/activity_zone_sample.rb +0 -220
- data/lib/polar_accesslink/models/activity_zone_samples.rb +0 -220
- data/lib/polar_accesslink/models/available_user_data.rb +0 -262
- data/lib/polar_accesslink/models/available_user_datas.rb +0 -210
- data/lib/polar_accesslink/models/created_webhook.rb +0 -206
- data/lib/polar_accesslink/models/created_webhook_data.rb +0 -236
- data/lib/polar_accesslink/models/duration_zone.rb +0 -218
- data/lib/polar_accesslink/models/error.rb +0 -248
- data/lib/polar_accesslink/models/exercise.rb +0 -357
- data/lib/polar_accesslink/models/exercise_hash_id.rb +0 -347
- data/lib/polar_accesslink/models/exercises.rb +0 -210
- data/lib/polar_accesslink/models/heart_rate.rb +0 -218
- data/lib/polar_accesslink/models/physical_information.rb +0 -352
- data/lib/polar_accesslink/models/physical_informations.rb +0 -210
- data/lib/polar_accesslink/models/register.rb +0 -213
- data/lib/polar_accesslink/models/sample.rb +0 -228
- data/lib/polar_accesslink/models/samples.rb +0 -210
- data/lib/polar_accesslink/models/transaction_location.rb +0 -218
- data/lib/polar_accesslink/models/user.rb +0 -334
- data/lib/polar_accesslink/models/user_extra_info.rb +0 -228
- data/lib/polar_accesslink/models/webhook_info.rb +0 -206
- data/lib/polar_accesslink/models/webhook_info_data.rb +0 -226
- data/lib/polar_accesslink/models/webhook_patch.rb +0 -219
- data/lib/polar_accesslink/models/webhook_payload.rb +0 -246
- data/lib/polar_accesslink/models/webhook_ping.rb +0 -252
- data/lib/polar_accesslink/models/webhook_request.rb +0 -229
- data/lib/polar_accesslink/models/webhook_type.rb +0 -37
- data/lib/polar_accesslink/models/zone.rb +0 -238
- data/lib/polar_accesslink/models/zones.rb +0 -210
- data/spec/models/activity_log_spec.rb +0 -41
- data/spec/models/activity_spec.rb +0 -89
- data/spec/models/activity_step_sample_spec.rb +0 -47
- data/spec/models/activity_step_samples_spec.rb +0 -47
- data/spec/models/activity_zone_sample_spec.rb +0 -47
- data/spec/models/activity_zone_samples_spec.rb +0 -47
- data/spec/models/available_user_data_spec.rb +0 -57
- data/spec/models/available_user_datas_spec.rb +0 -41
- data/spec/models/created_webhook_data_spec.rb +0 -59
- data/spec/models/created_webhook_spec.rb +0 -41
- data/spec/models/duration_zone_spec.rb +0 -47
- data/spec/models/error_spec.rb +0 -65
- data/spec/models/exercise_hash_id_spec.rb +0 -125
- data/spec/models/exercise_spec.rb +0 -131
- data/spec/models/exercises_spec.rb +0 -41
- data/spec/models/heart_rate_spec.rb +0 -47
- data/spec/models/physical_information_spec.rb +0 -111
- data/spec/models/physical_informations_spec.rb +0 -41
- data/spec/models/register_spec.rb +0 -41
- data/spec/models/sample_spec.rb +0 -53
- data/spec/models/samples_spec.rb +0 -41
- data/spec/models/transaction_location_spec.rb +0 -47
- data/spec/models/user_extra_info_spec.rb +0 -53
- data/spec/models/user_spec.rb +0 -99
- data/spec/models/webhook_info_data_spec.rb +0 -53
- data/spec/models/webhook_info_spec.rb +0 -41
- data/spec/models/webhook_patch_spec.rb +0 -47
- data/spec/models/webhook_payload_spec.rb +0 -65
- data/spec/models/webhook_ping_spec.rb +0 -51
- data/spec/models/webhook_request_spec.rb +0 -47
- data/spec/models/webhook_type_spec.rb +0 -35
- data/spec/models/zone_spec.rb +0 -59
- data/spec/models/zones_spec.rb +0 -41
data/docs/UsersApi.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# PolarAccesslink::UsersApi
|
2
2
|
|
3
|
-
All URIs are relative to *https://
|
3
|
+
All URIs are relative to *https://localhost*
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
@@ -9,9 +9,7 @@ Method | HTTP request | Description
|
|
9
9
|
[**register_user**](UsersApi.md#register_user) | **POST** /v3/users | Register user
|
10
10
|
|
11
11
|
|
12
|
-
|
13
|
-
## delete_user
|
14
|
-
|
12
|
+
# **delete_user**
|
15
13
|
> delete_user(user_id)
|
16
14
|
|
17
15
|
Delete user
|
@@ -19,18 +17,14 @@ Delete user
|
|
19
17
|
When partner wishes no longer to receive user data, user can be de-registered.This will revoke the access token authorized by user.
|
20
18
|
|
21
19
|
### Example
|
22
|
-
|
23
20
|
```ruby
|
24
21
|
# load the gem
|
25
|
-
require '
|
26
|
-
# setup authorization
|
27
|
-
PolarAccesslink.configure do |config|
|
28
|
-
# Configure OAuth2 access token for authorization: OAuth2
|
29
|
-
config.access_token = 'YOUR ACCESS TOKEN'
|
30
|
-
end
|
22
|
+
require 'polar_accesslink'
|
31
23
|
|
32
24
|
api_instance = PolarAccesslink::UsersApi.new
|
33
|
-
|
25
|
+
|
26
|
+
user_id = nil # Object | User identifier
|
27
|
+
|
34
28
|
|
35
29
|
begin
|
36
30
|
#Delete user
|
@@ -42,10 +36,9 @@ end
|
|
42
36
|
|
43
37
|
### Parameters
|
44
38
|
|
45
|
-
|
46
39
|
Name | Type | Description | Notes
|
47
40
|
------------- | ------------- | ------------- | -------------
|
48
|
-
**user_id** | **
|
41
|
+
**user_id** | [**Object**](.md)| User identifier |
|
49
42
|
|
50
43
|
### Return type
|
51
44
|
|
@@ -53,40 +46,35 @@ nil (empty response body)
|
|
53
46
|
|
54
47
|
### Authorization
|
55
48
|
|
56
|
-
|
49
|
+
No authorization required
|
57
50
|
|
58
51
|
### HTTP request headers
|
59
52
|
|
60
|
-
- **Content-Type**: Not defined
|
61
|
-
- **Accept**: Not defined
|
53
|
+
- **Content-Type**: Not defined
|
54
|
+
- **Accept**: Not defined
|
62
55
|
|
63
56
|
|
64
|
-
## get_user_information
|
65
57
|
|
66
|
-
|
58
|
+
# **get_user_information**
|
59
|
+
> get_user_information(user_id)
|
67
60
|
|
68
61
|
Get user information
|
69
62
|
|
70
63
|
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
64
|
|
72
65
|
### Example
|
73
|
-
|
74
66
|
```ruby
|
75
67
|
# load the gem
|
76
|
-
require '
|
77
|
-
# setup authorization
|
78
|
-
PolarAccesslink.configure do |config|
|
79
|
-
# Configure OAuth2 access token for authorization: OAuth2
|
80
|
-
config.access_token = 'YOUR ACCESS TOKEN'
|
81
|
-
end
|
68
|
+
require 'polar_accesslink'
|
82
69
|
|
83
70
|
api_instance = PolarAccesslink::UsersApi.new
|
84
|
-
|
71
|
+
|
72
|
+
user_id = nil # Object | User identifier
|
73
|
+
|
85
74
|
|
86
75
|
begin
|
87
76
|
#Get user information
|
88
|
-
|
89
|
-
p result
|
77
|
+
api_instance.get_user_information(user_id)
|
90
78
|
rescue PolarAccesslink::ApiError => e
|
91
79
|
puts "Exception when calling UsersApi->get_user_information: #{e}"
|
92
80
|
end
|
@@ -94,73 +82,62 @@ end
|
|
94
82
|
|
95
83
|
### Parameters
|
96
84
|
|
97
|
-
|
98
85
|
Name | Type | Description | Notes
|
99
86
|
------------- | ------------- | ------------- | -------------
|
100
|
-
**user_id** | **
|
87
|
+
**user_id** | [**Object**](.md)| User identifier |
|
101
88
|
|
102
89
|
### Return type
|
103
90
|
|
104
|
-
|
91
|
+
nil (empty response body)
|
105
92
|
|
106
93
|
### Authorization
|
107
94
|
|
108
|
-
|
95
|
+
No authorization required
|
109
96
|
|
110
97
|
### HTTP request headers
|
111
98
|
|
112
|
-
- **Content-Type**: Not defined
|
113
|
-
- **Accept**:
|
99
|
+
- **Content-Type**: Not defined
|
100
|
+
- **Accept**: Not defined
|
114
101
|
|
115
102
|
|
116
|
-
## register_user
|
117
103
|
|
118
|
-
|
104
|
+
# **register_user**
|
105
|
+
> register_user
|
119
106
|
|
120
107
|
Register user
|
121
108
|
|
122
109
|
Once partner has been authorized by user, partner must register user before being able to access her data.
|
123
110
|
|
124
111
|
### Example
|
125
|
-
|
126
112
|
```ruby
|
127
113
|
# load the gem
|
128
|
-
require '
|
129
|
-
# setup authorization
|
130
|
-
PolarAccesslink.configure do |config|
|
131
|
-
# Configure OAuth2 access token for authorization: OAuth2
|
132
|
-
config.access_token = 'YOUR ACCESS TOKEN'
|
133
|
-
end
|
114
|
+
require 'polar_accesslink'
|
134
115
|
|
135
116
|
api_instance = PolarAccesslink::UsersApi.new
|
136
|
-
register = PolarAccesslink::Register.new # Register |
|
137
117
|
|
138
118
|
begin
|
139
119
|
#Register user
|
140
|
-
|
141
|
-
p result
|
120
|
+
api_instance.register_user
|
142
121
|
rescue PolarAccesslink::ApiError => e
|
143
122
|
puts "Exception when calling UsersApi->register_user: #{e}"
|
144
123
|
end
|
145
124
|
```
|
146
125
|
|
147
126
|
### Parameters
|
148
|
-
|
149
|
-
|
150
|
-
Name | Type | Description | Notes
|
151
|
-
------------- | ------------- | ------------- | -------------
|
152
|
-
**register** | [**Register**](Register.md)| |
|
127
|
+
This endpoint does not need any parameter.
|
153
128
|
|
154
129
|
### Return type
|
155
130
|
|
156
|
-
|
131
|
+
nil (empty response body)
|
157
132
|
|
158
133
|
### Authorization
|
159
134
|
|
160
|
-
|
135
|
+
No authorization required
|
161
136
|
|
162
137
|
### HTTP request headers
|
163
138
|
|
164
|
-
- **Content-Type**:
|
165
|
-
- **Accept**:
|
139
|
+
- **Content-Type**: Not defined
|
140
|
+
- **Accept**: Not defined
|
141
|
+
|
142
|
+
|
166
143
|
|
data/docs/WebhooksApi.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# PolarAccesslink::WebhooksApi
|
2
2
|
|
3
|
-
All URIs are relative to *https://
|
3
|
+
All URIs are relative to *https://localhost*
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
@@ -10,62 +10,47 @@ Method | HTTP request | Description
|
|
10
10
|
[**update_webhook**](WebhooksApi.md#update_webhook) | **PATCH** /v3/webhooks/{webhook-id} | Update webhook
|
11
11
|
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
> CreatedWebhook create_webhook(webhook_request)
|
13
|
+
# **create_webhook**
|
14
|
+
> create_webhook
|
17
15
|
|
18
16
|
Create webhook
|
19
17
|
|
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.
|
18
|
+
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. **Please also note** that currently there is an issue with SLEEP event delivery. You can still subscribe to them but you will not receive SLEEP events through the webhook at the moment. We are working on fixing the issue and you will start to receive SLEEP events eventually.
|
21
19
|
|
22
20
|
### Example
|
23
|
-
|
24
21
|
```ruby
|
25
22
|
# load the gem
|
26
|
-
require '
|
27
|
-
# setup authorization
|
28
|
-
PolarAccesslink.configure do |config|
|
29
|
-
# Configure HTTP basic authorization: Basic
|
30
|
-
config.username = 'YOUR USERNAME'
|
31
|
-
config.password = 'YOUR PASSWORD'
|
32
|
-
end
|
23
|
+
require 'polar_accesslink'
|
33
24
|
|
34
25
|
api_instance = PolarAccesslink::WebhooksApi.new
|
35
|
-
webhook_request = PolarAccesslink::WebhookRequest.new # WebhookRequest | Webhook to create.
|
36
26
|
|
37
27
|
begin
|
38
28
|
#Create webhook
|
39
|
-
|
40
|
-
p result
|
29
|
+
api_instance.create_webhook
|
41
30
|
rescue PolarAccesslink::ApiError => e
|
42
31
|
puts "Exception when calling WebhooksApi->create_webhook: #{e}"
|
43
32
|
end
|
44
33
|
```
|
45
34
|
|
46
35
|
### Parameters
|
47
|
-
|
48
|
-
|
49
|
-
Name | Type | Description | Notes
|
50
|
-
------------- | ------------- | ------------- | -------------
|
51
|
-
**webhook_request** | [**WebhookRequest**](WebhookRequest.md)| Webhook to create. |
|
36
|
+
This endpoint does not need any parameter.
|
52
37
|
|
53
38
|
### Return type
|
54
39
|
|
55
|
-
|
40
|
+
nil (empty response body)
|
56
41
|
|
57
42
|
### Authorization
|
58
43
|
|
59
|
-
|
44
|
+
No authorization required
|
60
45
|
|
61
46
|
### HTTP request headers
|
62
47
|
|
63
|
-
- **Content-Type**:
|
64
|
-
- **Accept**:
|
48
|
+
- **Content-Type**: Not defined
|
49
|
+
- **Accept**: Not defined
|
65
50
|
|
66
51
|
|
67
|
-
## delete_webhook
|
68
52
|
|
53
|
+
# **delete_webhook**
|
69
54
|
> delete_webhook(webhook_id)
|
70
55
|
|
71
56
|
Delete webhook
|
@@ -73,19 +58,14 @@ Delete webhook
|
|
73
58
|
Delete webhook by id.
|
74
59
|
|
75
60
|
### Example
|
76
|
-
|
77
61
|
```ruby
|
78
62
|
# load the gem
|
79
|
-
require '
|
80
|
-
# setup authorization
|
81
|
-
PolarAccesslink.configure do |config|
|
82
|
-
# Configure HTTP basic authorization: Basic
|
83
|
-
config.username = 'YOUR USERNAME'
|
84
|
-
config.password = 'YOUR PASSWORD'
|
85
|
-
end
|
63
|
+
require 'polar_accesslink'
|
86
64
|
|
87
65
|
api_instance = PolarAccesslink::WebhooksApi.new
|
88
|
-
|
66
|
+
|
67
|
+
webhook_id = nil # Object | Webhook id to delete
|
68
|
+
|
89
69
|
|
90
70
|
begin
|
91
71
|
#Delete webhook
|
@@ -97,10 +77,9 @@ end
|
|
97
77
|
|
98
78
|
### Parameters
|
99
79
|
|
100
|
-
|
101
80
|
Name | Type | Description | Notes
|
102
81
|
------------- | ------------- | ------------- | -------------
|
103
|
-
**webhook_id** | **
|
82
|
+
**webhook_id** | [**Object**](.md)| Webhook id to delete |
|
104
83
|
|
105
84
|
### Return type
|
106
85
|
|
@@ -108,91 +87,75 @@ nil (empty response body)
|
|
108
87
|
|
109
88
|
### Authorization
|
110
89
|
|
111
|
-
|
90
|
+
No authorization required
|
112
91
|
|
113
92
|
### HTTP request headers
|
114
93
|
|
115
|
-
- **Content-Type**: Not defined
|
116
|
-
- **Accept**:
|
94
|
+
- **Content-Type**: Not defined
|
95
|
+
- **Accept**: Not defined
|
117
96
|
|
118
97
|
|
119
|
-
## get_webhook
|
120
98
|
|
121
|
-
|
99
|
+
# **get_webhook**
|
100
|
+
> get_webhook
|
122
101
|
|
123
102
|
Get webhook
|
124
103
|
|
125
104
|
Returns created webhook if exists.
|
126
105
|
|
127
106
|
### Example
|
128
|
-
|
129
107
|
```ruby
|
130
108
|
# load the gem
|
131
|
-
require '
|
132
|
-
# setup authorization
|
133
|
-
PolarAccesslink.configure do |config|
|
134
|
-
# Configure HTTP basic authorization: Basic
|
135
|
-
config.username = 'YOUR USERNAME'
|
136
|
-
config.password = 'YOUR PASSWORD'
|
137
|
-
end
|
109
|
+
require 'polar_accesslink'
|
138
110
|
|
139
111
|
api_instance = PolarAccesslink::WebhooksApi.new
|
140
112
|
|
141
113
|
begin
|
142
114
|
#Get webhook
|
143
|
-
|
144
|
-
p result
|
115
|
+
api_instance.get_webhook
|
145
116
|
rescue PolarAccesslink::ApiError => e
|
146
117
|
puts "Exception when calling WebhooksApi->get_webhook: #{e}"
|
147
118
|
end
|
148
119
|
```
|
149
120
|
|
150
121
|
### Parameters
|
151
|
-
|
152
122
|
This endpoint does not need any parameter.
|
153
123
|
|
154
124
|
### Return type
|
155
125
|
|
156
|
-
|
126
|
+
nil (empty response body)
|
157
127
|
|
158
128
|
### Authorization
|
159
129
|
|
160
|
-
|
130
|
+
No authorization required
|
161
131
|
|
162
132
|
### HTTP request headers
|
163
133
|
|
164
|
-
- **Content-Type**: Not defined
|
165
|
-
- **Accept**:
|
134
|
+
- **Content-Type**: Not defined
|
135
|
+
- **Accept**: Not defined
|
166
136
|
|
167
137
|
|
168
|
-
## update_webhook
|
169
138
|
|
170
|
-
|
139
|
+
# **update_webhook**
|
140
|
+
> update_webhook(webhook_id)
|
171
141
|
|
172
142
|
Update webhook
|
173
143
|
|
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.
|
144
|
+
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. **Please note** that currently there is an issue with SLEEP event delivery. You can still subscribe to them but you will not receive SLEEP events through the webhook at the moment. We are working on fixing the issue and you will start to receive SLEEP events eventually.
|
175
145
|
|
176
146
|
### Example
|
177
|
-
|
178
147
|
```ruby
|
179
148
|
# load the gem
|
180
|
-
require '
|
181
|
-
# setup authorization
|
182
|
-
PolarAccesslink.configure do |config|
|
183
|
-
# Configure HTTP basic authorization: Basic
|
184
|
-
config.username = 'YOUR USERNAME'
|
185
|
-
config.password = 'YOUR PASSWORD'
|
186
|
-
end
|
149
|
+
require 'polar_accesslink'
|
187
150
|
|
188
151
|
api_instance = PolarAccesslink::WebhooksApi.new
|
189
|
-
|
190
|
-
|
152
|
+
|
153
|
+
webhook_id = nil # Object | Webhook id to update
|
154
|
+
|
191
155
|
|
192
156
|
begin
|
193
157
|
#Update webhook
|
194
|
-
|
195
|
-
p result
|
158
|
+
api_instance.update_webhook(webhook_id)
|
196
159
|
rescue PolarAccesslink::ApiError => e
|
197
160
|
puts "Exception when calling WebhooksApi->update_webhook: #{e}"
|
198
161
|
end
|
@@ -200,22 +163,22 @@ end
|
|
200
163
|
|
201
164
|
### Parameters
|
202
165
|
|
203
|
-
|
204
166
|
Name | Type | Description | Notes
|
205
167
|
------------- | ------------- | ------------- | -------------
|
206
|
-
**webhook_id** | **
|
207
|
-
**webhook_patch** | [**WebhookPatch**](WebhookPatch.md)| New value(s) for events and/or url. |
|
168
|
+
**webhook_id** | [**Object**](.md)| Webhook id to update |
|
208
169
|
|
209
170
|
### Return type
|
210
171
|
|
211
|
-
|
172
|
+
nil (empty response body)
|
212
173
|
|
213
174
|
### Authorization
|
214
175
|
|
215
|
-
|
176
|
+
No authorization required
|
216
177
|
|
217
178
|
### HTTP request headers
|
218
179
|
|
219
|
-
- **Content-Type**:
|
220
|
-
- **Accept**:
|
180
|
+
- **Content-Type**: Not defined
|
181
|
+
- **Accept**: Not defined
|
182
|
+
|
183
|
+
|
221
184
|
|
data/git_push.sh
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
+
#
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
8
|
+
|
9
|
+
git_user_id=$1
|
10
|
+
git_repo_id=$2
|
11
|
+
release_note=$3
|
12
|
+
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
14
|
+
git_user_id=""
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
+
fi
|
17
|
+
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
19
|
+
git_repo_id=""
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
+
fi
|
22
|
+
|
23
|
+
if [ "$release_note" = "" ]; then
|
24
|
+
release_note=""
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Initialize the local directory as a Git repository
|
29
|
+
git init
|
30
|
+
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
32
|
+
git add .
|
33
|
+
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
+
git commit -m "$release_note"
|
36
|
+
|
37
|
+
# Sets the new remote
|
38
|
+
git_remote=`git remote`
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
+
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
+
else
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
+
fi
|
47
|
+
|
48
|
+
fi
|
49
|
+
|
50
|
+
git pull origin master
|
51
|
+
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
55
|
+
|