3.0.0 • Published 19 days ago

ts-open-weather-map v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

ts-open-weather-map

A TypeScript wrapper for the Open Weather Map API.

Installation

npm install ts-open-weather-map

Usage

API keys can be obtained from the Open Weather Map website: https://openweathermap.org/api

OneCall Endpoint

Basic usage:

const api = new OpenWeatherMapApi("MY_API_KEY")
const response = await api.oneCall(67.75, 26.5) // Latitude and Longitude

Optional parameters:

// Exclude sections from the response, specify unit types and language
await api.oneCall(67.75, 26.5, ['minutely', 'alerts'], 'metric', 'en')

Geocoding - Get city data

// Get geo data for Lapland, max 5 results
await api.geoCoding('Lapland', 5)
3.0.0

19 days ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago