class SonarQube::TimeMachine::TimeMachine

Public Class Methods

new(connector) click to toggle source
# File lib/sonarqube-client/timemachine.rb, line 25
def initialize connector
  @connector=connector
end

Public Instance Methods

get(project_name, metrics) click to toggle source

Returns the specified metrics of a project @param [String] project_name The name of the project @param [String] metrics A string that contains comma separated project metric keys/id's (can be found in: docs.sonarqube.org/display/SONAR/Metric+definitions) @return [JSON] A JSON object with the project metrics

# File lib/sonarqube-client/timemachine.rb, line 33
def get project_name, metrics
  JSON.parse(@connector["#{@@endpoint}index?format=json&resource=#{project_name}&metrics=#{metrics}&toDateTime=&fromDateTime="].get)
end