1.2.0 • Published 4 years ago

@kuuki/gios v1.2.0

Weekly downloads
8
License
ISC
Repository
-
Last release
4 years ago

lerna GitHub

@kuuki/gios is a simple api wrapper for GIOS written in TypeScript.

GIOS stands for (CHIEF INSPECTORATE FOR ENVIRONMENTAL PROTECTION).

This library provides the following functionality:

  • Retrieve all measurement stations.
  • Retrieve all measurement station sensors.
  • Retrieve latest measurements of a sensor (up to 24h back) with time series granularity of 1 hour.
  • Retrieve air quality index for a station.

About

This library focuses on providing a strictly typed API definition. If you need something more, check out @kuuki/gios-events

Installation

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

$ npm install --save @kuuki/gios

Usage

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

// use with async await
(async() => {
  const api = new gios.GiosAirQualityService();
  const measurements = await api.getMeasurements(88);
  console.log(measurements);
})();

// use with Promises
const api = new gios.GiosAirQualityService();
api.getMeasurements(88).then((measurements) => {
  console.log(measurements);
});

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.

Gios API

The official API docs can be viewed at Gios.

1.2.0

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago