Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
/ node-kreta Public archive

🎒 A Node.js API wrapper for KRÉTA!

License

Notifications You must be signed in to change notification settings

szkly/node-kreta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-kreta

🎒 A Node.js API wrapper for KRÉTA!

Features

  • Get every (or only the latest) evaluation, recorded absence, note or upcoming exam
  • Get your lessons for any week from your timetable
  • Get all cancelled or substituted lessons from your timetable
  • Get your average grades
  • Get all your homework
  • Add or delete your own homework for any lesson
  • Get all the information that is stored about you in KRÉTA

Installation

Using npm:

npm install node-kreta

Example

const Kreta = require("node-kreta");
const kreta = new Kreta();

const instituteCode = "klik000000000";
const username = "12345678912";
const password = "1970-01-01";

(async () => {
    // We store the bearer object which contains the access token and refresh token
    const bearer = await kreta.login(instituteCode, username, password);

    // We pass on the access token which we received earlier
    const absences = await kreta.getAbsences(bearer.accessToken);

    console.log(absences);
})();

Contributors

It wouldn't have been possible without the always up-to-date now archived API documentation, which is was maintained by boapps!

About

🎒 A Node.js API wrapper for KRÉTA!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published