Module: Auth0::Api::V2::Stats

Included in:
Auth0::Api::V2
Defined in:
lib/auth0/api/v2/stats.rb

Overview

Methods to use the stats endpoints

Instance Method Summary collapse

Instance Method Details

#active_usersinteger

Gets the active users count (logged in during the last 30 days).

Returns:

  • (integer)

    Returns the active users count.

See Also:



12
13
14
15
# File 'lib/auth0/api/v2/stats.rb', line 12

def active_users
  path = "#{stats_path}/active-users"
  get(path)
end

#daily_stats(from, to) ⇒ json

Gets the daily stats for a particular period.

Parameters:

  • from (string)

    The first day of the period (inclusive) in YYYYMMDD format.

  • to (string)

    The last day of the period (inclusive) in YYYYMMDD format.

Returns:

  • (json)

    Returns the daily stats.

See Also:



23
24
25
26
27
28
29
30
# File 'lib/auth0/api/v2/stats.rb', line 23

def daily_stats(from, to)
  path = "#{stats_path}/daily"
  request_params = {
    from: from,
    to: to
  }
  get(path, request_params)
end