
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
openweathermap-fetcher
Advanced tools
A fetcher for openweathermap api.Currently in initial stage.
To use this package API key of openweathermap is needed. To get this you need to
currently tested on free account openweather API.
you can install this package using below npm command
npm install openweathermap-fetcher
or
yarn add openweathermap-fetcher
import { OpenWeatherMap } from 'openweathermap-fetcher';
const apiKey='your_api_key';
const openweathermap = new OpenWeatherMap({apiKey});
async function run() {
try {
const data = await openweathermap.fetchWeatherDataByCityName("Delhi");
console.log("API Result:", data);
} catch (error) {
console.error("API Error:", error.message);
}
}
run();
fetchWeatherDataByCityName(cityName:string)
The method will fetch the weather data by taking cityname as an argument and returns weather data.
fetchWeatherDataByCoordinates(latitude:string,longitude:string)
This method will fetch the weather data by taking longitude and latitude as an argument and returns weather data.
fetchForecastDataByCityName(cityName:string)
The method will fetch the forecast data by taking cityname as an argument and returns weather data.
fetchForecastDataByCoordinates(latitude:string,longitude:string)
This method will fetch the forecast data by taking longitude and latitude as an argument and returns weather data.
We welcome contributions! If you'd like to contribute to openweathermap-wrapper, please follow our Contribution Guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
[1.1.0] - 2024-11-18
FAQs
A Wrapper for openweathermap API for node application.
We found that openweathermap-fetcher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.