Acorn example = new Acorn ("UTORid" , "Password" );
try {
example .doLogin ();
} catch (LoginFailedException e ) {
e .printStackTrace ();
// do something...
}
// you need to provide registration index(the index of the returned array ) to do further action. ie. Get Course Info
List <String > eligibleRegistrations = example .getEligibleRegistrations ();
List <EnrolledCourse > appliedCourse = example .getCourseManager ().getAppliedCourses ();
List <PlannedCourse > plannedCourse = example .getCourseManager ().getPlannedCourses ();
Get Course Info (can also use it to get waiting list rank for a waitlisted course)
int registrationIndex = 0 ;
String courseCode = "CSC373H1" , sectionCode = "Y" , courseSessionCode = "20175" ;
EnrolledCourse course = example .getCourseManager ().loadExtraInfo (courseCode , courseSessionCode , sectionCode , registrationIndex );
String spaceInfo = example .getCourseManager ().getCourseSpace ();
int registrationIndex = 0 ;
String courseCode = "CSC373H1" , sectionCode = "Y" , lecSection = "LEC,5101" ;
boolean result = example .getCourseManager ().enroll (registrationIndex , courseCode , sectionCode , lecSection );
String transcriptHtml = example .getGradeManager ().getGradeHtml ();
Get Invoice (not yet implemented)
String session = "?" ;
String invoiceHtml = example .getAccountManager ().getInvoice (session );