npm.io
1.1.2 • Published 4 years ago

sibfu-timetable-api

Licence
MIT
Version
1.1.2
Deps
2
Size
38 kB
Vulns
23
Weekly
0

sibfu-timetable-api

npm version size types tree shaking

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

Keywords