Skip to content

supersetkai/kai.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kai.js

A small API wrapper for KNRTU-KAI.

Installation

Installation can be done with npm, yarn or pnpm:

npm install @supersetkai/kai.js
yarn add @supersetkai/kai.js
pnpm add @supersetkai/kai.js

Node.js 10 or newer is required

Links

Usage

You can find more about API wrapper usage on this page

In order to get started with the package, define the class:

const { Schedule } = require('@supersetkai/kai.js');

const schedule = new Schedule();
import { Schedule, ScheduleInterface } from '@supersetkai/kai.js';

const schedule: ScheduleInterface = new Schedule();

Now you get to use schedule API however you want:

async function getScheduleOfMyGroup() {
    return await schedule.getSchedule(4131);
}

async function getMyGroupInformation() {
    return await schedule.getGroups(4131);
}

async function getRawScheduleOfMyGroup() {
    return await schedule.raw.getGroups(4131);
}

async function findRawGroups(groupNumber) {
    return await schedule.raw.getGroups(groupNumber);
}

All request functions are async.