All Projects → a2br → ecoledirecte.js

a2br / ecoledirecte.js

Licence: MIT license
Good-looking client for EcoleDirecte's private API.

Programming Languages

typescript
32286 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ecoledirecte.js

Node Captcha
Simple captcha for Node.JS and Express.
Stars: ✭ 130 (+306.25%)
Mutual labels:  node-module
Flexsearch Server
High-performance FlexSearch Server for Node.js (Cluster)
Stars: ✭ 172 (+437.5%)
Mutual labels:  node-module
Async Optics
A node asynchronous process and package monitor
Stars: ✭ 201 (+528.13%)
Mutual labels:  node-module
Node Gcstats
Stars: ✭ 140 (+337.5%)
Mutual labels:  node-module
Node Adodb
A node.js javascript client implementing the ADODB protocol on windows.
Stars: ✭ 155 (+384.38%)
Mutual labels:  node-module
Openwrt Node Packages
OpenWrt Project Node.js packages. v10.x LTS and v12.x LTS and v14.x LTS
Stars: ✭ 176 (+450%)
Mutual labels:  node-module
Pm2 Slack
A PM2 module to emit events to Slack
Stars: ✭ 124 (+287.5%)
Mutual labels:  node-module
Singlespotify
🎵 Create Spotify playlists based on one artist through the command line
Stars: ✭ 254 (+693.75%)
Mutual labels:  node-module
Gh Got
Convenience wrapper for Got to interact with the GitHub API
Stars: ✭ 156 (+387.5%)
Mutual labels:  node-module
Flake Idgen
Flake ID generator yields k-ordered, conflict-free ids in a distributed environment in Node.js
Stars: ✭ 196 (+512.5%)
Mutual labels:  node-module
Aws Lambda Libreoffice
85 MB LibreOffice to fit inside AWS Lambda compressed with Brotli
Stars: ✭ 145 (+353.13%)
Mutual labels:  node-module
Pully
A simple CLI and library for downloading high quality YouTube videos!
Stars: ✭ 153 (+378.13%)
Mutual labels:  node-module
Ng Tailwindcss
A CLI tool for integrating Tailwind CSS into Angular-CLI projects
Stars: ✭ 194 (+506.25%)
Mutual labels:  node-module
Manual Node
📗 📒 (PT-BR Tradução) 2020 Edition - Tradução por Christy e Vinicius Dias (https://github.com/ViniciusmDias).
Stars: ✭ 134 (+318.75%)
Mutual labels:  node-module
Json 2 Csv
Convert JSON to CSV *or* CSV to JSON!
Stars: ✭ 210 (+556.25%)
Mutual labels:  node-module
Html Metadata
MetaData html scraper and parser for Node.js (supports Promises and callback style)
Stars: ✭ 129 (+303.13%)
Mutual labels:  node-module
Dockercon19
DockerCon "Docker for Node.js" examples
Stars: ✭ 176 (+450%)
Mutual labels:  node-module
Puppeteer
Headless Chrome Node.js API
Stars: ✭ 75,197 (+234890.63%)
Mutual labels:  node-module
Sequelize Auto Migrations
Migration generator && runner for sequelize
Stars: ✭ 233 (+628.13%)
Mutual labels:  node-module
Obs Studio Node
libOBS (OBS Studio) for Node.Js, Electron and similar tools
Stars: ✭ 193 (+503.13%)
Mutual labels:  node-module

ecoledirecte.js · GitHub npm npm

The module is still under semver 1.0.0: This means that big changes in the methods / import architecture can happen at any time. Make sure your code is compatible with the new version after updating.

Browse EcoleDirecte's private API with the module of your dreams.

ed.js is a Promise-based module, built on TypeScript for a better IntelliSense and type-guarded, solid features. It keeps evolving and new features are being added.

Examples

Warning: these examples might not work on your machine (depending on whether you're using commonjs or ES6 module)

Get the homework of a day

import { Session } from "ecoledirecte.js";

// Create a new Session.
const session = new Session("identifiant", "motdepasse");

// Bring your session to life!
const account = await session.login().catch(err => {
	console.error("This login did not go well.");
});

// Is it a student account?
if (!account || account.type !== "student") throw new Error("Not a student!");

// Get the homework due for a specific date as a simplified array
const homework = await account.getHomework({ dates: "2021-01-14" });

// Every piece of data from the API is reformatted  (eg: base64 string are
// converted to text/HTML). The raw data remains always available as _raw
console.log(homework[2].contenuDeSeance.content.text);

Introduction to events

Events can be used to do something when something else happens, in real-time. (very specific, as you can tell) For instance, the following will log the method and the url each time ed.js sends a request to the EcoleDirecte servers.

import { events } from "ecoledirecte.js";

events.on("request", ({ method, url }) => console.log(method, url));
// POST https://api.ecoledirecte.com/v3/login.awp
// POST https://api.ecoledirecte.com/v3/eleves/4179/timeline.awp
// ...

Dependencies walkthrough

Dependency Description
node-fetch A light-weight module that brings window.fetch to Node.js
html-to-text Converter that parses HTML and returns text.
ecoledirecte-api-types Module that maps the routes and types related to EcoleDirecte's API. Originally a part of ed.js
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].