getCommentsWithHttpInfo method

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

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

Implementation

Future<Response> getCommentsWithHttpInfo(String tenantId, [ GetCommentsOptions? options ]) async {
  final page = options?.page;
  final limit = options?.limit;
  final skip = options?.skip;
  final asTree = options?.asTree;
  final skipChildren = options?.skipChildren;
  final limitChildren = options?.limitChildren;
  final maxTreeDepth = options?.maxTreeDepth;
  final urlId = options?.urlId;
  final userId = options?.userId;
  final anonUserId = options?.anonUserId;
  final contextUserId = options?.contextUserId;
  final hashTag = options?.hashTag;
  final parentId = options?.parentId;
  final direction = options?.direction;
  final fromDate = options?.fromDate;
  final toDate = options?.toDate;
  // ignore: prefer_const_declarations
  final path = r'/api/v1/comments';

  // ignore: prefer_final_locals
  Object? postBody;

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

    queryParams.addAll(_queryParams('', 'tenantId', tenantId));
  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (skip != null) {
    queryParams.addAll(_queryParams('', 'skip', skip));
  }
  if (asTree != null) {
    queryParams.addAll(_queryParams('', 'asTree', asTree));
  }
  if (skipChildren != null) {
    queryParams.addAll(_queryParams('', 'skipChildren', skipChildren));
  }
  if (limitChildren != null) {
    queryParams.addAll(_queryParams('', 'limitChildren', limitChildren));
  }
  if (maxTreeDepth != null) {
    queryParams.addAll(_queryParams('', 'maxTreeDepth', maxTreeDepth));
  }
  if (urlId != null) {
    queryParams.addAll(_queryParams('', 'urlId', urlId));
  }
  if (userId != null) {
    queryParams.addAll(_queryParams('', 'userId', userId));
  }
  if (anonUserId != null) {
    queryParams.addAll(_queryParams('', 'anonUserId', anonUserId));
  }
  if (contextUserId != null) {
    queryParams.addAll(_queryParams('', 'contextUserId', contextUserId));
  }
  if (hashTag != null) {
    queryParams.addAll(_queryParams('', 'hashTag', hashTag));
  }
  if (parentId != null) {
    queryParams.addAll(_queryParams('', 'parentId', parentId));
  }
  if (direction != null) {
    queryParams.addAll(_queryParams('', 'direction', direction));
  }
  if (fromDate != null) {
    queryParams.addAll(_queryParams('', 'fromDate', fromDate));
  }
  if (toDate != null) {
    queryParams.addAll(_queryParams('', 'toDate', toDate));
  }

  const contentTypes = <String>[];


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