An api for CU Boulder students.
npm install cu-api

This project was created by me (Kyle Pfromer) and has no endorsement by the University of Colorado.
npm install --save cu-api
yarn add cu-api
The api code is written with TypeScript, but also works with JavaScript (typings
are included).
Create a session and login. Then get all the data you need with the session
(the session acts as a logged in user, saving time).
``javascript
import { CUSession } from 'cu-api';
(async function () {
const session = new CUSession();
await session.init('username', 'password');
console.log(session.loggedIn);
console.log(await session.userData());
console.log(await session.termData());
console.log(await session.GPA());
console.log(await session.classTermData('2201'));
})();
`
`javascript
const CUSession = require('cu-api').CUSession;
(async function () {
const session = new CUSession();
await session.init('username', 'password');
console.log(session.loggedIn);
console.log(await session.userData());
console.log(await session.termData());
console.log(await session.GPA());
console.log(await session.classTermData('2201'));
})();
`
Make sure to install libsecret (https://github.com/atom/node-keytar).
cu-api uses superagent a http request library to act like a user and loginbuffportal
(the CU login process is really convoluted). When logged in it accesses the
backend API used by the Angular application to grab the data youbuffportal
need. You have access to everything the has access to!
You must have nodejs installed. This will not work on the browser since I had to self sign a certificate for buffportal.
cu-api` is MIT licensed.