This is an UNOFFICIAL wrapper for the kdecole api
First, you need to create a Client() object :
LOGIN AND PASSWORD ARE NOT YOUR ENT ONES. TEMPORARY USERNAME AND PASSWORD GIVEN TO INIT THE MOBILE APP SHALL BE USED
Client client = Client(url: '<your CAS url>');
await client.login('<your username>', '<your password>');
or if you already have a token :
Client client = Client.fromToken(token: '<your token>', url: '<your CAS url>');
Now you're logged in !
To logout :
await client.logout();
Of course, you need to have a Client() object,
Next, just get an email list :
List<Email> list = await client.getEmails();
It returns you a list of emails which first lines of the first message can be seen. This contains the id, the expeditor and the receivers. WARNING you can't get the full messages body by this way
From your email object, you just need to do :
await client.getFullEmail(<your email>);
It will return you another email which contains all the data from the given one, plus the whole discussion, in a list of Message objects
You can get from it :
- The sender
- The date
- The message
As well as the messaging, this method only return you the first lines of the homework :
List<Homework> homeworksList = await client.getHomeworks();
It will return you a list of homeworks
Homework hw = await client.getFullHomework(oldHw);
It will return you the new Hw with the full body
You can get from it :
- The content
- The type
- The subject
- The estimated time (if given by the professor)
- The status (is realised)
- The uuid
- The uuid of the session
- the Date
There is only one method :
List<Course> tt = await client.getTimetable();
It will return to you a list of Course
You can get from it :
- The subject
- A list of homeworks (only the uid, just get the sessionUid and use the getFullHomework method)
- The content (if given)
- The start date (Datetime)
- The end date (Datetime too)