ecoledirecte.js
Version:
Good-looking client for EcoleDirecte's private API.
48 lines (47 loc) • 1.29 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TeachersStudent = exports.TeachersClass = exports.TeachersLevel = exports.TeachersSchool = void 0;
class TeachersSchool {
constructor(o) {
this.id = o.id;
this.code = o.code;
this.name = o.libelle;
this.levels = o.niveaux.map(l => new TeachersLevel(l));
this._raw = o;
}
}
exports.TeachersSchool = TeachersSchool;
class TeachersLevel {
constructor(o) {
this.id = o.id;
this.code = o.code;
this.name = o.libelle;
this.classes = o.classes.map(c => new TeachersClass(c));
this._raw = o;
}
}
exports.TeachersLevel = TeachersLevel;
class TeachersClass {
constructor(o) {
this.id = o.id;
this.code = o.code;
this.name = o.libelle;
this.isHeadTeacher = o.isPP;
this.headTeachers = o.tabPP.map(r => ({
id: r.id,
firstName: r.prenom,
lastName: r.nom,
}));
this._raw = o;
}
}
exports.TeachersClass = TeachersClass;
class TeachersStudent {
constructor(o) {
this.id = o.id;
this.firstName = o.prenom;
this.lastName = o.nom;
this._raw = o;
}
}
exports.TeachersStudent = TeachersStudent;