Skip to content

Attendance

github-actions[bot] edited this page Oct 16, 2026 · 1 revision

Attendance | Learn how to get attendance data with Litedirecte.

The attendance module makes it super easy to check on a student's absences, delays, and any disciplinary events (like punishments) in EcoleDirecte.

🚀 Getting Started

To fetch attendance, you'll use the getAttendance function.

import { Litedirecte } from "litedirecte";

const ld = new Litedirecte();
await ld.auth.login("your_username", "your_password");

const data = await ld.attendance.getAttendance();

if (data.absences && data.absences.length > 0) {
  console.log(`Oh! You have ${data.absences.length} registered absence(s).`);
  data.absences.forEach(absence => {
    console.log(`- Date: ${absence.date.toLocaleDateString()} | Reason: ${absence.motif || "No reason specified"}`);
  });
} else {
  console.log("Hooray! No absences recorded.");
}

📖 API Reference

ld.attendance.getAttendance

Fetches the student's full attendance history, including delays and punishments.

ld.attendance.getAttendance(): Promise<any>

Returns

A promise that resolves to the raw EcoleDirecte API payload (treated as any), with attendance events grouped into buckets such as absences, delays, punishments, and attendance. Litedirecte preserves the API's original key names and only normalizes values (date strings become Date, base64 fields are decoded).


🗂️ Response Shape

ld.attendance.getAttendance resolves to the raw EcoleDirecte API payload (treated as any). Litedirecte preserves the API's original key names and only normalizes values (date strings become Date, base64 fields are decoded).

Requires the VIE_SCOLAIRE module on the current account (see Configuration): without it, an EdUnsupportedModuleError is thrown before any request.


💾 Caching

getAttendance() is a maintained entry: served instantly and refreshed by the poller and by ld.getAll(). It accepts { force: true } to skip the cache. See Cache & sync.

Clone this wiki locally