class DependencyTracker::ProjectPropertyApi
Attributes
Public Class Methods
# File lib/dependency-tracker-client/api/project_property_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Creates a new project property @param uuid [String] The UUID of the project to create a property for @param [Hash] opts the optional parameters @option opts [ProjectProperty] :body @return [ProjectProperty]
# File lib/dependency-tracker-client/api/project_property_api.rb, line 27 def create_property(uuid, opts = {}) data, _status_code, _headers = create_property_with_http_info(uuid, opts) data end
Creates a new project property @param uuid [String] The UUID of the project to create a property for @param [Hash] opts the optional parameters @option opts [ProjectProperty] :body @return [Array<(ProjectProperty
, Integer, Hash)>] ProjectProperty
data, response status code and response headers
# File lib/dependency-tracker-client/api/project_property_api.rb, line 37 def create_property_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectPropertyApi.create_property ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling ProjectPropertyApi.create_property" end # resource path local_var_path = '/v1/project/{uuid}/property'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[: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 = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'ProjectProperty' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectPropertyApi#create_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a config property @param uuid [String] The UUID of the project to delete a property from @param [Hash] opts the optional parameters @option opts [ProjectProperty] :body @return [ProjectProperty]
# File lib/dependency-tracker-client/api/project_property_api.rb, line 91 def delete_property(uuid, opts = {}) data, _status_code, _headers = delete_property_with_http_info(uuid, opts) data end
Deletes a config property @param uuid [String] The UUID of the project to delete a property from @param [Hash] opts the optional parameters @option opts [ProjectProperty] :body @return [Array<(ProjectProperty
, Integer, Hash)>] ProjectProperty
data, response status code and response headers
# File lib/dependency-tracker-client/api/project_property_api.rb, line 101 def delete_property_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectPropertyApi.delete_property ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling ProjectPropertyApi.delete_property" end # resource path local_var_path = '/v1/project/{uuid}/property'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[: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 = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'ProjectProperty' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectPropertyApi#delete_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of all ProjectProperties for the specified project @param uuid [String] The UUID of the project to retrieve properties for @param [Hash] opts the optional parameters @return [Array<ProjectProperty>]
# File lib/dependency-tracker-client/api/project_property_api.rb, line 154 def get_properties(uuid, opts = {}) data, _status_code, _headers = get_properties_with_http_info(uuid, opts) data end
Returns a list of all ProjectProperties for the specified project @param uuid [String] The UUID of the project to retrieve properties for @param [Hash] opts the optional parameters @return [Array<(Array<ProjectProperty>, Integer, Hash)>] Array<ProjectProperty> data, response status code and response headers
# File lib/dependency-tracker-client/api/project_property_api.rb, line 163 def get_properties_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectPropertyApi.get_properties ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling ProjectPropertyApi.get_properties" end # resource path local_var_path = '/v1/project/{uuid}/property'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<ProjectProperty>' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectPropertyApi#get_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a project property @param uuid [String] The UUID of the project to create a property for @param [Hash] opts the optional parameters @option opts [ProjectProperty] :body @return [ProjectProperty]
# File lib/dependency-tracker-client/api/project_property_api.rb, line 215 def update_property(uuid, opts = {}) data, _status_code, _headers = update_property_with_http_info(uuid, opts) data end
Updates a project property @param uuid [String] The UUID of the project to create a property for @param [Hash] opts the optional parameters @option opts [ProjectProperty] :body @return [Array<(ProjectProperty
, Integer, Hash)>] ProjectProperty
data, response status code and response headers
# File lib/dependency-tracker-client/api/project_property_api.rb, line 225 def update_property_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectPropertyApi.update_property ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling ProjectPropertyApi.update_property" end # resource path local_var_path = '/v1/project/{uuid}/property'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[: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 = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'ProjectProperty' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectPropertyApi#update_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end