getCommentsForUser method

Future<GetCommentsForUserResponse?> getCommentsForUser({
  1. String? userId,
  2. SortDirections? direction,
  3. String? repliesToUserId,
  4. double? page,
  5. bool? includei10n,
  6. String? locale,
  7. bool? isCrawler,
})

Parameters:

Implementation

Future<GetCommentsForUserResponse?> getCommentsForUser({ String? userId, SortDirections? direction, String? repliesToUserId, double? page, bool? includei10n, String? locale, bool? isCrawler, }) async {
  final response = await getCommentsForUserWithHttpInfo( userId: userId, direction: direction, repliesToUserId: repliesToUserId, page: page, includei10n: includei10n, locale: locale, isCrawler: isCrawler, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GetCommentsForUserResponse',) as GetCommentsForUserResponse;

  }
  return null;
}