2.9.0 โข Published 9 months ago
@philippdormann/elternportal-api v2.9.0
ElternPortal API Client ๐
This library provides an easy-to-use interface for interacting with the ElternPortal system, a platform for school-parent communication in Germany.
Features ๐
- Authentication: Securely log in to the ElternPortal system
- Kid Management: Set and retrieve information about children linked to the account
- School Information: Fetch various details about the school
- Announcements: Get updates from the school's bulletin board (Schwarzes Brett)
- Calendar: Retrieve school events and schedules
- Parent Letters: Access and download parent letters (Elternbriefe)
- Lost and Found: View items in the lost and found section
Installation ๐ป
pnpm i @philippdormann/elternportal-api
Usage ๐
Initializing the Client
import { getElternportalClient } from "@philippdormann/elternportal-api";
const client = await getElternportalClient({
short: "schoolcode",
username: "your_username",
password: "your_password",
kidId: 0, // Optional
});
Available Methods
Get Kids ๐จโ๐ฉโ๐งโ๐ฆ
const kids = await client.getKids();
Get School Information ๐ซ
const schoolInfo = await client.getSchoolInfos();
Get Bulletin Board (Schwarzes Brett) ๐
const posts = await client.getSchwarzesBrett(includeArchived);
Get School Calendar (Termine) ๐
const events = await client.getTermine(fromDate, toDate);
Get Timetable ๐
const timetable = await client.getStundenplan();
Get Lost and Found Items ๐งฆ
const lostItems = await client.getFundsachen();
Get Parent Letters ๐ฌ
const letters = await client.getElternbriefe();
Download Files ๐
const bulletinFile = await client.getSchwarzesBrettFile(fileId);
const letterFile = await client.getElternbrief(letterId);
Types ๐
The library includes TypeScript definitions for various data structures:
SchoolInfo
Termin
(Calendar Event)Elternbrief
(Parent Letter)SchwarzesBrettBox
(Bulletin Board Item)ElternportalFile