lib/cloudsmith-api/api/files_api.rb in cloudsmith-api-1.30.0 vs lib/cloudsmith-api/api/files_api.rb in cloudsmith-api-1.33.7

- old
+ new

@@ -4,35 +4,34 @@ #The API to the Cloudsmith Service OpenAPI spec version: v1 Contact: support@cloudsmith.io Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.2.3 +Swagger Codegen version: 2.4.26 =end -require "uri" +require 'uri' module CloudsmithApi class FilesApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end - # Abort a multipart file upload. # Abort a multipart file upload. # @param owner # @param repo # @param identifier # @param [Hash] opts the optional parameters # @option opts [FilesAbort] :data # @return [nil] def files_abort(owner, repo, identifier, opts = {}) files_abort_with_http_info(owner, repo, identifier, opts) - return nil + nil end # Abort a multipart file upload. # Abort a multipart file upload. # @param owner @@ -41,11 +40,11 @@ # @param [Hash] opts the optional parameters # @option opts [FilesAbort] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def files_abort_with_http_info(owner, repo, identifier, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: FilesApi.files_abort ..." + @api_client.config.logger.debug 'Calling API: FilesApi.files_abort ...' end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling FilesApi.files_abort" end @@ -56,11 +55,11 @@ # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling FilesApi.files_abort" end # resource path - local_var_path = "/files/{owner}/{repo}/{identifier}/abort/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) + local_var_path = '/files/{owner}/{repo}/{identifier}/abort/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters @@ -83,22 +82,21 @@ if @api_client.config.debugging @api_client.config.logger.debug "API called: FilesApi#files_abort\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Complete a multipart file upload. # Complete a multipart file upload. # @param owner # @param repo # @param identifier # @param [Hash] opts the optional parameters # @option opts [FilesComplete] :data # @return [PackageFileUpload] def files_complete(owner, repo, identifier, opts = {}) data, _status_code, _headers = files_complete_with_http_info(owner, repo, identifier, opts) - return data + data end # Complete a multipart file upload. # Complete a multipart file upload. # @param owner @@ -107,11 +105,11 @@ # @param [Hash] opts the optional parameters # @option opts [FilesComplete] :data # @return [Array<(PackageFileUpload, Fixnum, Hash)>] PackageFileUpload data, response status code and response headers def files_complete_with_http_info(owner, repo, identifier, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: FilesApi.files_complete ..." + @api_client.config.logger.debug 'Calling API: FilesApi.files_complete ...' end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling FilesApi.files_complete" end @@ -122,11 +120,11 @@ # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling FilesApi.files_complete" end # resource path - local_var_path = "/files/{owner}/{repo}/{identifier}/complete/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) + local_var_path = '/files/{owner}/{repo}/{identifier}/complete/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters @@ -150,21 +148,20 @@ if @api_client.config.debugging @api_client.config.logger.debug "API called: FilesApi#files_complete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Request URL(s) to upload new package file upload(s) to. # Request URL(s) to upload new package file upload(s) to. # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [FilesCreate] :data # @return [PackageFileUpload] def files_create(owner, repo, opts = {}) data, _status_code, _headers = files_create_with_http_info(owner, repo, opts) - return data + data end # Request URL(s) to upload new package file upload(s) to. # Request URL(s) to upload new package file upload(s) to. # @param owner @@ -172,22 +169,22 @@ # @param [Hash] opts the optional parameters # @option opts [FilesCreate] :data # @return [Array<(PackageFileUpload, Fixnum, Hash)>] PackageFileUpload data, response status code and response headers def files_create_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: FilesApi.files_create ..." + @api_client.config.logger.debug 'Calling API: FilesApi.files_create ...' end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling FilesApi.files_create" end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling FilesApi.files_create" end # resource path - local_var_path = "/files/{owner}/{repo}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + local_var_path = '/files/{owner}/{repo}/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) # query parameters query_params = {} # header parameters @@ -211,21 +208,20 @@ if @api_client.config.debugging @api_client.config.logger.debug "API called: FilesApi#files_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get upload information for a multipart file upload. # Get upload information for a multipart file upload. # @param owner # @param repo # @param identifier # @param [Hash] opts the optional parameters # @return [PackageFilePartsUpload] def files_info(owner, repo, identifier, opts = {}) data, _status_code, _headers = files_info_with_http_info(owner, repo, identifier, opts) - return data + data end # Get upload information for a multipart file upload. # Get upload information for a multipart file upload. # @param owner @@ -233,11 +229,11 @@ # @param identifier # @param [Hash] opts the optional parameters # @return [Array<(PackageFilePartsUpload, Fixnum, Hash)>] PackageFilePartsUpload data, response status code and response headers def files_info_with_http_info(owner, repo, identifier, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: FilesApi.files_info ..." + @api_client.config.logger.debug 'Calling API: FilesApi.files_info ...' end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling FilesApi.files_info" end @@ -248,11 +244,11 @@ # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling FilesApi.files_info" end # resource path - local_var_path = "/files/{owner}/{repo}/{identifier}/info/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) + local_var_path = '/files/{owner}/{repo}/{identifier}/info/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters @@ -274,21 +270,20 @@ if @api_client.config.debugging @api_client.config.logger.debug "API called: FilesApi#files_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Validate parameters used for create. # Validate parameters used for create. # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [FilesValidate] :data # @return [nil] def files_validate(owner, repo, opts = {}) files_validate_with_http_info(owner, repo, opts) - return nil + nil end # Validate parameters used for create. # Validate parameters used for create. # @param owner @@ -296,21 +291,21 @@ # @param [Hash] opts the optional parameters # @option opts [FilesValidate] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def files_validate_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: FilesApi.files_validate ..." + @api_client.config.logger.debug 'Calling API: FilesApi.files_validate ...' end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling FilesApi.files_validate" end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling FilesApi.files_validate" end # resource path - local_var_path = "/files/{owner}/{repo}/validate/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + local_var_path = '/files/{owner}/{repo}/validate/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) # query parameters query_params = {} # header parameters