Skip to content

LesterLyu/AcornAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AcornAPI

Example

Login

Acorn example = new Acorn("UTORid", "Password");
try {
	example.doLogin();
} catch (LoginFailedException e) {
	e.printStackTrace();
	// do something...
}

Get Registrations

// 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();

Get Student Courses

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);

Get Course current space

String spaceInfo = example.getCourseManager().getCourseSpace();

Enroll a Course

int registrationIndex = 0;
String courseCode = "CSC373H1", sectionCode = "Y", lecSection = "LEC,5101";
boolean result = example.getCourseManager().enroll(registrationIndex, courseCode, sectionCode, lecSection);

Get Current Transcript

String transcriptHtml = example.getGradeManager().getGradeHtml();

Get Invoice (not yet implemented)

String session = "?";
String invoiceHtml = example.getAccountManager().getInvoice(session);

About

An UofT Acorn API by me.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages