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
- Host: GitHub
- URL: https://github.com/trickypr/bomjs
- Owner: trickypr
- License: gpl-3.0
- Created: 2019-11-02T03:37:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T12:21:18.000Z (over 3 years ago)
- Last Synced: 2025-07-01T04:38:12.403Z (12 months ago)
- Topics: api, australia, bom, bureau-of-meteorology, metorology, weather, weather-api
- Language: TypeScript
- Homepage: https://trickypr.github.io/bomjs/
- Size: 3.43 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
BomJS
A wrapper over the Australian Bureau of Meteorology api
## 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).