=begin #Cloudsmith API #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 =end require "uri" module CloudsmithApi class PackagesApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete a specific package in a repository. # Delete a specific package in a repository. # @param owner # @param repo # @param slug # @param [Hash] opts the optional parameters # @return [nil] def packages_delete(owner, repo, slug, opts = {}) packages_delete_with_http_info(owner, repo, slug, opts) return nil end # Delete a specific package in a repository. # Delete a specific package in a repository. # @param owner # @param repo # @param slug # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_delete_with_http_info(owner, repo, slug, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_delete ..." 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_delete" 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_delete" end # verify the required parameter 'slug' is set if @api_client.config.client_side_validation && slug.nil? fail ArgumentError, "Missing the required parameter 'slug' when calling PackagesApi.packages_delete" end # resource path local_var_path = "/packages/{owner}/{repo}/{slug}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'slug' + '}', slug.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey', 'basic', 'csrf_token'] data, status_code, headers = @api_client.call_api(:DELETE, 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_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Views for working with repository packages. # Views for working with repository packages. # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def packages_list(owner, repo, opts = {}) data, _status_code, _headers = packages_list_with_http_info(owner, repo, opts) return data end # Views for working with repository packages. # Views for working with repository packages. # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def packages_list_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_list ..." 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_list" 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_list" end # resource path local_var_path = "/packages/{owner}/{repo}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey', 'basic', 'csrf_token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a specific package in a repository. # Get a specific package in a repository. # @param owner # @param repo # @param slug # @param [Hash] opts the optional parameters # @return [RpmPackageUpload] def packages_read(owner, repo, slug, opts = {}) data, _status_code, _headers = packages_read_with_http_info(owner, repo, slug, opts) return data end # Get a specific package in a repository. # Get a specific package in a repository. # @param owner # @param repo # @param slug # @param [Hash] opts the optional parameters # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers def packages_read_with_http_info(owner, repo, slug, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_read ..." 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_read" 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_read" end # verify the required parameter 'slug' is set if @api_client.config.client_side_validation && slug.nil? fail ArgumentError, "Missing the required parameter 'slug' when calling PackagesApi.packages_read" end # resource path local_var_path = "/packages/{owner}/{repo}/{slug}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'slug' + '}', slug.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey', 'basic', 'csrf_token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RpmPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the synchronisation status for a package. # Get the synchronisation status for a package. # @param owner # @param repo # @param slug # @param [Hash] opts the optional parameters # @return [PackageStatus] def packages_status(owner, repo, slug, opts = {}) data, _status_code, _headers = packages_status_with_http_info(owner, repo, slug, opts) return data end # Get the synchronisation status for a package. # Get the synchronisation status for a package. # @param owner # @param repo # @param slug # @param [Hash] opts the optional parameters # @return [Array<(PackageStatus, Fixnum, Hash)>] PackageStatus data, response status code and response headers def packages_status_with_http_info(owner, repo, slug, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_status ..." 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_status" 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_status" end # verify the required parameter 'slug' is set if @api_client.config.client_side_validation && slug.nil? fail ArgumentError, "Missing the required parameter 'slug' when calling PackagesApi.packages_status" end # resource path local_var_path = "/packages/{owner}/{repo}/{slug}/status/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'slug' + '}', slug.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey', 'basic', 'csrf_token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_status\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 # @option opts [PackagesUploadDeb] :data # @return [RpmPackageUpload] def packages_upload_deb(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_deb_with_http_info(owner, repo, opts) return data end # Create a new Debian package # Create a new Debian package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadDeb] :data # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers def packages_upload_deb_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_deb ..." 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_deb" 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_deb" end # resource path local_var_path = "/packages/{owner}/{repo}/upload/deb/".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', 'basic', '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 => 'RpmPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_deb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Maven package # Create a new Maven package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadMaven] :data # @return [MavenPackageUpload] def packages_upload_maven(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_maven_with_http_info(owner, repo, opts) return data end # Create a new Maven package # Create a new Maven package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadMaven] :data # @return [Array<(MavenPackageUpload, Fixnum, Hash)>] MavenPackageUpload data, response status code and response headers def packages_upload_maven_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_maven ..." 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_maven" 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_maven" end # resource path local_var_path = "/packages/{owner}/{repo}/upload/maven/".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', 'basic', '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 => 'MavenPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_maven\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Python package # Create a new Python package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadPython] :data # @return [RpmPackageUpload] def packages_upload_python(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_python_with_http_info(owner, repo, opts) return data end # Create a new Python package # Create a new Python package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadPython] :data # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers def packages_upload_python_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_python ..." 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_python" 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_python" end # resource path local_var_path = "/packages/{owner}/{repo}/upload/python/".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', 'basic', '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 => 'RpmPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_python\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Raw package # Create a new Raw package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRaw] :data # @return [RpmPackageUpload] def packages_upload_raw(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_raw_with_http_info(owner, repo, opts) return data end # Create a new Raw package # Create a new Raw package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRaw] :data # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers def packages_upload_raw_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_raw ..." 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_raw" 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_raw" end # resource path local_var_path = "/packages/{owner}/{repo}/upload/raw/".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', 'basic', '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 => 'RpmPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_raw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new RedHat package # Create a new RedHat package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRpm] :data # @return [RpmPackageUpload] def packages_upload_rpm(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_rpm_with_http_info(owner, repo, opts) return data end # Create a new RedHat package # Create a new RedHat package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRpm] :data # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers def packages_upload_rpm_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_rpm ..." 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_rpm" 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_rpm" end # resource path local_var_path = "/packages/{owner}/{repo}/upload/rpm/".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', 'basic', '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 => 'RpmPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_rpm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Ruby package # Create a new Ruby package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRuby] :data # @return [RpmPackageUpload] def packages_upload_ruby(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_ruby_with_http_info(owner, repo, opts) return data end # Create a new Ruby package # Create a new Ruby package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRuby] :data # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers def packages_upload_ruby_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_ruby ..." 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_ruby" 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_ruby" end # resource path local_var_path = "/packages/{owner}/{repo}/upload/ruby/".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', 'basic', '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 => 'RpmPackageUpload') 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 Vagrant package # Create a new Vagrant package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadVagrant] :data # @return [VagrantPackageUpload] def packages_upload_vagrant(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_vagrant_with_http_info(owner, repo, opts) return data end # Create a new Vagrant package # Create a new Vagrant package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadVagrant] :data # @return [Array<(VagrantPackageUpload, Fixnum, Hash)>] VagrantPackageUpload data, response status code and response headers def packages_upload_vagrant_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_vagrant ..." 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_vagrant" 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_vagrant" end # resource path local_var_path = "/packages/{owner}/{repo}/upload/vagrant/".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', 'basic', '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 => 'VagrantPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_vagrant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Debian package # Validate parameters for create Debian package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadDeb] :data # @return [nil] def packages_validate_upload_deb(owner, repo, opts = {}) packages_validate_upload_deb_with_http_info(owner, repo, opts) return nil end # Validate parameters for create Debian package # Validate parameters for create Debian package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadDeb] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_validate_upload_deb_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_deb ..." 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_deb" 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_deb" end # resource path local_var_path = "/packages/{owner}/{repo}/validate-upload/deb/".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', 'basic', '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_deb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Maven package # Validate parameters for create Maven package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadMaven] :data # @return [nil] def packages_validate_upload_maven(owner, repo, opts = {}) packages_validate_upload_maven_with_http_info(owner, repo, opts) return nil end # Validate parameters for create Maven package # Validate parameters for create Maven package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadMaven] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_validate_upload_maven_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_maven ..." 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_maven" 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_maven" end # resource path local_var_path = "/packages/{owner}/{repo}/validate-upload/maven/".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', 'basic', '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_maven\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Python package # Validate parameters for create Python package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadPython] :data # @return [nil] def packages_validate_upload_python(owner, repo, opts = {}) packages_validate_upload_python_with_http_info(owner, repo, opts) return nil end # Validate parameters for create Python package # Validate parameters for create Python package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadPython] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_validate_upload_python_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_python ..." 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_python" 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_python" end # resource path local_var_path = "/packages/{owner}/{repo}/validate-upload/python/".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', 'basic', '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_python\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Raw package # Validate parameters for create Raw package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadRaw] :data # @return [nil] def packages_validate_upload_raw(owner, repo, opts = {}) packages_validate_upload_raw_with_http_info(owner, repo, opts) return nil end # Validate parameters for create Raw package # Validate parameters for create Raw package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadRaw] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_validate_upload_raw_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_raw ..." 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_raw" 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_raw" end # resource path local_var_path = "/packages/{owner}/{repo}/validate-upload/raw/".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', 'basic', '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_raw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create RedHat package # Validate parameters for create RedHat package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadRpm] :data # @return [nil] def packages_validate_upload_rpm(owner, repo, opts = {}) packages_validate_upload_rpm_with_http_info(owner, repo, opts) return nil end # Validate parameters for create RedHat package # Validate parameters for create RedHat package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadRpm] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_validate_upload_rpm_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_rpm ..." 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_rpm" 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_rpm" end # resource path local_var_path = "/packages/{owner}/{repo}/validate-upload/rpm/".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', 'basic', '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_rpm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Ruby package # Validate parameters for create Ruby package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadRuby] :data # @return [nil] def packages_validate_upload_ruby(owner, repo, opts = {}) packages_validate_upload_ruby_with_http_info(owner, repo, opts) return nil end # Validate parameters for create Ruby package # Validate parameters for create Ruby package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadRuby] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_validate_upload_ruby_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_ruby ..." 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_ruby" 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_ruby" end # resource path local_var_path = "/packages/{owner}/{repo}/validate-upload/ruby/".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', 'basic', '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_ruby\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Vagrant package # Validate parameters for create Vagrant package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadVagrant] :data # @return [nil] def packages_validate_upload_vagrant(owner, repo, opts = {}) packages_validate_upload_vagrant_with_http_info(owner, repo, opts) return nil end # Validate parameters for create Vagrant package # Validate parameters for create Vagrant package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesValidateuploadVagrant] :data # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def packages_validate_upload_vagrant_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_vagrant ..." 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_vagrant" 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_vagrant" end # resource path local_var_path = "/packages/{owner}/{repo}/validate-upload/vagrant/".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', 'basic', '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_vagrant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end