v1UsageCharacterStatsGet method
- required int? startUnix,
- required int? endUnix,
- bool? includeWorkspaceMetrics,
- BreakdownTypes? breakdownType,
- UsageAggregationInterval? aggregationInterval,
- MetricType? metric,
- String? xiApiKey,
Get Characters Usage Metrics @param start_unix UTC Unix timestamp for the start of the usage window, in milliseconds. To include the first day of the window, the timestamp should be at 00:00:00 of that day. @param end_unix UTC Unix timestamp for the end of the usage window, in milliseconds. To include the last day of the window, the timestamp should be at 23:59:59 of that day. @param include_workspace_metrics Whether or not to include the statistics of the entire workspace. @param breakdown_type How to break down the information. Cannot be "user" if include_workspace_metrics is False. @param aggregation_interval How to aggregate usage data over time. Can be "hour", "day", "week", "month", or "cumulative". @param metric Which metric to aggregate. @param xi-api-key Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
Implementation
Future<chopper.Response<UsageCharactersResponseModel>>
v1UsageCharacterStatsGet({
required int? startUnix,
required int? endUnix,
bool? includeWorkspaceMetrics,
enums.BreakdownTypes? breakdownType,
enums.UsageAggregationInterval? aggregationInterval,
enums.MetricType? metric,
String? xiApiKey,
}) {
generatedMapping.putIfAbsent(
UsageCharactersResponseModel,
() => UsageCharactersResponseModel.fromJsonFactory,
);
return _v1UsageCharacterStatsGet(
startUnix: startUnix,
endUnix: endUnix,
includeWorkspaceMetrics: includeWorkspaceMetrics,
breakdownType: breakdownType?.value?.toString(),
aggregationInterval: aggregationInterval?.value?.toString(),
metric: metric?.value?.toString(),
xiApiKey: xiApiKey?.toString(),
);
}