-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from PapillonApp/dev
Dev to main
- Loading branch information
Showing
35 changed files
with
1,464 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Versions | ||
|
||
- (**1.0.3**: abandonnée: pas de sens de ce système de version.) | ||
- **0.1.0**: Projet initial en **javasciript** | ||
- **0.2.0**: Réécriture en **typescript** | ||
- **1.0.0**: Quand le module sera stable | ||
|
||
## 0.2.5 | ||
|
||
- Ajout de la fonction `getFileBase64()` pour récupérer un fichier en base64 | ||
- Ajout de `getBase64()` dans la classe `Menu` | ||
|
||
## 0.2.4 | ||
|
||
- Ajout des téléchargements | ||
- Ajout des commandes | ||
- Support de nouvelles erreurs | ||
- Meilleur support du token permanent | ||
|
||
## 0.2.3 | ||
|
||
- Erreur `526` | ||
- POC commandes | ||
- Module Esidoc | ||
|
||
## 0.2.2 | ||
|
||
- NPM organisation configured | ||
- Added permanent token support (`renewToken()`) | ||
|
||
## 0.2.1 | ||
|
||
- Reconfiguration du `tsconfig.json` pour build correctement et publier sur **NPM** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This CITATION.cff file was generated with cffinit. | ||
# Visit https://bit.ly/cffinit to generate yours today! | ||
|
||
cff-version: 1.2.0 | ||
title: Papillon Ecoledirecte Core | ||
message: 'If you use this software, please cite it as below.' | ||
type: software | ||
authors: | ||
- family-names: Linise | ||
given-names: Vince | ||
email: [email protected] | ||
- name: les contributeurs de Papillon | ||
repository-code: 'https://github.com/papillonapp/papillon-ed-core' | ||
url: 'https://getpapillon.xyz' | ||
abstract: >- | ||
A typed wrapper for Ecoledirecte's private API written in | ||
Typescript. | ||
keywords: | ||
- ecoledirecte | ||
- papillon | ||
license: GPL-3.0 | ||
version: 0.2.4 | ||
date-released: '2024-03-10' |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,19 +49,35 @@ Le module est exporté vers NPM, il doit donc respecter les règles de codage de | |
- [x] Lister | ||
- [ ] Rejoindre (pas testé) | ||
- [ ] Quitter (pas testé) | ||
- [ ] ??? (récupérer membres, docs, et autres...) | ||
- [x] Agenda | ||
- [x] Lister les discussions | ||
- [ ] Cloud | ||
- [x] Lister les membres | ||
- [ ] Cloud | ||
- [ ] Téléchargement de fichiers (`/telechargement.awp`) | ||
|
||
## Documentation | ||
Voir le fichier [`DOCUMENTATION.md`](DOCUMENTATION.md) | ||
|
||
## Licence | ||
|
||
Cette base de code est distribuée par Papillon, sous la licence [CeCill V2.1](LICENSE). | ||
Cette base de code est distribuée par Papillon, sous la licence [**GPLv3**](LICENSE). | ||
|
||
```text | ||
papillon-ed-core Copyright (C) 2024 Vince Linise <[email protected]> et les contributeurs. | ||
This program comes with ABSOLUTELY NO WARRANTY; see license for details. | ||
This is free software, and you are welcome to redistribute it | ||
under certain conditions; see license for details. | ||
``` | ||
|
||
Elle est maintenue et développée par ses contributeurs : [LeMaitre](https://github.com/LeMaitre4523), [LeGeek](https://github.com/LeGeek01), [LucHack](https://github.com/lucas-luchack), [Azgar](https://github.com/azgaresncf), [Yann](https://github.com/yannouuuu), [Diego Finocchiaro](https://github.com/diegofino15) et [Armand Camponovo](https://github.com/camarm-dev) | ||
|
||
## Attributions | ||
|
||
- Les types (`src/types`), réadaptés par [Armand Camponovo](https://github.com/camarm-dev/ecoledirecte-api-types), originellement [a2br/ecoledirecte-api-types](https://github.com/a2br/ecoledirecte-api-types): _**_Aucune licence spécifiée_**_ | ||
- Certains autres types proviennent de [EduWireApps/ecoledirecte-api-docs](https://github.com/EduWireApps/ecoledirecte-api-docs): _**Aucune licence spécifiée**_ | ||
- Les types (`src/types`), réadaptés par [Armand Camponovo](https://github.com/camarm-dev/ecoledirecte-api-types), originellement [a2br/ecoledirecte-api-types](https://github.com/a2br/ecoledirecte-api-types) par [Anatole Debierre](https://github.com/a2br): licence [ISC](https://github.com/camarm-dev/ecoledirecte-api-types/blob/main/LICENSE) | ||
- Certains autres types proviennent de [EduWireApps/ecoledirecte-api-docs](https://github.com/EduWireApps/ecoledirecte-api-docs), par [MaitreRouge](https://github.com/MaitreRouge): **Aucune licence spécifiée** | ||
|
||
## Release | ||
|
||
> [!CAUTION] | ||
> Avant chaque release, mettre à jour `version` dans `package.json` et les champs `version` et `date-released` dans `citation.cff` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# TODOS | ||
|
||
Fichier informatif à l'égard des développeurs. | ||
|
||
## Liste | ||
|
||
- [x] Publier sur **NPM** | ||
- [ ] **Modifier** le `package.json` sur [PapillonApp/Papillon](https://github.com/papillonapp/papillon-ed-core), comme ci-dessous | ||
```diff | ||
- "papillon-ed-core": "github:papillonapp/papillon-ed-core", | ||
+ "papillon-ed-core": "@Papillon/papillon-ed-core", | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { login, ED } from "./login"; | ||
|
||
// Exemple de l'EDT | ||
|
||
login().then(() => { | ||
ED.homeworks.fetch().then(homeworks => { | ||
console.log("Devoirs:"); | ||
Object.keys(homeworks).forEach(key => { | ||
console.log(`\tPour le ${key}:`); | ||
const work = homeworks[key]; | ||
work.forEach(subject => { | ||
console.log(`\t\tDevoirs en ${subject.matiere} (${subject.codeMatiere}), donné le ${subject.donneLe}. ${subject.effectue ? "Effectué": "Non effectué"}, ${subject.interrogation ? "interrogation prévue": "pas d'interrogation"} et ${subject.rendreEnLigne ? "documents à rendre en ligne": "rien à rendre en ligne"}.`); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import {EDCore} from "../index"; | ||
import {studentAccount} from "~/types"; | ||
import { v4 as uuidv4 } from "uuid"; | ||
|
||
export const ED = new EDCore(); | ||
|
||
export async function login() { | ||
await ED.auth.login("username", "password"); | ||
await ED.auth.login("jean", "jean%", uuidv4()).then(() => { | ||
const account = ED.student as studentAccount; | ||
console.log(`Logged in as ${account.particule} ${account.prenom} ${account.nom}`); | ||
}).catch(err => { | ||
console.error(`Failed to login: Error ${err.code}: ${err.message}`); | ||
process.exit(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"preset": "ts-jest", | ||
"testEnvironment": "node" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.