Method: Klaviyo::Metrics.get_metric_export
- Defined in:
- lib/klaviyo/apis/metrics.rb
.get_metric_export(metric_id, start_date: nil, end_date: nil, unit: nil, measurement: nil, where: nil, by: nil, count: nil, api_key: nil) ⇒ Object
Export event data, optionally filtering and segmented on available event properties
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/klaviyo/apis/metrics.rb', line 62 def self.get_metric_export(metric_id, start_date: nil, end_date: nil, unit: nil, measurement: nil, where: nil, by: nil, count: nil, api_key: nil ) path = "#{METRIC}/#{metric_id}/#{EXPORT}" params = { :start_date => start_date, :end_date => end_date, :unit => unit, :measurement => measurement, :where => where, :by => by, :count => count } v1_request(HTTP_GET, path, api_key: api_key, **params) end |