class PolarAccesslinkApiGem::ExercisesApi
Attributes
Public Class Methods
# File lib/polar-accesslink-api-gem/api/exercises_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get exercise FIT FIT file for users exercise. @param exercise_id [String] Hashed exercise id. @param [Hash] opts the optional parameters @return [String]
# File lib/polar-accesslink-api-gem/api/exercises_api.rb, line 27 def get_exercise_fit_without_transaction(exercise_id, opts = {}) data, _status_code, _headers = get_exercise_fit_without_transaction_with_http_info(exercise_id, opts) data end
Get exercise FIT FIT file for users exercise. @param exercise_id [String] Hashed exercise id. @param [Hash] opts the optional parameters @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
# File lib/polar-accesslink-api-gem/api/exercises_api.rb, line 37 def get_exercise_fit_without_transaction_with_http_info(exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExercisesApi.get_exercise_fit_without_transaction ...' 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 ExercisesApi.get_exercise_fit_without_transaction" end # resource path local_var_path = '/v3/exercises/{exerciseId}/fit'.sub('{' + 'exerciseId' + '}', CGI.escape(exercise_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ExercisesApi.get_exercise_fit_without_transaction", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExercisesApi#get_exercise_fit_without_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get exercise Get users exercise using hashed id. @param exercise_id [String] Hashed exercise id. @param [Hash] opts the optional parameters @return [ExerciseHashId]
# File lib/polar-accesslink-api-gem/api/exercises_api.rb, line 90 def get_exercise_without_transaction(exercise_id, opts = {}) data, _status_code, _headers = get_exercise_without_transaction_with_http_info(exercise_id, opts) data end
Get exercise Get users exercise using hashed id. @param exercise_id [String] Hashed exercise id. @param [Hash] opts the optional parameters @return [Array<(ExerciseHashId
, Integer, Hash)>] ExerciseHashId
data, response status code and response headers
# File lib/polar-accesslink-api-gem/api/exercises_api.rb, line 100 def get_exercise_without_transaction_with_http_info(exercise_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExercisesApi.get_exercise_without_transaction ...' 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 ExercisesApi.get_exercise_without_transaction" end # resource path local_var_path = '/v3/exercises/{exerciseId}'.sub('{' + 'exerciseId' + '}', CGI.escape(exercise_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExerciseHashId' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ExercisesApi.get_exercise_without_transaction", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExercisesApi#get_exercise_without_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List exercises List users exercises available in Accesslink. @param [Hash] opts the optional parameters @return [Array<ExerciseHashId>]
# File lib/polar-accesslink-api-gem/api/exercises_api.rb, line 152 def list_exercises_without_transaction(opts = {}) data, _status_code, _headers = list_exercises_without_transaction_with_http_info(opts) data end
List exercises List users exercises available in Accesslink. @param [Hash] opts the optional parameters @return [Array<(Array<ExerciseHashId>, Integer, Hash)>] Array<ExerciseHashId> data, response status code and response headers
# File lib/polar-accesslink-api-gem/api/exercises_api.rb, line 161 def list_exercises_without_transaction_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExercisesApi.list_exercises_without_transaction ...' end # resource path local_var_path = '/v3/exercises' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ExerciseHashId>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ExercisesApi.list_exercises_without_transaction", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExercisesApi#list_exercises_without_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end