unreadCount method

Return number of unread conversations by conversation state.

Note: at time of writing, only the following states are populated:

  • archived
  • highlighted
  • inprogress
  • mod
  • newMail
  • notifications

Returns an instance of ModmailUnreadStatistics.

Implementation

Future<ModmailUnreadStatistics> unreadCount() async {
  final response = await _subreddit.reddit
      .get(apiPath['modmail_unread_count'], objectify: false);
  return ModmailUnreadStatistics._(response.cast<String, int>());
}