lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-0.53.79 vs lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-0.54.15

- old
+ new

@@ -349,10 +349,11 @@ # Schedule a package for resynchronisation. # @param owner # @param repo # @param identifier # @param [Hash] opts the optional parameters + # @option opts [PackagesResync] :data # @return [Package] def packages_resync(owner, repo, identifier, opts = {}) data, _status_code, _headers = packages_resync_with_http_info(owner, repo, identifier, opts) return data end @@ -361,10 +362,11 @@ # Schedule a package for resynchronisation. # @param owner # @param repo # @param identifier # @param [Hash] opts the optional parameters + # @option opts [PackagesResync] :data # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers def packages_resync_with_http_info(owner, repo, identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_resync ..." end @@ -386,25 +388,94 @@ # 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 = nil + 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 => 'Package') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_resync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Schedule a package for scanning. + # Schedule a package for scanning. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @option opts [PackagesScan] :data + # @return [Package] + def packages_scan(owner, repo, identifier, opts = {}) + data, _status_code, _headers = packages_scan_with_http_info(owner, repo, identifier, opts) + return data + end + + # Schedule a package for scanning. + # Schedule a package for scanning. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @option opts [PackagesScan] :data + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers + def packages_scan_with_http_info(owner, repo, identifier, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_scan ..." + 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_scan" + 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_scan" + end + # 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 PackagesApi.packages_scan" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/{identifier}/scan/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.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'] + 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_scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the synchronisation status for a package.