Closed cfpwastaken closed 3 years ago
Thank you, great suggesstion! I will be trying to implement notifications the following week, so I'll try adding this!
Hello, although there is currently no way to listen for events, there is a way to fetch notifications which is in a way the same thing you requested here.
If you do not like how this feature works, please reply with suggestions. Otherwise please comment here so I can close this issue.
I don't really know what you mean? Can you give me an example please I can't seem to figure out what you mean by "fetch notifications"
You can now call get_notifications
like this:
edupage = Edupage("school", "username", "password")
edupage.login()
notifications = edupage.get_notifications()
This method returns a list of the type EduNotification
which looks like this:
class EduNotification:
id
event_type
author
recipient
text
date_added
attachments
subject
name
due_date
grade
start
end
duration
event_type_name
This is not what I was asking for but I could work with this too. Thx
Is your feature request related to a problem? Please describe. It's possible without but without events you would need to save the last ID you handled into a file and then watch for new stuff constantly. It would be nice if you can just have Events that run user-defined functions when something happens.
Describe the solution you'd like That you can have functions that get called when something happens (ex. new homework comes in)