getChannelPoliciesForUserWithHttpInfo method

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

Get the policies which are applied to a user's channels

Gets the policies which are applied to the all of the channels to which a user belongs. Minimum server version: 5.35 ##### Permissions Must be logged in as the user or have the manage_system permission. ##### License Requires an E20 license.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): The ID of the user. This can also be "me" which will point to the current user.

  • int page: The page to select.

  • int perPage: The number of policies per page. There is a maximum limit of 200 per page.

Implementation

Future<Response> getChannelPoliciesForUserWithHttpInfo(
  String userId, {
  int? page,
  int? perPage,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/data_retention/channel_policies'.replaceAll('{user_id}', userId);

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