Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teaching content #79

Open
devskar opened this issue Aug 23, 2022 · 5 comments
Open

teaching content #79

devskar opened this issue Aug 23, 2022 · 5 comments

Comments

@devskar
Copy link

devskar commented Aug 23, 2022

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

@TheNoim
Copy link
Collaborator

TheNoim commented Aug 23, 2022

Yes, they are all optional. There are two possible options:

  1. There simply is no content
  2. 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.

@devskar
Copy link
Author

devskar commented Aug 23, 2022

But on the webapp I have access to the text so I should be able to access the information via api as well right?

@TheNoim
Copy link
Collaborator

TheNoim commented Aug 23, 2022

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.

@devskar
Copy link
Author

devskar commented Aug 23, 2022

image

I am trying to access this content, but the retrieved data looks like this:

{ 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 }

@TheNoim
Copy link
Collaborator

TheNoim commented Aug 23, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants