ground-weather-api v1.0.3
Ground-Weather
Ground Weather is a small library designed to make it easier to work with the weather. It is a kind of Wrapper for WeatherAPI.
How to use
You need to install the library using npm install ground-weather-api
. After that, you will be presented with two classes: Weather
and Place
. The first is needed to access the weather API, and the second is required for the arguments of the weather methods.
The initialization of both classes is very simple:
- Weather Class:
// If you want to use CommonJS:
const WeatherAPI = require('ground-weather-api');
api = new WeatherAPI.Weather('YOUR_WEATHER_TOKEN');
// Or, this is for ES Module:
import { Weather } from 'ground-weather-api';
api = new Weather('YOUR_WEATHER_TOKEN');
- Place Class:
// CommonJS:
const WeatherAPI = require('ground-weather-api');
place = new WeatherAPI.Place(LOCATION_DATA);
// ES Module:
import { Place } from 'ground-weather-api';
place = new Place(LOCATION_DATA);
Documentation
You can check out the full documentation here. This documentation describes most of the actions you need to do to get the library working, but it does not include getting the WeatherAPI key. The documentation on obtaining the key is here.
Special thanks
The development team would like to thank:
- WeatherAPI: for providing access to its API;
- Microsoft: for the provision of IDE and the main development language: TypeScript;
License
This library is licensed under the MIT license. You can read the license in detail here. Read the terms of use here.
© 2021, GroundPi Team.