A simple api wrapper written in typescript for luftdaten
npm install @kuuki/luftdaten
!GitHub

@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.
@kuuki/lufdaten-events, that exposes EventEmitter and emits events accordingly.@kuuki/luftdaten requires Node.js to run on the backend.``sh`
$ npm install --save @kuuki/luftdaten
javascript
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.