You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1017 B
Dart
52 lines
1017 B
Dart
2 years ago
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
|
||
|
part 'recent_changes.g.dart';
|
||
|
|
||
|
@JsonSerializable()
|
||
|
class RecentChangesItem {
|
||
|
String? type;
|
||
|
|
||
|
int ns;
|
||
|
|
||
|
String title;
|
||
|
|
||
|
int pageid;
|
||
|
|
||
|
int revid;
|
||
|
|
||
|
@JsonKey(name: 'old_revid')
|
||
|
int? oldRevid;
|
||
|
|
||
|
int? rcid;
|
||
|
|
||
|
DateTime timestamp;
|
||
|
|
||
|
RecentChangesItem({
|
||
|
this.type,
|
||
|
required this.ns,
|
||
|
required this.title,
|
||
|
required this.pageid,
|
||
|
required this.revid,
|
||
|
this.oldRevid,
|
||
|
this.rcid,
|
||
|
required this.timestamp,
|
||
|
});
|
||
|
|
||
|
factory RecentChangesItem.fromJson(Map<String, dynamic> json) =>
|
||
|
_$RecentChangesItemFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$RecentChangesItemToJson(this);
|
||
|
}
|
||
|
|
||
|
@JsonSerializable()
|
||
|
class RecentChangesResponse {
|
||
|
List<RecentChangesItem> recentchanges;
|
||
|
|
||
|
RecentChangesResponse({required this.recentchanges});
|
||
|
|
||
|
factory RecentChangesResponse.fromJson(Map<String, dynamic> json) =>
|
||
|
_$RecentChangesResponseFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$RecentChangesResponseToJson(this);
|
||
|
}
|