Class: Natero::Metric
- Inherits:
-
Base
- Object
- Base
- Natero::Metric
show all
- Defined in:
- lib/natero/metric.rb
Constant Summary
Constants inherited
from Base
Base::BASE_URI, Base::REQUIRED_PARAMS, Base::VERSION_URI
Instance Attribute Summary
Attributes inherited from Base
#raw_response
Class Method Summary
collapse
Methods inherited from Base
endpoint, #initialize, json_data, json_headers, request_helper, #to_json
#serialize, #to_h, #unserialize
Constructor Details
This class inherits a constructor from Natero::Base
Class Method Details
.bulk_insert_modify(metrics) ⇒ Object
6
7
8
|
# File 'lib/natero/metric.rb', line 6
def self.bulk_insert_modify(metrics)
post([], json_data(Natero.to_records_json(metrics)))
end
|
.delete(name) ⇒ Object
14
15
16
|
# File 'lib/natero/metric.rb', line 14
def self.delete(name)
request_helper.delete([name])
end
|
.endpoint_path ⇒ Object
18
19
20
|
# File 'lib/natero/metric.rb', line 18
def self.endpoint_path
['metrics']
end
|
.modify(name, metric) ⇒ Object
10
11
12
|
# File 'lib/natero/metric.rb', line 10
def self.modify(name, metric)
put([name], json_data(metric.to_json))
end
|
.retrieve(name) ⇒ Object
2
3
4
|
# File 'lib/natero/metric.rb', line 2
def self.retrieve(name)
get([name])
end
|