listInbox method

Future<InboxListResponse?> listInbox({
  1. String? category,
  2. bool? unreadOnly,
  3. int? limit,
})

Unified inbox feed across mail, channel mentions, DMs, system notifications.

Parameters:

Implementation

Future<InboxListResponse?> listInbox({ String? category, bool? unreadOnly, int? limit, }) async {
  final response = await listInboxWithHttpInfo( category: category, unreadOnly: unreadOnly, limit: limit, );
  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), 'InboxListResponse',) as InboxListResponse;

  }
  return null;
}