
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
openweathermap-node
Advanced tools
An Openweathermap wrapper for nodejs
You need an API Key to use the OpenWeatherMap API. Head on over to their website if you don't already have one.
npm install openweathermap-node
const OpenWeatherMapHelper = require("openweathermap-node");
const helper = new OpenWeatherMapHelper(
{
APPID: 'YOUR_OPENWEATHERMAP_API_KEY_GOES_HERE',
units: "imperial",
lang: "en"
}
);
imperial
metric
Code | Language |
---|---|
af | Afrikaans |
al | Albanian |
ar | Arabic |
az | Azerbaijani |
bg | Bulgarian |
ca | Catalan |
cz | Czech |
da | Danish |
de | German |
el | Greek |
en | English |
eu | Basque |
fa | Persian (Farsi) |
fi | Finnish |
fr | French |
gl | Galician |
he | Hebrew |
hi | Hindi |
hr | Croatian |
hu | Hungarian |
id | Indonesian |
it | Italian |
ja | Japanese |
kr | Korean |
la | Latvian |
lt | Lithuanian |
mk | Macedonian |
no | Norwegian |
nl | Dutch |
pl | Polish |
pt | Portuguese |
pt_br | Português Brasil |
ro | Romanian |
ru | Russian |
sv, se | Swedish |
sk | Slovak |
sl | Slovenian |
sp, es | Spanish |
sr | Serbian |
th | Thai |
tr | Turkish |
ua, uk | Ukrainian |
vi | Vietnamese |
zh_cn | Chinese Simplified |
zh_tw | Chinese Traditional |
zu | Zulu |
helper.getCurrentWeatherByCityName("Accra", (err, currentWeather) => {
if(err){
console.log(err);
}
else{
console.log(currentWeather);
}
});
helper.getCurrentWeatherByCityID("524901", (err, currentWeather) => {
if(err){
console.log(err);
}
else{
console.log(currentWeather);
}
});
helper.getCurrentWeatherByGeoCoordinates(5.6037, 0.1870, (err, currentWeather) => {
if(err){
console.log(err);
}
else{
console.log(currentWeather);
}
});
helper.getCurrentWeatherByZipCode("90003", (err, currentWeather) => {
if(err){
console.log(err);
}
else{
console.log(currentWeather);
}
});
helper.getThreeHourForecastByCityName("Pretoria", (err, threeHourForecast) => {
if(err){
console.log(err);
}
else{
console.log(threeHourForecast);
}
});
helper.getThreeHourForecastByCityID("524901", (err, threeHourForecast) => {
if(err){
console.log(err);
}
else{
console.log(threeHourForecast);
}
});
helper.getThreeHourForecastByGeoCoordinates(6.5244,3.3792, (err, threeHourForecast) => {
if(err){
console.log(err);
}
else{
console.log(threeHourForecast);
}
});
helper.getThreeHourForecastByZipCode("94040", (err, threeHourForecast) => {
if(err){
console.log(err);
}
else{
console.log(threeHourForecast);
}
});
FAQs
An OpenWeatherMap Wrapper For Node.js
The npm package openweathermap-node receives a total of 83 weekly downloads. As such, openweathermap-node popularity was classified as not popular.
We found that openweathermap-node demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.