Method: Klaviyo::Metrics.get_metrics

Defined in:
lib/klaviyo/apis/metrics.rb

.get_metrics(page: DEFAULT_PAGE, count: DEFAULT_COUNT, api_key: nil) ⇒ Object

Returns a list of all metrics in Klaviyo

Parameters:

  • page (Integer) (defaults to: DEFAULT_PAGE)

    which page to return, default 0

  • count (Integer) (defaults to: DEFAULT_COUNT)

    number of results to return, default 100

Returns:

  • a dictionary with a data property that contains an array of all the metrics



10
11
12
13
14
15
16
# File 'lib/klaviyo/apis/metrics.rb', line 10

def self.get_metrics(page: DEFAULT_PAGE, count: DEFAULT_COUNT, api_key: nil)
  params = {
    :page => page,
    :count => count
  }
  v1_request(HTTP_GET, METRICS, api_key: api_key, **params)
end