owm-toolkit

0.2.3 • Public • Published

OpenWeatherMap Toolkit

Toolkit to reduce pain using OpenWeatherMap API.

Why are there so few methods?

It's because of OWM API free plan limitations. This toolkit is mainly built for beginners doing the common weather application test tasks.

Usage

All examples related to Saint-Petersburg, Russia. Its ID on OpenWeatherMap is 498817.

For more details check out API reference.

Install dependency

npm install owm-toolkit --save

Or you can use Yarn (which is faster):

yarn add owm-toolkit

Initialize OWMToolkit instance

import { OWMToolkit } from 'owm-toolkit';

const owm = new OWMToolkit('myApiKey');

General usage of any method (examples below are without .then() and .catch())

owm.SOME_METHOD(498817)
  .then(res => console.log(res))
  .catch(err => console.error(err));

Get current weather data

owm.getCurrent(498817)

Get 5 day / 3 hour forecast

owm.getThreeHours(498817)

Find city

owm.findCity('Saint Petersburg, RU')

Package Sidebar

Install

npm i owm-toolkit

Weekly Downloads

0

Version

0.2.3

License

MIT

Unpacked Size

28.7 kB

Total Files

5

Last publish

Collaborators

  • pengfluf