Closed agileomartin closed 1 year ago
I can look into this:)
Great Ivan ! Thank you. I have made a custom request .../studentId=XXX as an attempt to switch the child. The request went through, but no change in the result of the get_timetable( ) method.
Thank you for the great work !
I found no easy way to list all children, but I've added this in b5c8341.
edupage = # ...
students = edupage.get_students()
# you can do either:
my_child = students[0]
edupage.switch_to_child(my_child)
# or
my_child_person_id = 1234
edupage.switch_to_child(my_child_person_id)
# do whatever you want to do on the child account
edupage.switch_to_parent() # switch back to the parent account
This feature will be present in the 0.10.4 update.
@agileomartin I've created 0.10.4, can you please give me some feedback? Is it working as expected?
Would it be possible to switch the child in case parent has got several children ?
Example:
edupage.get_timetable( datetime.now( ) ) will only fetch the time table for the "last child"
edupage.get_foreign_timetable(XXXX, datetime.now() ) will raise an "insuficent privigiges" exception
Thank you !