getNotificationCountWithHttpInfo method

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

Performs an HTTP 'GET /api/v1/notifications/count' operation and returns the Response. Parameters:

Implementation

Future<Response> getNotificationCountWithHttpInfo(String tenantId, [ GetNotificationCountOptions? options ]) async {
  final userId = options?.userId;
  final urlId = options?.urlId;
  final fromCommentId = options?.fromCommentId;
  final viewed = options?.viewed;
  final type = options?.type;
  // ignore: prefer_const_declarations
  final path = r'/api/v1/notifications/count';

  // ignore: prefer_final_locals
  Object? postBody;

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

    queryParams.addAll(_queryParams('', 'tenantId', tenantId));
  if (userId != null) {
    queryParams.addAll(_queryParams('', 'userId', userId));
  }
  if (urlId != null) {
    queryParams.addAll(_queryParams('', 'urlId', urlId));
  }
  if (fromCommentId != null) {
    queryParams.addAll(_queryParams('', 'fromCommentId', fromCommentId));
  }
  if (viewed != null) {
    queryParams.addAll(_queryParams('', 'viewed', viewed));
  }
  if (type != null) {
    queryParams.addAll(_queryParams('', 'type', type));
  }

  const contentTypes = <String>[];


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