ChatStatisticsSupergroup.fromJson constructor

ChatStatisticsSupergroup.fromJson(
  1. Map<String, dynamic> json
)

Parses a ChatStatisticsSupergroup from TDLib JSON.

Implementation

factory ChatStatisticsSupergroup.fromJson(
  Map<String, dynamic> json,
) => ChatStatisticsSupergroup(
  period: _readObject(json['period'], DateRange.fromJson),
  memberCount: _readObject(json['member_count'], StatisticalValue.fromJson),
  messageCount: _readObject(json['message_count'], StatisticalValue.fromJson),
  viewerCount: _readObject(json['viewer_count'], StatisticalValue.fromJson),
  senderCount: _readObject(json['sender_count'], StatisticalValue.fromJson),
  memberCountGraph: _readObject(
    json['member_count_graph'],
    StatisticalGraph.fromJson,
  ),
  joinGraph: _readObject(json['join_graph'], StatisticalGraph.fromJson),
  joinBySourceGraph: _readObject(
    json['join_by_source_graph'],
    StatisticalGraph.fromJson,
  ),
  languageGraph: _readObject(
    json['language_graph'],
    StatisticalGraph.fromJson,
  ),
  messageContentGraph: _readObject(
    json['message_content_graph'],
    StatisticalGraph.fromJson,
  ),
  actionGraph: _readObject(json['action_graph'], StatisticalGraph.fromJson),
  dayGraph: _readObject(json['day_graph'], StatisticalGraph.fromJson),
  weekGraph: _readObject(json['week_graph'], StatisticalGraph.fromJson),
  topSenders: _readList<ChatStatisticsMessageSenderInfo>(
    json['top_senders'],
    (e) => _readObject(e, ChatStatisticsMessageSenderInfo.fromJson),
  ),
  topAdministrators: _readList<ChatStatisticsAdministratorActionsInfo>(
    json['top_administrators'],
    (e) => _readObject(e, ChatStatisticsAdministratorActionsInfo.fromJson),
  ),
  topInviters: _readList<ChatStatisticsInviterInfo>(
    json['top_inviters'],
    (e) => _readObject(e, ChatStatisticsInviterInfo.fromJson),
  ),
  extra: json['@extra'],
  clientId: _readClientId(json['@client_id']),
);