1.1.0 • Published 6 years ago

node-rozklad-api v1.1.0

Weekly downloads
1
License
LicenseRef-LICENS...
Repository
github
Last release
6 years ago

KPI rozklad Lib

Schedule API based on Rozklad API

Install

npm i node-rozklad-api

Usage

const r = require('node-rozklad-api')

Debug

To enable debug mode

DEBUG=rozklad node app.js

Method

Each method can accept either identifier or name

timetable

Group schedule in a hierarchical form

const schedule = await r.timetable('kv-51')

lessons

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 }])

teacherLessons

Teacher lessons

const lessons = await r.teacherLessons('Сапсай Тетяна Григорівна')

groups

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 } })

teachers

Search teachers or get particular teacher (like groups)

const teacher = await r.teachers('Романкевич Віталій Олексійович')

groupTeachers

Teachers of particular group

const teachers = await r.groupTeachers('кв-51')

currWeek

Get current study week

const currWeek = await r.currWeek()