ruzapi
v0.0.2
Published
Ruz Api module
Downloads
3
Readme
JS Package for RUZ ( РУЗ - Расписание учебных занятий)
Module exposes native Promise api
Installation:
npm install ruzapi
Usage:
HSE
let hse = require('ruzapi').Hse()
let free = await hse.freeAuditoriums({buildingOid: 2178, date: new Date()})
console.dir(free)
Generic RuzApi
class for inheritance
let RuzApi = require('ruzapi').RuzApi
class FooUniversity extends RuzApi {
constructor (options) {
super('http://ruz.foouniversity.ru/ruzservice.svc', {
paras: lessonTimetable
})
}
}
const lessonTimetable = {
'9:00': 1,
'09:00': 1, // lessonStart: lessonNumber
'10:30': 2,
'12:10': 3,
'13:40': 4,
'15:10': 5,
'16:40': 6,
'18:10': 7,
'19:40': 8,
'10:20': 1, // lessonEnd: lessonNumber
'11:50': 2,
'13:30': 3,
'15:00': 4,
'16:30': 5,
'18:00': 6,
'19:30': 7,
'21:00': 8
}