ts-gios

GIOŚ API wrapper for TypeScript

Usage no npm install needed!

<script type="module">
  import tsGios from 'https://cdn.skypack.dev/ts-gios';
</script>

README

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')
    );
  }
);