Class: Malartu::Metric
- Inherits:
-
MalartuObject
- Object
- MalartuObject
- Malartu::Metric
- Defined in:
- lib/malartu/metric.rb
Overview
Metrics is how Malartu tracks data from various sources
Instance Attribute Summary
Attributes inherited from MalartuObject
Class Method Summary collapse
- .list(starting: nil, ending: Date.today.to_s, grain: nil, timezone: 'UTC', uids: []) ⇒ Object
- .uids ⇒ Object
Methods inherited from MalartuObject
Constructor Details
This class inherits a constructor from Malartu::MalartuObject
Class Method Details
.list(starting: nil, ending: Date.today.to_s, grain: nil, timezone: 'UTC', uids: []) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/malartu/metric.rb', line 8 def self.list(starting: nil, ending: Date.today.to_s, grain: nil, timezone: 'UTC', uids: []) uids = uids.join(',') params = { start_date: starting, end_date: ending, grain: grain, timezone: timezone, uids: uids }.select { |_, value| !value.nil? } Malartu.request('get', '/kpi/metrics', params) end |