1.0.3 • Published 3 years ago

@alufactorer/kapi v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Kaschuso API

Important!: not my original idea, just a port to javascript, with some documentation. original implementation from Thilo Jaeggi at Notely

Usage

schulnetz

overall function wrapper, ideally used as such:

 import {schulnetz} from "kapi.js"
 
 
 schulnetz(username, password, school, async token => {
  //use accesstoken here;
 })

getMe

gets information about you as a user, needs a token and a school if latter is not provided it will default to "ksso"


import {schulnetz, getMe} from "kapi.js"

 schulnetz(username, password, school, async token => {
  const me = await getMe(token, school);
  
  console.log(me)
 })

getGrades

retrieves a list of your available grades, needs a token and a school if latter is not provided it will default to "ksso"



import {schulnetz, getGrades} from "kapi.js"

 schulnetz(username, password, school, async token => {
  const grades = await getGrades(token, school);
  
  console.log(grades)
 })

getTimeTable

fetches your timetable, needs a token and a school if latter is not provided it will default to "ksso"


import {schulnetz, getTimeTable} from "kapi.js"

 schulnetz(username, password, school, async token => {
  const timeTable = await getTimeTable(token, school);
  
  console.log(timetable)
 })
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago