Subscribe/unsubscribe from channels
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class APIError {
|
||||
final bool success;
|
||||
final int error;
|
||||
final String errhighlight;
|
||||
final int errhighlight;
|
||||
final String message;
|
||||
|
||||
static final MISSING_UID = 1101;
|
||||
@@ -67,7 +67,7 @@ class APIError {
|
||||
return APIError(
|
||||
success: json['success'] as bool,
|
||||
error: (json['error'] as num).toInt(),
|
||||
errhighlight: json['errhighlight'] as String,
|
||||
errhighlight: (json['errhighlight'] as num).toInt(),
|
||||
message: json['message'] as String,
|
||||
);
|
||||
}
|
||||
|
26
flutter/lib/models/sender_name_statistics.dart
Normal file
26
flutter/lib/models/sender_name_statistics.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class SenderNameStatistics {
|
||||
final String name;
|
||||
final String ts_last;
|
||||
final String ts_first;
|
||||
final int count;
|
||||
|
||||
const SenderNameStatistics({
|
||||
required this.name,
|
||||
required this.ts_last,
|
||||
required this.ts_first,
|
||||
required this.count,
|
||||
});
|
||||
|
||||
factory SenderNameStatistics.fromJson(Map<String, dynamic> json) {
|
||||
return SenderNameStatistics(
|
||||
name: json['name'] as String,
|
||||
ts_last: json['ts_last'] as String,
|
||||
ts_first: json['ts_first'] as String,
|
||||
count: json['count'] as int,
|
||||
);
|
||||
}
|
||||
|
||||
static List<SenderNameStatistics> fromJsonArray(List<dynamic> jsonArr) {
|
||||
return jsonArr.map<SenderNameStatistics>((e) => SenderNameStatistics.fromJson(e as Map<String, dynamic>)).toList();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user