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 json) => _$RecentChangesItemFromJson(json); Map toJson() => _$RecentChangesItemToJson(this); } @JsonSerializable() class RecentChangesResponse { List recentchanges; RecentChangesResponse({required this.recentchanges}); factory RecentChangesResponse.fromJson(Map json) => _$RecentChangesResponseFromJson(json); Map toJson() => _$RecentChangesResponseToJson(this); }