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

https://github.com/trickypr/bomjs

A wrapper over the Australian Bureau of Meteorology api
https://github.com/trickypr/bomjs

api australia bom bureau-of-meteorology metorology weather weather-api

Last synced: 5 months ago
JSON representation

A wrapper over the Australian Bureau of Meteorology api

Awesome Lists containing this project

README

          

BomJS


A wrapper over the Australian Bureau of Meteorology api



Node version
npm (tag)

DocsNPMGithub

## Install
```sh
yarn add bomjs
# or
npm install bomjs
```

## Grab some observations
```ts
import { getObservationsWMO, getObservationsBOMID, IObservation, States } from '../dist/app'

// WMO
const data: IObservation = await getObservationsWMO(94768, States.NSW)

// BOM ID
const data: IObservation = await getObservationsBOMID(69017, States.NSW)
```

## Grab forecasts
```ts
import { getForecastFromDescription, getForecast, States } from '../build/app'

// From description
const forecast: IForecast = await getForecastFromDescription('canberra', States.NSW)

// From forecast id
const forecast: IForecast = await getForecast('NSW_PW012', States.NSW)
```

## Changelog
- 1.0.0: Inital release
- 1.0.1: Include typescript in the npm bundle
- 1.0.2: Better docs for npm, and increase the build to `ES2018`

A more detailed change log is available on [the github repo](https://github.com/trickypr/bomjs/blob/master/CHANGELOG.md).