1.0.1 • Published 3 years ago

@lstilahun/openweather-api-library v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Open Weather Map API wrapper library

Open Weather Map API.

OpenWeather Class:

  1. const weather = OpenWeather(apiKey, units)
  2. weather.getWeatherByZip(zip)
  3. weather.getWeatherByCity(city)
  4. weather.getWeatherByCityID(cityId)
  5. weather.getWeatherByGeo(lat, lon)

Here is a list of the URLs this library uses:

  • By city name
    • api.openweathermap.org/data/2.5/weather?q={city name}&appid={API key}
  • By city ID
    • api.openweathermap.org/data/2.5/weather?id={city id}&appid={API key}
  • By geocoordinates
    • api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API key}
  • By zip code
    • api.openweathermap.org/data/2.5/weather?zip={zip code},{country code}&appid={API key}
1.0.1

3 years ago

1.0.0

3 years ago