Added api for custom timetable events

This commit is contained in:
2024-02-12 01:00:12 +01:00
parent 3eae5ba10a
commit 22db412e75
36 changed files with 849 additions and 229 deletions

View File

@ -0,0 +1,23 @@
import '../../../api/mhsl/customTimetableEvent/customTimetableEvent.dart';
import '../../../api/webuntis/queries/getTimetable/getTimetableResponse.dart';
class ArbitraryAppointment {
GetTimetableResponseObject? webuntis;
CustomTimetableEvent? custom;
ArbitraryAppointment({this.webuntis, this.custom}) {}
bool hasWebuntis() {
return webuntis != null;
}
bool hasCustom() {
return custom != null;
}
void handlers(void Function(GetTimetableResponseObject webuntisData) webuntis, void Function(CustomTimetableEvent customData) custom) {
if(hasWebuntis()) webuntis(this.webuntis!);
if(hasCustom()) custom(this.custom!);
}
}