Schedule API based on Rozklad API
It has built-in caching (maxAge = 6 days)
npm i node-rozklad-api
const r = require('node-rozklad-api')
To enable debug mode
DEBUG=rozklad node app.js
Each method can accept either identifier or name
Group schedule in a hierarchical form
const schedule = await r.timetable('kv-51')
Group lessons with filters
// if second parameter doesn't specified then all lessons will be requested
// lessons with (day_number = 1 and lesson_week = 1) or (day_number = 2)
const lessons = await r.lessons(802, [{ day_number: 1, lesson_week: 1 }, { day_number: 2 }])
Teacher lessons
const lessons = await r.teacherLessons('Сапсай Тетяна Григорівна')
Search groups or get particular group
const group = await r.groups('кв-51')
const groups = await r.groups() // all groups
const groups = await r.groups({ search: { query: 'кв' } })
const groups = await r.groups({ filter: { offset: 100, limit: 5 } })
Search teachers or get particular teacher (like groups)
const teacher = await r.teachers('Романкевич Віталій Олексійович')
Teachers of particular group
const teachers = await r.groupTeachers('кв-51')
Get current study week
const currWeek = await r.currWeek()