1.5.1 • Published 7 years ago

rainman v1.5.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

npm.io

Rainman

A small library to get weather data. Currently only supports OpenWeatherMap.

Usage

import Rainman from 'rainman';

const rainman = new Rainman({ key: 'YOUR_API_KEY' });

rainman.get([0, 0]).then(response => {
  console.log(response);
});

Options

optiontyperequired?defaultnotes
keystringYou can get this from OpenWeatherMap.
accuracynumber2This rounds your latitude and longitude to the corresponding number of decimal places. e.g., [40.293480, -29.307948] will be rounded to [40.29, -29.31] at an accuracy of 2. This helps in caching requests and will work just fine if you don't need extremely specific weather data.
cachebooleantrueTurning this off will mean that no API calls will be cached. Turn off at your own risk, as you may be charged for extra API calls!
ttlnumber1 hour (60*60*60)Time To Live for cached requests
units'metric' | 'imperial''celcius'

Roadmap

  • Integrate extra services (Yahoo, DarkSky)
  • Give the option to standardise API responses into a single object
1.5.1

7 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago