getGroupsByTeamWithHttpInfo method

Future<Response> getGroupsByTeamWithHttpInfo(
  1. String teamId, {
  2. int? page,
  3. int? perPage,
  4. bool? filterAllowReference,
})

Get team groups

Retrieve the list of groups associated with a given team. Minimum server version: 5.11

Note: This method returns the HTTP Response.

Parameters:

  • String teamId (required): Team GUID

  • int page: The page to select.

  • int perPage: The number of groups per page.

  • bool filterAllowReference: Boolean which filters in the group entries with the allow_reference attribute set.

Implementation

Future<Response> getGroupsByTeamWithHttpInfo(
  String teamId, {
  int? page,
  int? perPage,
  bool? filterAllowReference,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/teams/{team_id}/groups'.replaceAll('{team_id}', teamId);

  // 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));
  }
  if (filterAllowReference != null) {
    queryParams.addAll(_queryParams('', 'filter_allow_reference', filterAllowReference));
  }

  const contentTypes = <String>[];

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