@kuuki/luftdaten
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

lerna GitHub Coverage Status

Kuuki logo

@kuuki/luftdaten

kuuki/luftdaten is a simple API wrapper for Luftdaten, written in TypeScript.

More info on Luftdaten APIs here.

This library provides the following functionality:

  • [x] Retrieve all latest (5min) measurements.
  • [x] Retrieve all latest measurements with sensor type filter.
  • [x] Retrieve all latest measurements with area filter.
  • [x] Retrieve all latest measurements with box filter.
  • [x] Retrieve all latest measurements with country filter.
  • [x] Retrieve an average of all latest measurements of a sensor (5min).
  • [x] Retrieve an average of all measurements of a sensor (1h).
  • [x] Retrieve an average of all measurements of a sensor (24h).
  • [x] Strictly typed models.

About

This library focuses on providing a strictly typed API wrapper. If you need something more sophisticated - check out @kuuki/lufdaten-events, that exposes EventEmitter and emits events accordingly.

Installation

@kuuki/luftdaten requires Node.js to run on the backend.

$ npm install --save @kuuki/luftdaten

Usage

const luftdaten = require("@kuuki/luftdaten");

const ld = new luftdaten.LuftdatenService();

(async () => {
  const measurements = await ld.getLatestMeasurements();
  measurements.forEach(m => {
    console.log(m)
  });
})();

Documentation

Generated docs are placed in the root /docs folder, you can preview them under this link, however the d.ts files should do just fine if you have your code editor and environment set up correctly.

Package Sidebar

Install

npm i @kuuki/luftdaten

Weekly Downloads

0

Version

1.1.3

License

ISC

Unpacked Size

35.1 kB

Total Files

54

Last publish

Collaborators

  • dacturne