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
@@ -0,0 +1,292 @@
|
|
1
|
+
=begin
|
2
|
+
#Polar Accesslink API
|
3
|
+
|
4
|
+
#Polar Accesslink API documentation
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.40.0
|
7
|
+
Contact: b2bhelpdesk@polar.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PolarAccesslink
|
16
|
+
class PhysicalInfoApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Commit transaction
|
23
|
+
# After successfully retrieving physical information within a transaction, partners are expected to commit the transaction.
|
24
|
+
# @param transaction_id [Integer] Transaction identifier
|
25
|
+
# @param user_id [Integer] User identifier
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [nil]
|
28
|
+
def commit_physical_info_transaction(transaction_id, user_id, opts = {})
|
29
|
+
commit_physical_info_transaction_with_http_info(transaction_id, user_id, opts)
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
# Commit transaction
|
34
|
+
# After successfully retrieving physical information within a transaction, partners are expected to commit the transaction.
|
35
|
+
# @param transaction_id [Integer] Transaction identifier
|
36
|
+
# @param user_id [Integer] User identifier
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
39
|
+
def commit_physical_info_transaction_with_http_info(transaction_id, user_id, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: PhysicalInfoApi.commit_physical_info_transaction ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'transaction_id' is set
|
44
|
+
if @api_client.config.client_side_validation && transaction_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PhysicalInfoApi.commit_physical_info_transaction"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'user_id' is set
|
48
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.commit_physical_info_transaction"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/v3/users/{user-id}/physical-information-transactions/{transaction-id}'.sub('{' + 'transaction-id' + '}', CGI.escape(transaction_id.to_s)).sub('{' + 'user-id' + '}', CGI.escape(user_id.to_s))
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = opts[:header_params] || {}
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = opts[:form_params] || {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = opts[:body]
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:return_type]
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => return_type
|
79
|
+
)
|
80
|
+
|
81
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug "API called: PhysicalInfoApi#commit_physical_info_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# Create transaction
|
89
|
+
# Initiate physical info transaction. Check for new physical info and create a new transaction if found.
|
90
|
+
# @param user_id [Integer] User identifier
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [TransactionLocation]
|
93
|
+
def create_physical_info_transaction(user_id, opts = {})
|
94
|
+
data, _status_code, _headers = create_physical_info_transaction_with_http_info(user_id, opts)
|
95
|
+
data
|
96
|
+
end
|
97
|
+
|
98
|
+
# Create transaction
|
99
|
+
# Initiate physical info transaction. Check for new physical info and create a new transaction if found.
|
100
|
+
# @param user_id [Integer] User identifier
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(TransactionLocation, Integer, Hash)>] TransactionLocation data, response status code and response headers
|
103
|
+
def create_physical_info_transaction_with_http_info(user_id, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: PhysicalInfoApi.create_physical_info_transaction ...'
|
106
|
+
end
|
107
|
+
# verify the required parameter 'user_id' is set
|
108
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.create_physical_info_transaction"
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = '/v3/users/{user-id}/physical-information-transactions'.sub('{' + 'user-id' + '}', CGI.escape(user_id.to_s))
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = opts[:query_params] || {}
|
116
|
+
|
117
|
+
# header parameters
|
118
|
+
header_params = opts[:header_params] || {}
|
119
|
+
# HTTP header 'Accept' (if needed)
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
|
121
|
+
|
122
|
+
# form parameters
|
123
|
+
form_params = opts[:form_params] || {}
|
124
|
+
|
125
|
+
# http body (model)
|
126
|
+
post_body = opts[:body]
|
127
|
+
|
128
|
+
# return_type
|
129
|
+
return_type = opts[:return_type] || 'TransactionLocation'
|
130
|
+
|
131
|
+
# auth_names
|
132
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
133
|
+
|
134
|
+
new_options = opts.merge(
|
135
|
+
:header_params => header_params,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body,
|
139
|
+
:auth_names => auth_names,
|
140
|
+
:return_type => return_type
|
141
|
+
)
|
142
|
+
|
143
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
144
|
+
if @api_client.config.debugging
|
145
|
+
@api_client.config.logger.debug "API called: PhysicalInfoApi#create_physical_info_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
146
|
+
end
|
147
|
+
return data, status_code, headers
|
148
|
+
end
|
149
|
+
|
150
|
+
# Get physical info
|
151
|
+
# Get physical info entity data
|
152
|
+
# @param user_id [Integer] User identifier
|
153
|
+
# @param transaction_id [Integer] Transaction identifier
|
154
|
+
# @param physical_info_id [Integer] Physical information identifier
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @return [PhysicalInformation]
|
157
|
+
def get_physical_info(user_id, transaction_id, physical_info_id, opts = {})
|
158
|
+
data, _status_code, _headers = get_physical_info_with_http_info(user_id, transaction_id, physical_info_id, opts)
|
159
|
+
data
|
160
|
+
end
|
161
|
+
|
162
|
+
# Get physical info
|
163
|
+
# Get physical info entity data
|
164
|
+
# @param user_id [Integer] User identifier
|
165
|
+
# @param transaction_id [Integer] Transaction identifier
|
166
|
+
# @param physical_info_id [Integer] Physical information identifier
|
167
|
+
# @param [Hash] opts the optional parameters
|
168
|
+
# @return [Array<(PhysicalInformation, Integer, Hash)>] PhysicalInformation data, response status code and response headers
|
169
|
+
def get_physical_info_with_http_info(user_id, transaction_id, physical_info_id, opts = {})
|
170
|
+
if @api_client.config.debugging
|
171
|
+
@api_client.config.logger.debug 'Calling API: PhysicalInfoApi.get_physical_info ...'
|
172
|
+
end
|
173
|
+
# verify the required parameter 'user_id' is set
|
174
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
175
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.get_physical_info"
|
176
|
+
end
|
177
|
+
# verify the required parameter 'transaction_id' is set
|
178
|
+
if @api_client.config.client_side_validation && transaction_id.nil?
|
179
|
+
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PhysicalInfoApi.get_physical_info"
|
180
|
+
end
|
181
|
+
# verify the required parameter 'physical_info_id' is set
|
182
|
+
if @api_client.config.client_side_validation && physical_info_id.nil?
|
183
|
+
fail ArgumentError, "Missing the required parameter 'physical_info_id' when calling PhysicalInfoApi.get_physical_info"
|
184
|
+
end
|
185
|
+
# resource path
|
186
|
+
local_var_path = '/v3/users/{user-id}/physical-information-transactions/{transaction-id}/physical-informations/{physical-info-id}'.sub('{' + 'user-id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'transaction-id' + '}', CGI.escape(transaction_id.to_s)).sub('{' + 'physical-info-id' + '}', CGI.escape(physical_info_id.to_s))
|
187
|
+
|
188
|
+
# query parameters
|
189
|
+
query_params = opts[:query_params] || {}
|
190
|
+
|
191
|
+
# header parameters
|
192
|
+
header_params = opts[:header_params] || {}
|
193
|
+
# HTTP header 'Accept' (if needed)
|
194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
|
195
|
+
|
196
|
+
# form parameters
|
197
|
+
form_params = opts[:form_params] || {}
|
198
|
+
|
199
|
+
# http body (model)
|
200
|
+
post_body = opts[:body]
|
201
|
+
|
202
|
+
# return_type
|
203
|
+
return_type = opts[:return_type] || 'PhysicalInformation'
|
204
|
+
|
205
|
+
# auth_names
|
206
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
207
|
+
|
208
|
+
new_options = opts.merge(
|
209
|
+
:header_params => header_params,
|
210
|
+
:query_params => query_params,
|
211
|
+
:form_params => form_params,
|
212
|
+
:body => post_body,
|
213
|
+
:auth_names => auth_names,
|
214
|
+
:return_type => return_type
|
215
|
+
)
|
216
|
+
|
217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
218
|
+
if @api_client.config.debugging
|
219
|
+
@api_client.config.logger.debug "API called: PhysicalInfoApi#get_physical_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
220
|
+
end
|
221
|
+
return data, status_code, headers
|
222
|
+
end
|
223
|
+
|
224
|
+
# List physical infos
|
225
|
+
# List new physical info data. After successfully initiating a transaction, physical infos included within it can be retrieved with the provided transactionId.
|
226
|
+
# @param transaction_id [Integer] Transaction identifier
|
227
|
+
# @param user_id [Integer] User identifier
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @return [PhysicalInformations]
|
230
|
+
def list_physical_infos(transaction_id, user_id, opts = {})
|
231
|
+
data, _status_code, _headers = list_physical_infos_with_http_info(transaction_id, user_id, opts)
|
232
|
+
data
|
233
|
+
end
|
234
|
+
|
235
|
+
# List physical infos
|
236
|
+
# List new physical info data. After successfully initiating a transaction, physical infos included within it can be retrieved with the provided transactionId.
|
237
|
+
# @param transaction_id [Integer] Transaction identifier
|
238
|
+
# @param user_id [Integer] User identifier
|
239
|
+
# @param [Hash] opts the optional parameters
|
240
|
+
# @return [Array<(PhysicalInformations, Integer, Hash)>] PhysicalInformations data, response status code and response headers
|
241
|
+
def list_physical_infos_with_http_info(transaction_id, user_id, opts = {})
|
242
|
+
if @api_client.config.debugging
|
243
|
+
@api_client.config.logger.debug 'Calling API: PhysicalInfoApi.list_physical_infos ...'
|
244
|
+
end
|
245
|
+
# verify the required parameter 'transaction_id' is set
|
246
|
+
if @api_client.config.client_side_validation && transaction_id.nil?
|
247
|
+
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PhysicalInfoApi.list_physical_infos"
|
248
|
+
end
|
249
|
+
# verify the required parameter 'user_id' is set
|
250
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
251
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.list_physical_infos"
|
252
|
+
end
|
253
|
+
# resource path
|
254
|
+
local_var_path = '/v3/users/{user-id}/physical-information-transactions/{transaction-id}'.sub('{' + 'transaction-id' + '}', CGI.escape(transaction_id.to_s)).sub('{' + 'user-id' + '}', CGI.escape(user_id.to_s))
|
255
|
+
|
256
|
+
# query parameters
|
257
|
+
query_params = opts[:query_params] || {}
|
258
|
+
|
259
|
+
# header parameters
|
260
|
+
header_params = opts[:header_params] || {}
|
261
|
+
# HTTP header 'Accept' (if needed)
|
262
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
|
263
|
+
|
264
|
+
# form parameters
|
265
|
+
form_params = opts[:form_params] || {}
|
266
|
+
|
267
|
+
# http body (model)
|
268
|
+
post_body = opts[:body]
|
269
|
+
|
270
|
+
# return_type
|
271
|
+
return_type = opts[:return_type] || 'PhysicalInformations'
|
272
|
+
|
273
|
+
# auth_names
|
274
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
275
|
+
|
276
|
+
new_options = opts.merge(
|
277
|
+
:header_params => header_params,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body,
|
281
|
+
:auth_names => auth_names,
|
282
|
+
:return_type => return_type
|
283
|
+
)
|
284
|
+
|
285
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
286
|
+
if @api_client.config.debugging
|
287
|
+
@api_client.config.logger.debug "API called: PhysicalInfoApi#list_physical_infos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
288
|
+
end
|
289
|
+
return data, status_code, headers
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
=begin
|
2
|
+
#Polar Accesslink API
|
3
|
+
|
4
|
+
#Polar Accesslink API documentation
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.40.0
|
7
|
+
Contact: b2bhelpdesk@polar.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PolarAccesslink
|
16
|
+
class PullNotificationsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List
|
23
|
+
# Get list of available exercises and activities for users
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [AvailableUserDatas]
|
26
|
+
def list(opts = {})
|
27
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# List
|
32
|
+
# Get list of available exercises and activities for users
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(AvailableUserDatas, Integer, Hash)>] AvailableUserDatas data, response status code and response headers
|
35
|
+
def list_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: PullNotificationsApi.list ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/v3/notifications'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:return_type] || 'AvailableUserDatas'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:auth_names] || ['Basic']
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => return_type
|
69
|
+
)
|
70
|
+
|
71
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: PullNotificationsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|