Open cfpwastaken opened 2 years ago
I looked it up, and it turned out it isn't that easy to implement. The only thing I can get from EduPage is a few megabytes large JSON object with all the data divided into arrays. So to implement it properly, I have to make the whole parser/generator to create the final timetable (like on original EduPage site). I have currently no free time, but I will try to make it run (don't know when though).
I looked it up, and it turned out it isn't that easy to implement.
bruh
I have currently no free time, but I will try to make it run (don't know when though).
Ok.
Can this be used?
Unfortunately no, but actually, under the hood it uses the same data (so it wouldn't help, it would even harder to optain that data).
I've been able to implement this with this endpoint:
https://{subdomain}.edupage.org/server/currenttt.js?__func=curentttGetData
- it returns JSON.
If your school setup in such way that you don't see the timetables of other people, it won't work obviously, but I think this is the easiest way to implement this and it should work for everyone (if school is setup correctly).
actually, when I go to that url with my schools subdomain it goes to 404.edupage.org
@cfpwastaken Same result for me – your school probably doesn't have enabled viewing timetables of other people.
Also, you have to send a POST
request to these endpoints...
But you can use it like this to view timetables in a browser:
https://{subdomain}.edupage.org/timetable/view.php?student={student_id}
https://{subdomain}.edupage.org/timetable/view.php?teacher={teacher_id}
https://{subdomain}.edupage.org/timetable/view.php?class={class_id}
https://{subdomain}.edupage.org/timetable/view.php?classroom={classroom_id}
https://{subdomain}.edupage.org/timetable/view.php?num={timetable_id}
your school probably doesn't have enabled viewing timetables of other people.
My school has that disabled too. But my school has enabled viewing timetables for classes
Yeah would be pretty cool to have, especially for my edupage discord bot as it currently shows my timetable to all students in my class who might have slightly different timetables. Also i think this might be very easy to implement. There should be some kind of InsufficientPermission exception for when you do not have permission to see a timetable.