An open API service indexing awesome lists of open source software.

https://github.com/vviktorpl/ts-gios

TypeScript wrapper for GIOŚ API
https://github.com/vviktorpl/ts-gios

Last synced: 3 months ago
JSON representation

TypeScript wrapper for GIOŚ API

Awesome Lists containing this project

README

        

# ts-gios
Type-safe TypeScript wrapper for [GIOŚ API](https://powietrze.gios.gov.pl/pjp/content/api).

## Example
```typescript
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')
);
}
);
```