getGroupUsersWithHttpInfo method

Future<Response> getGroupUsersWithHttpInfo(
  1. String groupId, {
  2. int? page,
  3. int? perPage,
})

Get group users

Retrieve the list of users associated with a given group. ##### Permissions Must have manage_system permission. Minimum server version: 5.11

Note: This method returns the HTTP Response.

Parameters:

  • String groupId (required): Group GUID

  • int page: The page to select.

  • int perPage: The number of groups per page.

Implementation

Future<Response> getGroupUsersWithHttpInfo(
  String groupId, {
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/groups/{group_id}/members'.replaceAll('{group_id}', groupId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (perPage != null) {
    queryParams.addAll(_queryParams('', 'per_page', perPage));
  }

  const contentTypes = <String>[];

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