Skip to content
github-actions[bot] edited this page Jul 25, 2026 · 2 revisions

Docs | Learn how to use Linkdirecte.

Welcome to the guide for Linkdirecte! Linkdirecte is the best SDK for interacting with EcoleDirecte (approved and used by Scolup!).


📖 Table of Contents

Getting Started

  • 🔑 Authentication | Learn how to log in, handle 2FA, and manage active sessions.
  • ⚙️ Configuration | Adjust network behaviors, set up persistent storage, proxy configuration, handle downloads, and configure encryption passkeys.
  • ⚠️ Errors & Exception Handling | Understand the error hierarchy, caught exceptions, serialization, and friendly API code mappings.

Academic Modules

  • 🎓 Grades | Retrieve student grades, competencies, subjects and periods.
  • 📅 Timetable | Fetch schedules.
  • 📚 Homework | Browse homework, get session content, and mark homework as done.

Communication & School Life

Additional Modules

  • ☁️ Cloud | Work with the cloud space, manage folders, or delete files.
  • 📄 Documents | Download administrative docs, invoices, and trimester reports.
  • 📝 QCMs | Fetch assigned quizzes, inspect questions, and submit response choices.
  • 🔔 Event listening | Hook up real-time event listeners for grades, messages, or activities.

Note

We won't document responses here, but you can check out Docsdirecte (for LLMs here) for a full doc of EcoleDirecte's responses. Note that dates are normalized by the SDK and you don't have to handle Base64 encoding/decoding.


🚀 Installation

Linkdirecte works natively across almost all modern runtimes and environments with zero extra configuration.

To install Linkdirecte in your project, choose your preferred package manager:

Using npm (included in Node.js)

npm install linkdirecte

Using Bun

bun add linkdirecte

Using Deno

deno add npm:linkdirecte

Using Yarn

yarn add linkdirecte

⚡ Runtime Support & Compatibility

Environment Supported Notes
Node.js (v18+) ✅ Yes Full support.
Bun ✅ Yes Full support. Native speed-up!
Deno ✅ Yes Full support.
Browsers ✅ Yes Full support. Default storage : IndexedDB
React Native / Expo ✅ Yes Fully compatible. Storage can be bound to AsyncStorage.
Cloudflare Workers / Vercel Edge ✅ Yes Fully compatible.
Capacitor / Electron ✅ Yes Full support.

Note on Timer-Based Features: Background processes like automated token keepalives, polling loops, or cache prefetching rely on intervals. In serverless environments that lack continuous timers (e.g., short-lived Cloudflare Workers or Vercel Edge runs), these processes will quietly no-op. All regular API requests, custom cache expirations, and active session refreshes work identically everywhere!


⚡ Quick Start Example

Here is a super simple script to log in, handle security questions if required, and fetch academic grades:

import { login, getGrades } from "linkdirecte";

// 1. Log in. Linkdirecte will handle authentication flow under the hood!
const session = await login("your_username", "your_password");

// 2. If 2FA is needed, respond easily
if ("question" in session) {
  console.log(`EcoleDirecte asks: "${session.question}"`);
  console.log("Choices are:", session.choices);

  // Submit the string value (or index number) of the correct choice:
  await session.answer("Cereal before milk");
}

// 3. You are now logged in and verified. Fetch grades instantly!
const gradesInfo = await getGrades();
console.log(`Loaded ${gradesInfo.notes.length} grades!`);

Clone this wiki locally