getGroupsByChannelWithHttpInfo method

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

Get channel groups

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

Note: This method returns the HTTP Response.

Parameters:

  • String channelId (required): Channel GUID

  • int page: The page to select.

  • int perPage: The number of groups per page.

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

Implementation

Future<Response> getGroupsByChannelWithHttpInfo(
  String channelId, {
  int? page,
  int? perPage,
  bool? filterAllowReference,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/channels/{channel_id}/groups'.replaceAll('{channel_id}', channelId);

  // 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,
  );
}