Constructor
new StatsManager(options)
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
The client options.
|
Members
(inner) auth0RestClient :external:RestClient
Provides an abstraction layer for consuming the Stats endpoint.
- Source:
Type:
Methods
getActiveUsersCount(cbopt) → {Promise|undefined}
Get a the active users count.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
function
|
<optional> |
Callback function. |
Returns:
- Type:
-
Promise
|undefined
Example
management.stats.getActiveUsersCount(function (err, usersCount) {
if (err) {
// Handle error.
}
console.log(usersCount);
});
getDaily(params, cbopt) → {Promise|undefined}
Get the daily stats.
- Source:
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object
|
Stats parameters.
|
||||||||||
cb |
function
|
<optional> |
Callback function. |
Returns:
- Type:
-
Promise
|undefined
Example
var params = {
from: '{YYYYMMDD}', // First day included in the stats.
to: '{YYYYMMDD}' // Last day included in the stats.
};
management.stats.getDaily(params, function (err, stats) {
if (err) {
// Handle error.
}
console.log(stats);
});