class API

Public Instance Methods

json(path) click to toggle source
# File lib/rails/newrelic_metrics/api.rb, line 2
def json(path)
  response = open("#{url}/#{path}", { 'x-api-key' => api_key })
  JSON.parse(response.read)
end
url() click to toggle source
# File lib/rails/newrelic_metrics/api.rb, line 7
def url
  'https://api.newrelic.com/api/v1'
end