node-ts-open-weather-map

Node.js typescript OpenWeatherMap api wrapper

Usage no npm install needed!

<script type="module">
  import nodeTsOpenWeatherMap from 'https://cdn.skypack.dev/node-ts-open-weather-map';
</script>

README

Build Status Coverage Status semantic-release npm version Donate

Simplified OpenWeatherMap API client

ExampleInstallationCreditsLicenseDonations

Example

try {
  const { OpenWeatherMapApi } = require('node-ts-open-weather-map')
  const openWeatherMapApi = new OpenWeatherMapApi({
    key: process.env.OpenWeatherMapApiKey
  })

  const data = await openWeatherMapApi.byCityName({
    name: 'London',
    countryCode: 'gb'
  })

  console.log(data)
} catch (error) {
  console.log(error)
}

Installation

$ npm i node-ts-open-weather-map

Credits

This software uses the following open source packages:

License

MIT

Donations

Buy Me A Coffee