lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-0.44.4 vs lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-0.49.9

- old
+ new

@@ -595,10 +595,71 @@ @api_client.config.logger.debug "API called: PackagesApi#packages_upload_cargo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Create a new CocoaPods package + # Create a new CocoaPods package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesUploadCocoapods] :data + # @return [Package] + def packages_upload_cocoapods(owner, repo, opts = {}) + data, _status_code, _headers = packages_upload_cocoapods_with_http_info(owner, repo, opts) + return data + end + + # Create a new CocoaPods package + # Create a new CocoaPods package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesUploadCocoapods] :data + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers + def packages_upload_cocoapods_with_http_info(owner, repo, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_cocoapods ..." + 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_cocoapods" + 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_cocoapods" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/upload/cocoapods/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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', 'csrf_token'] + 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 => 'Package') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PackagesApi#packages_upload_cocoapods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a new Composer package # Create a new Composer package # @param owner # @param repo # @param [Hash] opts the optional parameters @@ -717,10 +778,71 @@ @api_client.config.logger.debug "API called: PackagesApi#packages_upload_cran\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Create a new Dart package + # Create a new Dart package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesUploadDart] :data + # @return [Package] + def packages_upload_dart(owner, repo, opts = {}) + data, _status_code, _headers = packages_upload_dart_with_http_info(owner, repo, opts) + return data + end + + # Create a new Dart package + # Create a new Dart package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesUploadDart] :data + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers + def packages_upload_dart_with_http_info(owner, repo, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_dart ..." + 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_dart" + 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_dart" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/upload/dart/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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', 'csrf_token'] + 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 => 'Package') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PackagesApi#packages_upload_dart\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a new Debian package # Create a new Debian package # @param owner # @param repo # @param [Hash] opts the optional parameters @@ -1630,10 +1752,70 @@ @api_client.config.logger.debug "API called: PackagesApi#packages_validate_upload_cargo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Validate parameters for create CocoaPods package + # Validate parameters for create CocoaPods package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesValidateuploadCocoapods] :data + # @return [nil] + def packages_validate_upload_cocoapods(owner, repo, opts = {}) + packages_validate_upload_cocoapods_with_http_info(owner, repo, opts) + return nil + end + + # Validate parameters for create CocoaPods package + # Validate parameters for create CocoaPods package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesValidateuploadCocoapods] :data + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def packages_validate_upload_cocoapods_with_http_info(owner, repo, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_cocoapods ..." + 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_cocoapods" + 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_cocoapods" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/validate-upload/cocoapods/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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', 'csrf_token'] + 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_cocoapods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Validate parameters for create Composer package # Validate parameters for create Composer package # @param owner # @param repo # @param [Hash] opts the optional parameters @@ -1746,9 +1928,69 @@ :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_cran\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Validate parameters for create Dart package + # Validate parameters for create Dart package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesValidateuploadDart] :data + # @return [nil] + def packages_validate_upload_dart(owner, repo, opts = {}) + packages_validate_upload_dart_with_http_info(owner, repo, opts) + return nil + end + + # Validate parameters for create Dart package + # Validate parameters for create Dart package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesValidateuploadDart] :data + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def packages_validate_upload_dart_with_http_info(owner, repo, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_dart ..." + 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_dart" + 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_dart" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/validate-upload/dart/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # 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', 'csrf_token'] + 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_dart\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Debian package