lib/moonlogs-ruby/api/default_api.rb in moonlogs-ruby-1.0.4 vs lib/moonlogs-ruby/api/default_api.rb in moonlogs-ruby-1.1.0

- old
+ new

@@ -1,11 +1,11 @@ =begin #Moonlogs #Moonlogs API -OpenAPI spec version: 1.0.4 +OpenAPI spec version: 1.1.0 Contact: shalpack@gmail.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 3.0.52 =end @@ -61,9 +61,59 @@ :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # @param [Hash] opts the optional parameters + # @option opts [RecordRequest] :body + # @return [InlineResponse20014] + def create_log_async(opts = {}) + data, _status_code, _headers = create_log_async_with_http_info(opts) + data + end + + # @param [Hash] opts the optional parameters + # @option opts [RecordRequest] :body + # @return [Array<(InlineResponse20014, Integer, Hash)>] InlineResponse20014 data, response status code and response headers + def create_log_async_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.create_log_async ...' + end + # resource path + local_var_path = '/api/logs/async' + + # 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']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) + + return_type = opts[:return_type] || 'InlineResponse20014' + + auth_names = opts[:auth_names] || ['http1'] + 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, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_log_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # @param [Hash] opts the optional parameters # @option opts [SchemaRequest] :body