bom-weather
TypeScript icon, indicating that this package has built-in type declarations

1.1.9 • Public • Published

bom-weather

A simple package to receive data from the Australian Bureau of Meteorology API.

How to Use

All access to the API endpoints is done off the BOM class

import { BOM } from 'bom-weather';

All methods are static, and can be accessed without constructing the class. To access an endpoint, all methods require a 6-digit Geohash for the city to receive data for. Enums have been included for Geohashes of all the major cities of Australia. The current available endpoints are as follows

// Current Weather Observations
BOM.getObservations('GEOHASH')

// Current Weather Warnings (if available)
BOM.getWarnings('GEOHASH')

// Array of Current and Upcoming Daily Forecasts
BOM.getDailyForecast('GEOHASH')

// Array of Current and Upcoming Three-Hour Forecasts
BOM.getThreeHourForecast('GEOHASH')

// Current Rain Forecast (if available)
BOM.getRainForecast('GEOHASH');

Examples

Find the current weather observations for Sydney

import { BOM, Cities } from 'bom-weather';

await BOM.getObservations(Cities.SYDNEY);

Disclaimer

Please Note: This package is meant for test purposes only. Under no circumstances is this API to be used for commercial or monetary purposes. Please contact BOM directly to get access to a commercial license. All contributors on this package are in no way liable for any legal action taken against those misusing this API. By using this package you are acknowledging this disclaimer and agree to take personal responsibility to any misuse of this API

Readme

Keywords

Package Sidebar

Install

npm i bom-weather

Weekly Downloads

0

Version

1.1.9

License

MIT

Unpacked Size

3.33 MB

Total Files

72

Last publish

Collaborators

  • aircraft_overviewer