# ts-open-weather-map

> A TypeScript wrapper for the Open Weather Map API.

Latest version **3.0.0** (published 2024-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-open-weather-map
pnpm add ts-open-weather-map
yarn add ts-open-weather-map
bun add ts-open-weather-map
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2024-04-20 |
| First published | 2021-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | David Fishlock |
| Maintainers | davidfishlock |

## Links

- npm: https://www.npmjs.com/package/ts-open-weather-map
- Repository: https://github.com/davidfishlock/ts-open-weather-map
- Homepage: https://github.com/davidfishlock/ts-open-weather-map#readme
- Issues: https://github.com/davidfishlock/ts-open-weather-map/issues
- npm.io page: https://npm.io/package/ts-open-weather-map

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^1.6.8
- [url-join](https://npm.io/package/url-join.md) ^4.0.1
- [axios-retry](https://npm.io/package/axios-retry.md) ^3.2.4
- [axios-case-converter](https://npm.io/package/axios-case-converter.md) ^1.0.0

## Recent versions

- 3.0.0 (latest) — 2024-04-20
- 0.0.9 — 2021-11-18
- 0.0.8 — 2021-11-17
- 0.0.3 — 2021-11-16

## README

# 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)
```

---
_Source: https://npm.io/package/ts-open-weather-map · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
