getAllSubs function
Future<List<List<Page>>>
getAllSubs(
- String username,
- String password, {
- ScHttpClient? http,
- String endpoint = dsb.Session.defaultEndpoint,
- String previewEndpoint = dsb.Session.defaultPreviewEndpoint,
- bool downloadPreviews = false,
- ParserBuilder parser = untis.Substitution.fromUntis,
})
Implementation
Future<List<List<Page>>> getAllSubs(
String username,
String password, {
ScHttpClient? http,
String endpoint = dsb.Session.defaultEndpoint,
String previewEndpoint = dsb.Session.defaultPreviewEndpoint,
bool downloadPreviews = false,
untis.ParserBuilder parser = untis.Substitution.fromUntis,
}) =>
dsb.Session.login(username, password,
endpoint: endpoint, previewEndpoint: previewEndpoint, http: http)
.then((s) => s.getTimetables().then(
(t) => s
.downloadAndParsePlans(t,
downloadPreviews: downloadPreviews, parser: parser)
.then((x) => x.toNestedList()),
));