https://github.com/huchenlei/acorn-api-js
API for user actions on Acorn (University of Toronto student system) in TypeScript
https://github.com/huchenlei/acorn-api-js
Last synced: 3 months ago
JSON representation
API for user actions on Acorn (University of Toronto student system) in TypeScript
- Host: GitHub
- URL: https://github.com/huchenlei/acorn-api-js
- Owner: huchenlei
- License: mit
- Created: 2017-09-22T22:46:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T16:11:59.000Z (over 2 years ago)
- Last Synced: 2025-03-19T00:38:56.320Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 71.3 KB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Acorn API (typescript)
This project is inspired by [AcornAPI](https://github.com/LesterLyu/AcornAPI)
which is an Acorn API written in Java.## Installation
```bash
npm install acorn-api --save
```## Example
### Login
```javascript
import { Acorn } from 'acorn-api-js';
const example = new Acorn();
example.basic.login('user', 'pass');
```### Get Registrations
```javascript
example.course.getEligibleRegistrations();
```### Get Student Courses
```javascript
example.course.getEnrolledCourses();
example.course.getCartedCourses();
```### Get Course Info (Can also use it to get waiting list rank for a waitlisted course)
```javascript
int registrationIndex = 0;
const courseCode = "CSC373H1", sectionCode = "Y", courseSessionCode = "20175";
const course = example.getExtraCourseInfo(registrationIndex, courseCode, courseSessionCode, sectionCode);
```### Enroll a Course (Not yet tested)
```javascript
int registrationIndex = 0;
const courseCode = "CSC373H1", sectionCode = "Y", lecSection = "LEC,5101";
const result = example.course.enroll(registrationIndex, courseCode, sectionCode, lecSection);
```### Get Current Transcript
```javascript
const academicReport = example.academic.getAcademicHistory();
```