getChannelMemberCountsByGroupWithHttpInfo method

Future<Response> getChannelMemberCountsByGroupWithHttpInfo(
  1. String channelId, {
  2. bool? includeTimezones,
})

Channel members counts for each group that has atleast one member in the channel

Returns a set of ChannelMemberCountByGroup objects which contain a group_id, channel_member_count and a channel_member_timezones_count. ##### Permissions Must have read_channel permission for the given channel. Minimum server version: 5.24

Note: This method returns the HTTP Response.

Parameters:

  • String channelId (required): Channel GUID

  • bool includeTimezones: Defines if member timezone counts should be returned or not

Implementation

Future<Response> getChannelMemberCountsByGroupWithHttpInfo(
  String channelId, {
  bool? includeTimezones,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/channels/{channel_id}/member_counts_by_group'.replaceAll('{channel_id}', channelId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (includeTimezones != null) {
    queryParams.addAll(_queryParams('', 'include_timezones', includeTimezones));
  }

  const contentTypes = <String>[];

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