Typescript connector for accessing Bakalari api
- Auto token refresh
import { BakalariAPI } from 'bakalari-ts-api';
const api = await BakalariApi.initialize({
baseUrl: 'https://moje.bakalari.cz',
username: 'pepa',
password: `12345`,
});
import { BakalariAPI } from 'bakalari-ts-api';
const api = new BakalariAPI({
baseUrl: 'https://moje.bakalari.cz',
token: TOKEN,
});
- Auto token refresh
import { BakalariAPI } from 'bakalari-ts-api';
const api = new BakalariAPI({
baseUrl: 'https://moje.bakalari.cz',
refreshToken: REFRESH_TOKEN,
});
api.subjects();
api.timetable();
api.timetable({
type: 'actual',
date: '2023-12-30',
});
api.timetable({
type: 'permanent',
});
api.marks();
api.kommens();
api.kommens({
noticeboard: true,
});
const { data, filename } = await api.attachment({ id: 'id' });
data.pipe(...);
api.user();
import { BakalariAPI } from 'bakalari-ts-api';
const cities = BakalariAPI.getMunicipality();
const schools = BakalariAPI.getMunicipality('Praha 9');