A Node.js module which parses data from the University of Toronto's course listings into JSON to help developers create applications for students with ease.
Getting Started
Install:
$ npm i uoft-api
Reference:
var uoftAPI = ;
Supported Functions
getAllCourseDepartments
getCourseDepartment
getProgramCourses
getAllCourseDepartments(callback)
- Takes a callback which handles error and an array of JSON objects, where each object contains a department field which has the name of the department specified by the code.
Number of Requests:
getAllCourseDepartments
performs 1 request to retrieve all department names.
Usage:
uoftAPI;
Examples
uoftAPI;
getCourseDepartment(courseCode, callback)
courseCode
is a valid three-letter code representing a department at the University (ie/ the first three letters of any course code).- Takes a
callback
which handles error and an array of JSON objects, where each object contains a department field which has the name of the department specified by the code.
Number of Requests:
getCourseDepartment
performs 1 request to retrieve the department name of the specified program.
Usage:
uoftAPI;
Examples
uoftAPI;
uoftAPI;
getProgramCourses(programCode, acceptCancelledCourses, callback)
- Takes a valid three-letter
programCode
representing a department at the University (ie/ the first three letters of any course code). - Takes a value
true
orfalse
, which determines whether cancelled courses will be included in the array of course JSON objects. - Takes a callback which handles error and an array of courses represented as JSON objects (as demonstrated below), where each JSON object contains a single course's information and has the following structure:
courseName: 'Computational Thinking' // Title of the course courseCode: 'CSC104H1' // Course code courseTerm: 'F' // Course semester courseWait: 'Y' // If the course contains a wait-list (Y/N) courseProf: 'D. Heap' // Professor(s) teaching the course
Number of Requests:
getProgramCourses
performs 2 requests to retrieve all course data of the specified program.
Usage:
uoftAPI;
Examples
uoftAPI;
Function Addition Roadmap
- Extending
getProgramCourses
to include the lecture and tutorial sections of each respective class in their own arrays. - Extending
getProgramCourses
to include when each tutorial and lecture section takes place (day of the week and time). - Extending the module to support course data from the University of Toronto Mississauga and Scarborough campus time-tables.
- Extending the module to support course data from the St. George campus Faculty of Engineering.