0.0.2 • Published 4 years ago

ts-gios v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

ts-gios

Type-safe TypeScript wrapper for GIOŚ API.

Example

import { getAirQuality } from 'ts-gios';

const STATION_ID = 52;

getAirQuality(STATION_ID).then(
  ({ generalIndex, indexes }) => {
    console.log(`Status: ${generalIndex.indexLevel.name}`);
    console.log(
      indexes
        .map(({ name, indexLevel }) => `${name.toUpperCase()}: ${indexLevel.name}`)
        .join('\n')
    );
  }
);