Class: PolarAccesslink::TrainingDataApi
- Inherits:
-
Object
- Object
- PolarAccesslink::TrainingDataApi
- Defined in:
- lib/polar_accesslink/api/training_data_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#commit_exercise_transaction(transaction_id, user_id, opts = {}) ⇒ nil
Commit transaction After successfully retrieving training session data within a transaction, partners are expected to commit the transaction.
-
#commit_exercise_transaction_with_http_info(transaction_id, user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Commit transaction After successfully retrieving training session data within a transaction, partners are expected to commit the transaction.
-
#create_exercise_transaction(user_id, opts = {}) ⇒ nil
Create transaction Check for new training data and create a new transaction if found.
-
#create_exercise_transaction_with_http_info(user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create transaction Check for new training data and create a new transaction if found.
-
#get_available_samples(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get available samples Retrieve list of links to available samples in training session.
-
#get_available_samples_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get available samples Retrieve list of links to available samples in training session.
-
#get_exercise_summary(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get exercise summary Retrieve training session summary data.
-
#get_exercise_summary_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get exercise summary Retrieve training session summary data.
-
#get_fit(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get FIT (beta) Retrieve exercise in FIT format.
-
#get_fit_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get FIT (beta) Retrieve exercise in FIT format.
-
#get_gpx(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get GPX Retrieve training session summary data in GPX format.
-
#get_gpx_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get GPX Retrieve training session summary data in GPX format.
-
#get_heart_rate_zones(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get heart rate zones Retrieve heart rate zones in training session.
-
#get_heart_rate_zones_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get heart rate zones Retrieve heart rate zones in training session.
-
#get_samples(type_id, user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get samples Retrieve sample data of given type.
-
#get_samples_with_http_info(type_id, user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get samples Retrieve sample data of given type.
-
#get_tcx(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get TCX Retrieve exercise in TCX format.
-
#get_tcx_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get TCX Retrieve exercise in TCX format.
-
#initialize(api_client = ApiClient.default) ⇒ TrainingDataApi
constructor
A new instance of TrainingDataApi.
-
#list_exercises(transaction_id, user_id, opts = {}) ⇒ nil
List exercises After successfully initiating a transaction, training sessions included within it can be retrieved with the provided transactionId.
-
#list_exercises_with_http_info(transaction_id, user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
List exercises After successfully initiating a transaction, training sessions included within it can be retrieved with the provided transactionId.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TrainingDataApi
Returns a new instance of TrainingDataApi.
19 20 21 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#commit_exercise_transaction(transaction_id, user_id, opts = {}) ⇒ nil
Commit transaction After successfully retrieving training session data within a transaction, partners are expected to commit the transaction.
28 29 30 31 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 28 def commit_exercise_transaction(transaction_id, user_id, opts = {}) commit_exercise_transaction_with_http_info(transaction_id, user_id, opts) nil end |
#commit_exercise_transaction_with_http_info(transaction_id, user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Commit transaction After successfully retrieving training session data within a transaction, partners are expected to commit the transaction.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 39 def commit_exercise_transaction_with_http_info(transaction_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.commit_exercise_transaction ...' end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.commit_exercise_transaction" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.commit_exercise_transaction" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}'.sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'user-id' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#commit_exercise_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_exercise_transaction(user_id, opts = {}) ⇒ nil
Create transaction Check for new training data and create a new transaction if found.
82 83 84 85 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 82 def create_exercise_transaction(user_id, opts = {}) create_exercise_transaction_with_http_info(user_id, opts) nil end |
#create_exercise_transaction_with_http_info(user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create transaction Check for new training data and create a new transaction if found.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 92 def create_exercise_transaction_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.create_exercise_transaction ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.create_exercise_transaction" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions'.sub('{' + 'user-id' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#create_exercise_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_available_samples(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get available samples Retrieve list of links to available samples in training session
133 134 135 136 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 133 def get_available_samples(user_id, transaction_id, exercise_id, opts = {}) get_available_samples_with_http_info(user_id, transaction_id, exercise_id, opts) nil end |
#get_available_samples_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get available samples Retrieve list of links to available samples in training session
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 145 def get_available_samples_with_http_info(user_id, transaction_id, exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.get_available_samples ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.get_available_samples" end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.get_available_samples" end # verify the required parameter 'exercise_id' is set if @api_client.config.client_side_validation && exercise_id.nil? fail ArgumentError, "Missing the required parameter 'exercise_id' when calling TrainingDataApi.get_available_samples" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples'.sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'exercise-id' + '}', exercise_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#get_available_samples\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_exercise_summary(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get exercise summary Retrieve training session summary data
194 195 196 197 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 194 def get_exercise_summary(user_id, transaction_id, exercise_id, opts = {}) get_exercise_summary_with_http_info(user_id, transaction_id, exercise_id, opts) nil end |
#get_exercise_summary_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get exercise summary Retrieve training session summary data
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 206 def get_exercise_summary_with_http_info(user_id, transaction_id, exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.get_exercise_summary ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.get_exercise_summary" end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.get_exercise_summary" end # verify the required parameter 'exercise_id' is set if @api_client.config.client_side_validation && exercise_id.nil? fail ArgumentError, "Missing the required parameter 'exercise_id' when calling TrainingDataApi.get_exercise_summary" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}'.sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'exercise-id' + '}', exercise_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#get_exercise_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fit(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get FIT (beta) Retrieve exercise in FIT format. **Note!** This interface is in beta phase. If there is anything we can help you with or you want to give us feedback, please contact [Support](#support).
255 256 257 258 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 255 def get_fit(user_id, transaction_id, exercise_id, opts = {}) get_fit_with_http_info(user_id, transaction_id, exercise_id, opts) nil end |
#get_fit_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get FIT (beta) Retrieve exercise in FIT format. **Note!** This interface is in beta phase. If there is anything we can help you with or you want to give us feedback, please contact [Support](#support).
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 267 def get_fit_with_http_info(user_id, transaction_id, exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.get_fit ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.get_fit" end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.get_fit" end # verify the required parameter 'exercise_id' is set if @api_client.config.client_side_validation && exercise_id.nil? fail ArgumentError, "Missing the required parameter 'exercise_id' when calling TrainingDataApi.get_fit" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/fit'.sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'exercise-id' + '}', exercise_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#get_fit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_gpx(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get GPX Retrieve training session summary data in GPX format
317 318 319 320 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 317 def get_gpx(user_id, transaction_id, exercise_id, opts = {}) get_gpx_with_http_info(user_id, transaction_id, exercise_id, opts) nil end |
#get_gpx_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get GPX Retrieve training session summary data in GPX format
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 330 def get_gpx_with_http_info(user_id, transaction_id, exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.get_gpx ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.get_gpx" end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.get_gpx" end # verify the required parameter 'exercise_id' is set if @api_client.config.client_side_validation && exercise_id.nil? fail ArgumentError, "Missing the required parameter 'exercise_id' when calling TrainingDataApi.get_gpx" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/gpx'.sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'exercise-id' + '}', exercise_id.to_s) # query parameters query_params = {} query_params[:'includePauseTimes'] = opts[:'include_pause_times'] if !opts[:'include_pause_times'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#get_gpx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_heart_rate_zones(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get heart rate zones Retrieve heart rate zones in training session
380 381 382 383 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 380 def get_heart_rate_zones(user_id, transaction_id, exercise_id, opts = {}) get_heart_rate_zones_with_http_info(user_id, transaction_id, exercise_id, opts) nil end |
#get_heart_rate_zones_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get heart rate zones Retrieve heart rate zones in training session
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 392 def get_heart_rate_zones_with_http_info(user_id, transaction_id, exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.get_heart_rate_zones ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.get_heart_rate_zones" end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.get_heart_rate_zones" end # verify the required parameter 'exercise_id' is set if @api_client.config.client_side_validation && exercise_id.nil? fail ArgumentError, "Missing the required parameter 'exercise_id' when calling TrainingDataApi.get_heart_rate_zones" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/heart-rate-zones'.sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'exercise-id' + '}', exercise_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#get_heart_rate_zones\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_samples(type_id, user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get samples Retrieve sample data of given type
442 443 444 445 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 442 def get_samples(type_id, user_id, transaction_id, exercise_id, opts = {}) get_samples_with_http_info(type_id, user_id, transaction_id, exercise_id, opts) nil end |
#get_samples_with_http_info(type_id, user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get samples Retrieve sample data of given type
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 455 def get_samples_with_http_info(type_id, user_id, transaction_id, exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.get_samples ...' end # verify the required parameter 'type_id' is set if @api_client.config.client_side_validation && type_id.nil? fail ArgumentError, "Missing the required parameter 'type_id' when calling TrainingDataApi.get_samples" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.get_samples" end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.get_samples" end # verify the required parameter 'exercise_id' is set if @api_client.config.client_side_validation && exercise_id.nil? fail ArgumentError, "Missing the required parameter 'exercise_id' when calling TrainingDataApi.get_samples" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/samples/{type-id}'.sub('{' + 'type-id' + '}', type_id.to_s).sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'exercise-id' + '}', exercise_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#get_samples\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tcx(user_id, transaction_id, exercise_id, opts = {}) ⇒ nil
Get TCX Retrieve exercise in TCX format
508 509 510 511 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 508 def get_tcx(user_id, transaction_id, exercise_id, opts = {}) get_tcx_with_http_info(user_id, transaction_id, exercise_id, opts) nil end |
#get_tcx_with_http_info(user_id, transaction_id, exercise_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get TCX Retrieve exercise in TCX format
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 520 def get_tcx_with_http_info(user_id, transaction_id, exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.get_tcx ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.get_tcx" end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.get_tcx" end # verify the required parameter 'exercise_id' is set if @api_client.config.client_side_validation && exercise_id.nil? fail ArgumentError, "Missing the required parameter 'exercise_id' when calling TrainingDataApi.get_tcx" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}/exercises/{exercise-id}/tcx'.sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'exercise-id' + '}', exercise_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#get_tcx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_exercises(transaction_id, user_id, opts = {}) ⇒ nil
List exercises After successfully initiating a transaction, training sessions included within it can be retrieved with the provided transactionId.
568 569 570 571 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 568 def list_exercises(transaction_id, user_id, opts = {}) list_exercises_with_http_info(transaction_id, user_id, opts) nil end |
#list_exercises_with_http_info(transaction_id, user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
List exercises After successfully initiating a transaction, training sessions included within it can be retrieved with the provided transactionId.
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/polar_accesslink/api/training_data_api.rb', line 579 def list_exercises_with_http_info(transaction_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrainingDataApi.list_exercises ...' end # verify the required parameter 'transaction_id' is set if @api_client.config.client_side_validation && transaction_id.nil? fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TrainingDataApi.list_exercises" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TrainingDataApi.list_exercises" end # resource path local_var_path = '/v3/users/{user-id}/exercise-transactions/{transaction-id}'.sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'user-id' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TrainingDataApi#list_exercises\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |