lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-2.0.3 vs lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-2.0.4
- old
+ new
@@ -2120,10 +2120,72 @@
if @api_client.config.debugging
@api_client.config.logger.debug "API called: PackagesApi#packages_upload_ruby\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # Create a new Swift package
+ # Create a new Swift package
+ # @param owner
+ # @param repo
+ # @param [Hash] opts the optional parameters
+ # @option opts [SwiftPackageUploadRequest] :data
+ # @return [SwiftPackageUpload]
+ def packages_upload_swift(owner, repo, opts = {})
+ data, _status_code, _headers = packages_upload_swift_with_http_info(owner, repo, opts)
+ data
+ end
+
+ # Create a new Swift package
+ # Create a new Swift package
+ # @param owner
+ # @param repo
+ # @param [Hash] opts the optional parameters
+ # @option opts [SwiftPackageUploadRequest] :data
+ # @return [Array<(SwiftPackageUpload, Fixnum, Hash)>] SwiftPackageUpload data, response status code and response headers
+ def packages_upload_swift_with_http_info(owner, repo, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PackagesApi.packages_upload_swift ...'
+ 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 PackagesApi.packages_upload_swift"
+ 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 PackagesApi.packages_upload_swift"
+ end
+ # resource path
+ local_var_path = '/packages/{owner}/{repo}/upload/swift/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ 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 = {}
+
+ # http body (model)
+ post_body = @api_client.object_to_http_body(opts[:'data'])
+ auth_names = ['apikey']
+ 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 => 'SwiftPackageUpload')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PackagesApi#packages_upload_swift\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
# Create a new Terraform package
# Create a new Terraform package
# @param owner
# @param repo
# @param [Hash] opts the optional parameters
@@ -3583,9 +3645,70 @@
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: PackagesApi#packages_validate_upload_ruby\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ # Validate parameters for create Swift package
+ # Validate parameters for create Swift package
+ # @param owner
+ # @param repo
+ # @param [Hash] opts the optional parameters
+ # @option opts [SwiftPackageUploadRequest] :data
+ # @return [nil]
+ def packages_validate_upload_swift(owner, repo, opts = {})
+ packages_validate_upload_swift_with_http_info(owner, repo, opts)
+ nil
+ end
+
+ # Validate parameters for create Swift package
+ # Validate parameters for create Swift package
+ # @param owner
+ # @param repo
+ # @param [Hash] opts the optional parameters
+ # @option opts [SwiftPackageUploadRequest] :data
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
+ def packages_validate_upload_swift_with_http_info(owner, repo, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PackagesApi.packages_validate_upload_swift ...'
+ 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 PackagesApi.packages_validate_upload_swift"
+ 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 PackagesApi.packages_validate_upload_swift"
+ end
+ # resource path
+ local_var_path = '/packages/{owner}/{repo}/validate-upload/swift/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ 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 = {}
+
+ # http body (model)
+ post_body = @api_client.object_to_http_body(opts[:'data'])
+ auth_names = ['apikey']
+ 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: PackagesApi#packages_validate_upload_swift\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Validate parameters for create Terraform package
# Validate parameters for create Terraform package