node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

acorn-api

Acorn API (typescript)

This project is inspired by AcornAPI which is an Acorn API written in Java.

Installation

npm install acorn-api --save

Example

Login

import { Acorn } from 'acorn-api-js';
const example = new Acorn();
example.basic.login('user', 'pass');

Get Registrations

example.course.getEligibleRegistrations();

Get Student Courses

example.course.getEnrolledCourses();
example.course.getCartedCourses();

Get Course Info (Can also use it to get waiting list rank for a waitlisted course)

int registrationIndex = 0;
const courseCode = "CSC373H1", sectionCode = "Y", courseSessionCode = "20175";
const course = example.getExtraCourseInfo(registrationIndex, courseCode, courseSessionCode, sectionCode);

Enroll a Course (Not yet tested)

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

Get Current Transcript

const academicReport = example.academic.getAcademicHistory();