Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Dec 26, 2020
1 parent 9b3d55f commit 82d46f4
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 13 deletions.
45 changes: 37 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ Support non-officiel de l'API Kdecole (Mon Bureau Numérique, Skolengo, etc.)
* [.getMessagerieInfo()](#Kdecole+getMessagerieInfo) ⇒ <code>Promise.&lt;MessageInfo&gt;</code>
* [.getMessagerieBoiteReception()](#Kdecole+getMessagerieBoiteReception) ⇒ <code>Promise.&lt;MessageBoiteReception&gt;</code>
* [.getCommunication(id)](#Kdecole+getCommunication) ⇒ <code>Promise.&lt;Communication&gt;</code>
* [.signalerCommunication(id)](#Kdecole+signalerCommunication) ⇒ <code>Promise.&lt;void&gt;</code>
* [.supprimerCommunication(id)](#Kdecole+supprimerCommunication) ⇒ <code>Promise.&lt;void&gt;</code>
* [.reportCommunication(id)](#Kdecole+reportCommunication) ⇒ <code>Promise.&lt;void&gt;</code>
* [.deleteCommunication(id)](#Kdecole+deleteCommunication) ⇒ <code>Promise.&lt;void&gt;</code>
* [.setCommunicationLu(id)](#Kdecole+setCommunicationLu) ⇒ <code>Promise.&lt;void&gt;</code>
* [.sendMessage(id, corpsMessage)](#Kdecole+sendMessage) ⇒ <code>Promise.&lt;void&gt;</code>
* [.getMoyenneGenerale(trimestre, idEleve)](#Kdecole+getMoyenneGenerale) ⇒ <code>Promise.&lt;number&gt;</code>
* [.getMedianeGenerale(trimestre, idEleve)](#Kdecole+getMedianeGenerale) ⇒ <code>Promise.&lt;number&gt;</code>
* [.kdecole()](#Kdecole+kdecole)
Expand Down Expand Up @@ -200,9 +202,9 @@ Retourne les détails d'un fil de discussion

**Example**
```jsconst Kdecole = require('kdecole-api').defaultconst user = new Kdecole(AUTH_TOKEN)user.getCommunication(id).then((communication)=>{ // Votre code })```
<a name="Kdecole+signalerCommunication"></a>
<a name="Kdecole+reportCommunication"></a>

### kdecole.signalerCommunication(id) ⇒ <code>Promise.&lt;void&gt;</code>
### kdecole.reportCommunication(id) ⇒ <code>Promise.&lt;void&gt;</code>
Permet de signaler une communication

**Kind**: instance method of [<code>Kdecole</code>](#Kdecole)
Expand All @@ -212,10 +214,10 @@ Permet de signaler une communication
| id | <code>number</code> | Identifiant d'un fil de discussion |

**Example**
```jsconst Kdecole = require('kdecole-api').defaultconst user = new Kdecole(AUTH_TOKEN)user.signalerCommunication(id)```
<a name="Kdecole+supprimerCommunication"></a>
```jsconst Kdecole = require('kdecole-api').defaultconst user = new Kdecole(AUTH_TOKEN)user.reportCommunication(id)```
<a name="Kdecole+deleteCommunication"></a>

### kdecole.supprimerCommunication(id) ⇒ <code>Promise.&lt;void&gt;</code>
### kdecole.deleteCommunication(id) ⇒ <code>Promise.&lt;void&gt;</code>
Supprime la communication

**Kind**: instance method of [<code>Kdecole</code>](#Kdecole)
Expand All @@ -225,7 +227,34 @@ Supprime la communication
| id | <code>number</code> | Identifiant d'un fil de discussion |

**Example**
```jsconst Kdecole = require('kdecole-api').defaultconst user = new Kdecole(AUTH_TOKEN)user.supprimerCommunication(id)```
```jsconst Kdecole = require('kdecole-api').defaultconst user = new Kdecole(AUTH_TOKEN)user.deleteCommunication(id)```
<a name="Kdecole+setCommunicationLu"></a>

### kdecole.setCommunicationLu(id) ⇒ <code>Promise.&lt;void&gt;</code>
Marquer une communication lue

**Kind**: instance method of [<code>Kdecole</code>](#Kdecole)

| Param | Type | Description |
| --- | --- | --- |
| id | <code>number</code> | Identifiant d'un fil de discussion |

**Example**
```jsconst Kdecole = require('kdecole-api').defaultconst user = new Kdecole(AUTH_TOKEN)user.setCommunicationLu(id)```
<a name="Kdecole+sendMessage"></a>

### kdecole.sendMessage(id, corpsMessage) ⇒ <code>Promise.&lt;void&gt;</code>
Envoyer un message sur un fil de discussion

**Kind**: instance method of [<code>Kdecole</code>](#Kdecole)

| Param | Type | Description |
| --- | --- | --- |
| id | <code>number</code> | Identifiant d'un fil de discussion |
| corpsMessage | <code>string</code> | Corps du message HTML |

**Example**
```jsconst Kdecole = require('kdecole-api').defaultconst user = new Kdecole(AUTH_TOKEN)user.sendMessage(id, corpsMessage)```
<a name="Kdecole+getMoyenneGenerale"></a>

### kdecole.getMoyenneGenerale(trimestre, idEleve) ⇒ <code>Promise.&lt;number&gt;</code>
Expand Down
35 changes: 30 additions & 5 deletions types/Kdecole.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ContenuActivite } from './entities/Travail/ContenuActivite';
import { ContenuArticle } from './entities/News/ContenuArticle';
import { Communication } from './entities/Messagerie/Communication';
interface KdecoleRequest {
service: 'starting' | 'actualites' | 'contenuArticle' | 'activation' | 'consulterReleves' | 'consulterAbsences' | 'infoutilisateur' | 'desactivation' | 'calendrier' | 'consulterNotes' | 'messagerie/info' | 'messagerie/boiteReception' | 'messagerie/communication' | 'messagerie/communication/nouvelleParticipation' | 'messagerie/communication/signaler' | 'messagerie/communication/supprimer' | 'travailAFaire' | 'contenuActivite' | 'gestionAppels';
service: 'starting' | 'actualites' | 'contenuArticle' | 'activation' | 'consulterReleves' | 'consulterAbsences' | 'infoutilisateur' | 'desactivation' | 'calendrier' | 'consulterNotes' | 'messagerie/info' | 'messagerie/boiteReception' | 'messagerie/communication' | 'messagerie/communication/nouvelleParticipation' | 'messagerie/communication/signaler' | 'messagerie/communication/supprimer' | 'messagerie/communication/lu' | 'travailAFaire' | 'contenuActivite' | 'gestionAppels';
parameters?: string;
type?: 'get' | 'post' | 'delete' | 'put';
data?: any;
Expand Down Expand Up @@ -239,10 +239,10 @@ export default class Kdecole {
* const Kdecole = require('kdecole-api').default
*
* const user = new Kdecole(AUTH_TOKEN)
* user.signalerCommunication(id)
* user.reportCommunication(id)
* ```
*/
signalerCommunication(id: number): Promise<void>;
reportCommunication(id: number): Promise<void>;
/**
* Supprime la communication
* @param {number} id Identifiant d'un fil de discussion
Expand All @@ -251,10 +251,35 @@ export default class Kdecole {
* const Kdecole = require('kdecole-api').default
*
* const user = new Kdecole(AUTH_TOKEN)
* user.supprimerCommunication(id)
* user.deleteCommunication(id)
* ```
*/
supprimerCommunication(id: number): Promise<void>;
deleteCommunication(id: number): Promise<void>;
/**
* Marquer une communication lue
* @param id {number} Identifiant d'un fil de discussion
* @return {Promise<void>}
* @example ```js
* const Kdecole = require('kdecole-api').default
*
* const user = new Kdecole(AUTH_TOKEN)
* user.setCommunicationLu(id)
* ```
*/
setCommunicationLu(id: number): Promise<void>;
/**
* Envoyer un message sur un fil de discussion
* @param id {number} Identifiant d'un fil de discussion
* @param corpsMessage {string} Corps du message HTML
* @return {Promise<void>}
* @example ```js
* const Kdecole = require('kdecole-api').default
*
* const user = new Kdecole(AUTH_TOKEN)
* user.sendMessage(id, corpsMessage)
* ```
*/
sendMessage(id: number, corpsMessage: string): Promise<void>;
/**
* Retourne la valeur exacte de la moyenne générale de l'élève
* @param {number} trimestre Numéro du trimestre (1, 2 ou 3)
Expand Down

0 comments on commit 82d46f4

Please sign in to comment.