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

wili

v0.7.1

Published

A Node client for the Wiener Linien public transport API

Downloads

44

Readme

wili

License Version Build

English | Deutsch

Node Wrapper für die Echtzeitdaten-API der Wiener Linien

Installation

npm install wili

Anwendung

Beispielanwendung:

import { createWienerLinien } from 'wili';

const wili = createWienerLinien();

const options = {
  relatedLine: ['U2', 'U4', 'U6']
};

// Promise API
wili.trafficInfoList(options)
  .then( data => {
    console.log(data.trafficInfos);
  })
  .catch( error => {
    console.error(error);
  });

// async/await
try {
  const data = await wili.trafficInfoList(options);
  console.log(data.trafficInfos);
} catch (output) {
  console.error(error);
}

:warning: Für NodeJS-Versionen unterhalb v18, muss die Klasse mit einer fetch-Implementierung instanziert werden.

Beispiel

import { createWienerLinien } from 'wili';
import fetch from 'isomorphic-fetch';

const wili = createWienerLinien(fetch);

API

monitor

Verwendung: monitor(rbl, [options])

Die Monitor Schnittstelle liefert Echtzeiten oder Planzeiten der nächsten 70 Minuten für einen Haltepunkt

Parameter:

rbl

Typen: String, Integer, Array

RBL Nummer (Rechnergestütztes Betriebsleitsystem), lässt sich hier abfragen

options.activeTrafficInfo

Typen: String, Array

Störungstypen: stoerungkurz, stoerunglang oder aufzugsinfo

newsList

Verwendung: newsList(options)

Die Schnittstelle liefert Neuigkeiten wie „Aktuelles“ oder „Aufzugswartungen”

Optionen

options.relatedLine

Typen: String, Integer, Array

Name der Linie, z.B. U1, S7, 59A (schreibungsunabhängig)

options.relatedStop

Typen: String, Integer, Array

Haltepunkt ID der Haltestelle

options.name

Typen: String, Array

Name der Nachrichtenkategorie, z.B news oder aufzugsservice

trafficInfoList

Verwendung: trafficInfoList([options])

Die Schnittstelle liefert Störungen

Optionen

options.relatedLine

Typen: String, Integer, Array

Name der Linie, z.B. U1, S7, 59A (schreibungsunabhängig)

options.relatedStop

Typen: String, Integer, Array

Haltepunkt ID der Haltestelle

options.name

Typen: String, Array

Störungstypen: stoerungkurz, stoerunglang oder aufzugsinfo

Lizenz

Diese Software unterliegt den Bestimmungen der MIT Lizenz

Spenden

Wenn Du mir einen Kaffee oder ein Bier ausgeben möchtest, freue mich über Spenden via Flattr oder Bitcoin 17CXJuPsmhuTzFV2k4RKYwpEHVjskJktRd