getUsersByGroupChannelIds method

Future<MmGetUsersByGroupChannelIds200Response?> getUsersByGroupChannelIds(
  1. List<String> requestBody
)

Get users by group channels ids

Get an object containing a key per group channel id in the query and its value as a list of users members of that group channel. The user must be a member of the group ids in the query, or they will be omitted from the response. ##### Permissions Requires an active session but no other permissions. Minimum server version: 5.14

Parameters:

  • List<String> requestBody (required): List of group channel ids

Implementation

Future<MmGetUsersByGroupChannelIds200Response?> getUsersByGroupChannelIds(
  List<String> requestBody,
) async {
  final response = await getUsersByGroupChannelIdsWithHttpInfo(
    requestBody,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw MmApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(
      await _decodeBodyBytes(response),
      'MmGetUsersByGroupChannelIds200Response',
    ) as MmGetUsersByGroupChannelIds200Response;
  }
  return null;
}