class DependencyTracker::MetricsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/dependency-tracker-client/api/metrics_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_component_current_metrics(uuid, opts = {}) click to toggle source

Returns current metrics for a specific component @param uuid [String] The UUID of the component to retrieve metrics for @param [Hash] opts the optional parameters @return [ComponentMetrics]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 26
def get_component_current_metrics(uuid, opts = {})
  data, _status_code, _headers = get_component_current_metrics_with_http_info(uuid, opts)
  data
end
get_component_current_metrics_with_http_info(uuid, opts = {}) click to toggle source

Returns current metrics for a specific component @param uuid [String] The UUID of the component to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(ComponentMetrics, Integer, Hash)>] ComponentMetrics data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 35
def get_component_current_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_component_current_metrics ...'
  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 MetricsApi.get_component_current_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/current'.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] || 'ComponentMetrics' 

  # 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: MetricsApi#get_component_current_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_component_metrics_since(uuid, date, opts = {}) click to toggle source

Returns historical metrics for a specific component from a specific date Date format must be YYYYMMDD @param uuid [String] The UUID of the component to retrieve metrics for @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<ComponentMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 88
def get_component_metrics_since(uuid, date, opts = {})
  data, _status_code, _headers = get_component_metrics_since_with_http_info(uuid, date, opts)
  data
end
get_component_metrics_since_with_http_info(uuid, date, opts = {}) click to toggle source

Returns historical metrics for a specific component from a specific date Date format must be YYYYMMDD @param uuid [String] The UUID of the component to retrieve metrics for @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<ComponentMetrics>, Integer, Hash)>] Array<ComponentMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 99
def get_component_metrics_since_with_http_info(uuid, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_component_metrics_since ...'
  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 MetricsApi.get_component_metrics_since"
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_component_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/since/{date}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'date' + '}', CGI.escape(date.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<ComponentMetrics>' 

  # 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: MetricsApi#get_component_metrics_since\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_component_metrics_x_days(uuid, days, opts = {}) click to toggle source

Returns X days of historical metrics for a specific component @param uuid [String] The UUID of the component to retrieve metrics for @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<ComponentMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 155
def get_component_metrics_x_days(uuid, days, opts = {})
  data, _status_code, _headers = get_component_metrics_x_days_with_http_info(uuid, days, opts)
  data
end
get_component_metrics_x_days_with_http_info(uuid, days, opts = {}) click to toggle source

Returns X days of historical metrics for a specific component @param uuid [String] The UUID of the component to retrieve metrics for @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<ComponentMetrics>, Integer, Hash)>] Array<ComponentMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 165
def get_component_metrics_x_days_with_http_info(uuid, days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_component_metrics_x_days ...'
  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 MetricsApi.get_component_metrics_x_days"
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_component_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/days/{days}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'days' + '}', CGI.escape(days.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<ComponentMetrics>' 

  # 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: MetricsApi#get_component_metrics_x_days\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_dependency_current_metrics(project_uuid, component_uuid, opts = {}) click to toggle source

Returns current metrics for a specific dependency @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param [Hash] opts the optional parameters @return [DependencyMetrics]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 221
def get_dependency_current_metrics(project_uuid, component_uuid, opts = {})
  data, _status_code, _headers = get_dependency_current_metrics_with_http_info(project_uuid, component_uuid, opts)
  data
end
get_dependency_current_metrics_with_http_info(project_uuid, component_uuid, opts = {}) click to toggle source

Returns current metrics for a specific dependency @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(DependencyMetrics, Integer, Hash)>] DependencyMetrics data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 231
def get_dependency_current_metrics_with_http_info(project_uuid, component_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_dependency_current_metrics ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.get_dependency_current_metrics"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.get_dependency_current_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/current'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_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] || 'DependencyMetrics' 

  # 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: MetricsApi#get_dependency_current_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_dependency_metrics_since(project_uuid, component_uuid, date, opts = {}) click to toggle source

Returns historical metrics for a specific dependency from a specific date Date format must be YYYYMMDD @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<DependencyMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 289
def get_dependency_metrics_since(project_uuid, component_uuid, date, opts = {})
  data, _status_code, _headers = get_dependency_metrics_since_with_http_info(project_uuid, component_uuid, date, opts)
  data
end
get_dependency_metrics_since_with_http_info(project_uuid, component_uuid, date, opts = {}) click to toggle source

Returns historical metrics for a specific dependency from a specific date Date format must be YYYYMMDD @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<DependencyMetrics>, Integer, Hash)>] Array<DependencyMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 301
def get_dependency_metrics_since_with_http_info(project_uuid, component_uuid, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_dependency_metrics_since ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.get_dependency_metrics_since"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.get_dependency_metrics_since"
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_dependency_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/since/{date}'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_uuid.to_s)).sub('{' + 'date' + '}', CGI.escape(date.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<DependencyMetrics>' 

  # 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: MetricsApi#get_dependency_metrics_since\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_dependency_metrics_x_days(project_uuid, component_uuid, days, opts = {}) click to toggle source

Returns X days of historical metrics for a specific dependency @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<DependencyMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 362
def get_dependency_metrics_x_days(project_uuid, component_uuid, days, opts = {})
  data, _status_code, _headers = get_dependency_metrics_x_days_with_http_info(project_uuid, component_uuid, days, opts)
  data
end
get_dependency_metrics_x_days_with_http_info(project_uuid, component_uuid, days, opts = {}) click to toggle source

Returns X days of historical metrics for a specific dependency @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<DependencyMetrics>, Integer, Hash)>] Array<DependencyMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 373
def get_dependency_metrics_x_days_with_http_info(project_uuid, component_uuid, days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_dependency_metrics_x_days ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.get_dependency_metrics_x_days"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.get_dependency_metrics_x_days"
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_dependency_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/days/{days}'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_uuid.to_s)).sub('{' + 'days' + '}', CGI.escape(days.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<DependencyMetrics>' 

  # 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: MetricsApi#get_dependency_metrics_x_days\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_portfolio_current_metrics(opts = {}) click to toggle source

Returns current metrics for the entire portfolio @param [Hash] opts the optional parameters @return [PortfolioMetrics]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 431
def get_portfolio_current_metrics(opts = {})
  data, _status_code, _headers = get_portfolio_current_metrics_with_http_info(opts)
  data
end
get_portfolio_current_metrics_with_http_info(opts = {}) click to toggle source

Returns current metrics for the entire portfolio @param [Hash] opts the optional parameters @return [Array<(PortfolioMetrics, Integer, Hash)>] PortfolioMetrics data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 439
def get_portfolio_current_metrics_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_portfolio_current_metrics ...'
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/current'

  # 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] || 'PortfolioMetrics' 

  # 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: MetricsApi#get_portfolio_current_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_portfolio_metrics_since(date, opts = {}) click to toggle source

Returns historical metrics for the entire portfolio from a specific date Date format must be YYYYMMDD @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<PortfolioMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 487
def get_portfolio_metrics_since(date, opts = {})
  data, _status_code, _headers = get_portfolio_metrics_since_with_http_info(date, opts)
  data
end
get_portfolio_metrics_since_with_http_info(date, opts = {}) click to toggle source

Returns historical metrics for the entire portfolio from a specific date Date format must be YYYYMMDD @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<PortfolioMetrics>, Integer, Hash)>] Array<PortfolioMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 497
def get_portfolio_metrics_since_with_http_info(date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_portfolio_metrics_since ...'
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_portfolio_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/since/{date}'.sub('{' + 'date' + '}', CGI.escape(date.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<PortfolioMetrics>' 

  # 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: MetricsApi#get_portfolio_metrics_since\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_portfolio_metrics_x_days(days, opts = {}) click to toggle source

Returns X days of historical metrics for the entire portfolio @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<PortfolioMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 548
def get_portfolio_metrics_x_days(days, opts = {})
  data, _status_code, _headers = get_portfolio_metrics_x_days_with_http_info(days, opts)
  data
end
get_portfolio_metrics_x_days_with_http_info(days, opts = {}) click to toggle source

Returns X days of historical metrics for the entire portfolio @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<PortfolioMetrics>, Integer, Hash)>] Array<PortfolioMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 557
def get_portfolio_metrics_x_days_with_http_info(days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_portfolio_metrics_x_days ...'
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_portfolio_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/{days}/days'.sub('{' + 'days' + '}', CGI.escape(days.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<PortfolioMetrics>' 

  # 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: MetricsApi#get_portfolio_metrics_x_days\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_current_metrics(uuid, opts = {}) click to toggle source

Returns current metrics for a specific project @param uuid [String] The UUID of the project to retrieve metrics for @param [Hash] opts the optional parameters @return [ProjectMetrics]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 608
def get_project_current_metrics(uuid, opts = {})
  data, _status_code, _headers = get_project_current_metrics_with_http_info(uuid, opts)
  data
end
get_project_current_metrics_with_http_info(uuid, opts = {}) click to toggle source

Returns current metrics for a specific project @param uuid [String] The UUID of the project to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(ProjectMetrics, Integer, Hash)>] ProjectMetrics data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 617
def get_project_current_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_project_current_metrics ...'
  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 MetricsApi.get_project_current_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/current'.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] || 'ProjectMetrics' 

  # 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: MetricsApi#get_project_current_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_metrics_since(uuid, date, opts = {}) click to toggle source

Returns historical metrics for a specific project from a specific date Date format must be YYYYMMDD @param uuid [String] The UUID of the project to retrieve metrics for @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<ProjectMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 670
def get_project_metrics_since(uuid, date, opts = {})
  data, _status_code, _headers = get_project_metrics_since_with_http_info(uuid, date, opts)
  data
end
get_project_metrics_since_with_http_info(uuid, date, opts = {}) click to toggle source

Returns historical metrics for a specific project from a specific date Date format must be YYYYMMDD @param uuid [String] The UUID of the project to retrieve metrics for @param date [String] The start date to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<ProjectMetrics>, Integer, Hash)>] Array<ProjectMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 681
def get_project_metrics_since_with_http_info(uuid, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_project_metrics_since ...'
  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 MetricsApi.get_project_metrics_since"
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling MetricsApi.get_project_metrics_since"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/since/{date}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'date' + '}', CGI.escape(date.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<ProjectMetrics>' 

  # 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: MetricsApi#get_project_metrics_since\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_metrics_x_days(uuid, days, opts = {}) click to toggle source

Returns X days of historical metrics for a specific project @param uuid [String] The UUID of the project to retrieve metrics for @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<ProjectMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 737
def get_project_metrics_x_days(uuid, days, opts = {})
  data, _status_code, _headers = get_project_metrics_x_days_with_http_info(uuid, days, opts)
  data
end
get_project_metrics_x_days_with_http_info(uuid, days, opts = {}) click to toggle source

Returns X days of historical metrics for a specific project @param uuid [String] The UUID of the project to retrieve metrics for @param days [Integer] The number of days back to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(Array<ProjectMetrics>, Integer, Hash)>] Array<ProjectMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 747
def get_project_metrics_x_days_with_http_info(uuid, days, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_project_metrics_x_days ...'
  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 MetricsApi.get_project_metrics_x_days"
  end
  # verify the required parameter 'days' is set
  if @api_client.config.client_side_validation && days.nil?
    fail ArgumentError, "Missing the required parameter 'days' when calling MetricsApi.get_project_metrics_x_days"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/days/{days}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'days' + '}', CGI.escape(days.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<ProjectMetrics>' 

  # 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: MetricsApi#get_project_metrics_x_days\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_vulnerability_metrics(opts = {}) click to toggle source

Returns the sum of all vulnerabilities in the database by year and month @param [Hash] opts the optional parameters @return [Array<VulnerabilityMetrics>]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 801
def get_vulnerability_metrics(opts = {})
  data, _status_code, _headers = get_vulnerability_metrics_with_http_info(opts)
  data
end
get_vulnerability_metrics_with_http_info(opts = {}) click to toggle source

Returns the sum of all vulnerabilities in the database by year and month @param [Hash] opts the optional parameters @return [Array<(Array<VulnerabilityMetrics>, Integer, Hash)>] Array<VulnerabilityMetrics> data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 809
def get_vulnerability_metrics_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.get_vulnerability_metrics ...'
  end
  # resource path
  local_var_path = '/v1/metrics/vulnerability'

  # 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<VulnerabilityMetrics>' 

  # 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: MetricsApi#get_vulnerability_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
refresh_component_metrics(uuid, opts = {}) click to toggle source

Requests a refresh of a specific components metrics @param uuid [String] The UUID of the component to refresh metrics on @param [Hash] opts the optional parameters @return [nil]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 856
def refresh_component_metrics(uuid, opts = {})
  refresh_component_metrics_with_http_info(uuid, opts)
  nil
end
refresh_component_metrics_with_http_info(uuid, opts = {}) click to toggle source

Requests a refresh of a specific components metrics @param uuid [String] The UUID of the component to refresh metrics on @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 865
def refresh_component_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_component_metrics ...'
  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 MetricsApi.refresh_component_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/component/{uuid}/refresh'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # 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: MetricsApi#refresh_component_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
refresh_dependency_metrics(project_uuid, component_uuid, opts = {}) click to toggle source

Requests a refresh of a specific dependency metrics @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param [Hash] opts the optional parameters @return [nil]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 915
def refresh_dependency_metrics(project_uuid, component_uuid, opts = {})
  refresh_dependency_metrics_with_http_info(project_uuid, component_uuid, opts)
  nil
end
refresh_dependency_metrics_with_http_info(project_uuid, component_uuid, opts = {}) click to toggle source

Requests a refresh of a specific dependency metrics @param project_uuid [String] The UUID of the project to retrieve metrics for @param component_uuid [String] The UUID of the component to retrieve metrics for @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 925
def refresh_dependency_metrics_with_http_info(project_uuid, component_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_dependency_metrics ...'
  end
  # verify the required parameter 'project_uuid' is set
  if @api_client.config.client_side_validation && project_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'project_uuid' when calling MetricsApi.refresh_dependency_metrics"
  end
  # verify the required parameter 'component_uuid' is set
  if @api_client.config.client_side_validation && component_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'component_uuid' when calling MetricsApi.refresh_dependency_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{projectUuid}/component/{componentUuid}/refresh'.sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s)).sub('{' + 'componentUuid' + '}', CGI.escape(component_uuid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # 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: MetricsApi#refresh_dependency_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
refresh_portfolio_metrics(opts = {}) click to toggle source

Requests a refresh of the portfolio metrics @param [Hash] opts the optional parameters @return [PortfolioMetrics]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 977
def refresh_portfolio_metrics(opts = {})
  data, _status_code, _headers = refresh_portfolio_metrics_with_http_info(opts)
  data
end
refresh_portfolio_metrics_with_http_info(opts = {}) click to toggle source

Requests a refresh of the portfolio metrics @param [Hash] opts the optional parameters @return [Array<(PortfolioMetrics, Integer, Hash)>] PortfolioMetrics data, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 985
def refresh_portfolio_metrics_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_portfolio_metrics ...'
  end
  # resource path
  local_var_path = '/v1/metrics/portfolio/refresh'

  # 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] || 'PortfolioMetrics' 

  # 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: MetricsApi#refresh_portfolio_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
refresh_project_metrics(uuid, opts = {}) click to toggle source

Requests a refresh of a specific projects metrics @param uuid [String] The UUID of the project to refresh metrics on @param [Hash] opts the optional parameters @return [nil]

# File lib/dependency-tracker-client/api/metrics_api.rb, line 1032
def refresh_project_metrics(uuid, opts = {})
  refresh_project_metrics_with_http_info(uuid, opts)
  nil
end
refresh_project_metrics_with_http_info(uuid, opts = {}) click to toggle source

Requests a refresh of a specific projects metrics @param uuid [String] The UUID of the project to refresh metrics on @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/dependency-tracker-client/api/metrics_api.rb, line 1041
def refresh_project_metrics_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetricsApi.refresh_project_metrics ...'
  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 MetricsApi.refresh_project_metrics"
  end
  # resource path
  local_var_path = '/v1/metrics/project/{uuid}/refresh'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # 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: MetricsApi#refresh_project_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end