sibfu-timetable-api
v1.1.2
Published
Provides types and util functions for working with sibfu timetable api
Downloads
17
Readme
sibfu-timetable-api
Features
- ⚡ Blazing fast
- 🔥 Full Typescript support
- 📘 Completely documented
- ⛰️ Built using
Domain-Driven-Development
Install
npm i sibfu-timetable-api
Usage
import { fetchTimetable } from 'sibfu-timetable-api';
const timetable = await fetchTimetable('your-group-here');
console.log(timetable);
And that's it! 🤯
This library also provides helper class TimetableDate
to interact with dates which is very helpful building timetable application.
import { TimetableDate } from 'sibfu-timetable-api';
const today = new Date();
const weekType = TimetableDate.getWeekStatus(today);
console.log(weekType); // 1 or 2 depending on your current date which is enum `Week`
Autocomplete module
import { fetchTargets } from 'sibfu-timetable-api';
const targets = await fetchTimetable('r');
console.log(targets); // ['result-group', 'result-teacher']
Always returns the best result for given string! 😱
Huge thanks 👋
To my friend choi-moeta for inspiring me and helping with creating and publishing this library. 💗
Also huge thanks to EGOIST for creating tsup
and making it easy to publish library.
License
MIT © Moltenship