WebUntis
WebUntis copied to clipboard
teaching content
I am trying to access the teaching content of my classes, but they don’t seem to be available. Does that feature not exist yet?
{ bkText: lesson.lstext, subsText: lesson.substText, infoText: lesson.info, remarkText: lesson.bkRemark, }
I tried all of these texts, but all are undefined for lessons with teaching content
Yes, they are all optional. There are two possible options:
- There simply is no content
- Or you don't have permission to access it
Here you can find all available properties: https://github.com/SchoolUtils/WebUntis/blob/master/index.d.ts#L45
Properties with ?
are optional and may not be available.
But on the webapp I have access to the text so I should be able to access the information via api as well right?
No, not really. Untis introduced a set of private APIs. Can you show an example of the available text? Maybe we implemented the private API.
![image](https://user-images.githubusercontent.com/36141470/186116451-42dac5fb-89c3-4d27-8f69-4d33282775e8.png)
{ id: 1212411, date: 20220822, startTime: 1135, endTime: 1305, kl: [ <> ], te: [ <> ], su: [ { id: 294, name: 'Sport', longname: 'Sport' } ], ro: [ <> ], lsnumber: 87100, activityType: 'Unterricht' }
and all text values are undefined:
{ bkText: undefined, subsText: undefined, infoText: undefined, remarkText: undefined }
Hm, it could be a new optional field which you need to explicit require in https://github.com/SchoolUtils/WebUntis/blob/master/index.js#L304 or it may simply not be available for the "public" API. You can try to find the query from which this field originates and add a new API path to this module. But without access to a Untis instance, which uses this field, there's nothing I can do.