Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
weather-information-api
Advanced tools
A simple JavaScript package to fetch weather information from OpenWeatherMap API.
A simple JavaScript package to fetch weather information from OpenWeatherMap API.
You can install the package via npm:
npm install weather-information-api
First, import the WeatherAPI
class from the package:
const WeatherAPI = require('weather-information-api');
Then, create an instance of WeatherAPI
with your OpenWeatherMap API key:
const apiKey = 'YOUR_API_KEY';
const weather = new WeatherAPI(apiKey);
You can fetch weather data by city name using the getWeatherByCity
method:
const cityWeather = await weather.getWeatherByCity('London');
console.log('Weather in London:', cityWeather);
Or you can fetch weather data by coordinates using the getWeatherByCoordinates
method:
const coordWeather = await weather.getWeatherByCoordinates(51.51, -0.13);
console.log('Weather at coordinates:', coordWeather);
Replace 'YOUR_API_KEY'
with your actual OpenWeatherMap API key.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A simple JavaScript package to fetch weather information from OpenWeatherMap API.
The npm package weather-information-api receives a total of 0 weekly downloads. As such, weather-information-api popularity was classified as not popular.
We found that weather-information-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.