getAnalyticsOldWithHttpInfo method

Future<Response> getAnalyticsOldWithHttpInfo({
  1. String? name,
  2. String? teamId,
})

Get analytics

Get some analytics data about the system. This endpoint uses the old format, the /analytics route is reserved for the new format when it gets implemented. The returned JSON changes based on the name query parameter but is always key/value pairs. Minimum server version: 4.0 ##### Permissions Must have manage_system permission.

Note: This method returns the HTTP Response.

Parameters:

  • String name: Possible values are "standard", "bot_post_counts_day", "post_counts_day", "user_counts_with_posts_day" or "extra_counts"

  • String teamId: The team ID to filter the data by

Implementation

Future<Response> getAnalyticsOldWithHttpInfo({
  String? name,
  String? teamId,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/analytics/old';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (name != null) {
    queryParams.addAll(_queryParams('', 'name', name));
  }
  if (teamId != null) {
    queryParams.addAll(_queryParams('', 'team_id', teamId));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}