WebUntis icon indicating copy to clipboard operation
WebUntis copied to clipboard

Problem with the returns of getTimetableForWeek

Open bhasim1 opened this issue 2 years ago • 4 comments

In the docs (https://webuntis.noim.me/classes/WebUntisAnonymousAuth.html#getTimetableForWeek) is says:

Optional formatId: number = 1

set to 1 to include teachers, 2 omits the teachers in elements response

But I get no teachers in the return. Can I just use the getTimetableForRange, pass in the range of the week and get a correct response from there?

bhasim1 avatar Mar 30 '23 15:03 bhasim1

Do you see teachers when using webuntis.com in your browser? This extra method was implemented, because some schools prevented students from getting teacher information via official API, but show teachers on webuntis.com. So this method uses what webuntis.com uses in the background instead of the API. So yes, if the other method works for you, I would prefere that with the according range.

luwol03 avatar Mar 30 '23 16:03 luwol03

So I see no teacher in the browser, but with getTimetableForToday

bhasim1 avatar Mar 30 '23 16:03 bhasim1

So I have tested it and it works with getTimetableForRange. So the problem is that my school denied access to getTimetableForWeek, but everything else works normal? nice

bhasim1 avatar Mar 30 '23 18:03 bhasim1

So I see no teacher in the browser, but with getTimetableForToday

That's why you dont get the teachers via the week method. This week method exactly emulates what happens on webuntis.com in the back.

So I have tested it and it works with getTimetableForRange. So the problem is that my school denied access to getTimetableForWeek, but everything else works normal? nice

Yeah, seems like your school is doing the opposite of my 😆 .

luwol03 avatar Apr 01 '23 17:04 luwol03