npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sphclient

v4.0.2

Published

This project is currently inactive. Currently, my focus is on [lanis-mobile](https://github.com/alessioC42/lanis-mobile). Although the code in this repository may work, it is not of high quality. For a better interface, please check out [LanisAPI](https:/

Downloads

21

Readme

currently dead

This project is currently inactive. Currently, my focus is on lanis-mobile. Although the code in this repository may work, it is not of high quality. For a better interface, please check out LanisAPI by kurwjan. Additionally, some features in the app may have been reverse-engineered. Take a look at this file for a comprehensive collection of SPH parsing: https://github.com/alessioC42/lanis-mobile/blob/main/app/lib/client/client.dart. For encryption, refer to this file: https://github.com/alessioC42/lanis-mobile/blob/main/app/lib/client/cryptor.dart, created by kurwjan.

SPHclient

Ein nodejs modul um mit dem Hessischen Schulporal zu interagieren.

Auch interessant:

Android APP: https://github.com/alessioC42/lanis-mobile

Features

  • [x] login / logout
  • [x] Vertretungsplan
  • [x] Kalender

Für weitere features kann ein Issue mit dem tag "feature request" oder eine pull request geöffnet werden.

Da jede Schule über eine andere "Ausstattung" mit Lanis verfügt (siehe hier) kann ich nicht jedes Feature implementieren. Ich kann ausschließlich die Features meiner Schule (5182 - Max-Planck-Schule Rüsselsheim) behandeln.

Beispiel

npm i sphclient
const SPHclient = require("./SPHclient");
const secrets = require("./secrets.json")

const client = new SPHclient(secrets.username, secrets.password, secrets.schoolid);

client.authenticate().then(() => {
    client.getVplanDates().then(dates => {

        const fetchPromises = [];

        dates.forEach(date => {
            console.log("fetching date: " + date);
            const promise = client.getVplan(date);
            fetchPromises.push(promise);
        });

        Promise.all(fetchPromises).then(plans => {
            const fullplan = [].concat(...plans);
            console.log(fullplan);
        })
    });
});

hilfreiche Links

  • lanis Helpcenter

  • mögliche Loginprobleme mit einigen Schulen

  • alle "Apps" innerhalb des Schulportal Hessen. (Konfiguation variiert nach Schule)

  • algemeine Info (Server Status / Updates / ganz bissen Doumentation)

  • Lanis Datenschutzerklärung

    • Session nur 100 min gültig
    • unten stehen alle Cookies definiert

API

SPHclient(username, password, schoolID, loggingLevel = 1)

Die SPHclient-Klasse ist die Schnittstelle zwischen dem Code und der Lanis-API.

  • username: Benutzername
  • password: Passwort
  • schoolID: Schulnummer

SPHclient.authenticate()

Für alle weiteren API-Aufrufe muss eine Authentifizierung erfolgen. Alle weiteren Anfragen können erst nach dem Aufruf von authenticate() durchgeführt werden.

SPHclient.logout()

Beendet die aktuelle Sitzung. Nach dem Ausloggen kann eine erneute Authentifizierung mit authenticate() durchgeführt werden.

SPHclient.getVplan(date)

Gibt den gesamten Vertretungsplan der Schule als Objekt zurück. date muss ein Date()-Objekt sein. Diese Methode gibt ein Promise zurück, das den Vertretungsplan enthält.

SPHclient.getCalendar(start, end)

Gibt den Online-Kalender der Schule als Objekt zurück. start und end sind beide Date()-Objekte, die den Zeitraum bestimmen. Diese Methode gibt ein Promise zurück, das den Kalender enthält.

SPHclient.getVplanDates()

Gibt die aktuell verfügbaren Termine angezeigten Vertretungsplans auf der Website als Date()-Objekt Array zurück. Diese Methode gibt ein Promise zurück, das ein Array enthält.