getUserNotificationsWithHttpInfo method

Future<Response> getUserNotificationsWithHttpInfo(
  1. String tenantId, [
  2. GetUserNotificationsOptions? options
])

Performs an HTTP 'GET /user-notifications' operation and returns the Response. Parameters:

  • String tenantId (required):

  • String urlId: Used to determine whether the current page is subscribed.

  • int pageSize:

  • String afterId:

  • bool includeContext:

  • int afterCreatedAt:

  • bool unreadOnly:

  • bool dmOnly:

  • bool noDm:

  • bool includeTranslations:

  • bool includeTenantNotifications:

  • String sso:

Implementation

Future<Response> getUserNotificationsWithHttpInfo(String tenantId, [ GetUserNotificationsOptions? options ]) async {
  final urlId = options?.urlId;
  final pageSize = options?.pageSize;
  final afterId = options?.afterId;
  final includeContext = options?.includeContext;
  final afterCreatedAt = options?.afterCreatedAt;
  final unreadOnly = options?.unreadOnly;
  final dmOnly = options?.dmOnly;
  final noDm = options?.noDm;
  final includeTranslations = options?.includeTranslations;
  final includeTenantNotifications = options?.includeTenantNotifications;
  final sso = options?.sso;
  // ignore: prefer_const_declarations
  final path = r'/user-notifications';

  // ignore: prefer_final_locals
  Object? postBody;

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

    queryParams.addAll(_queryParams('', 'tenantId', tenantId));
  if (urlId != null) {
    queryParams.addAll(_queryParams('', 'urlId', urlId));
  }
  if (pageSize != null) {
    queryParams.addAll(_queryParams('', 'pageSize', pageSize));
  }
  if (afterId != null) {
    queryParams.addAll(_queryParams('', 'afterId', afterId));
  }
  if (includeContext != null) {
    queryParams.addAll(_queryParams('', 'includeContext', includeContext));
  }
  if (afterCreatedAt != null) {
    queryParams.addAll(_queryParams('', 'afterCreatedAt', afterCreatedAt));
  }
  if (unreadOnly != null) {
    queryParams.addAll(_queryParams('', 'unreadOnly', unreadOnly));
  }
  if (dmOnly != null) {
    queryParams.addAll(_queryParams('', 'dmOnly', dmOnly));
  }
  if (noDm != null) {
    queryParams.addAll(_queryParams('', 'noDm', noDm));
  }
  if (includeTranslations != null) {
    queryParams.addAll(_queryParams('', 'includeTranslations', includeTranslations));
  }
  if (includeTenantNotifications != null) {
    queryParams.addAll(_queryParams('', 'includeTenantNotifications', includeTenantNotifications));
  }
  if (sso != null) {
    queryParams.addAll(_queryParams('', 'sso', sso));
  }

  const contentTypes = <String>[];


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