
Security News
New CNA Scorecard Tool Ranks CVE Data Quality Across the Ecosystem
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
cuba-weather-javascript
Advanced tools
Application programming interface of the Cuba Weather project implemented in JavaScript.
Currently the weather information is obtained from the Cuban search engine www.redcuba.cu.
npm install cuba-weather-javascript
You can also clone or download this repository and at the root of the project do:
git clone https://github.com/kenriortega/cuba-weather-javascript.git
npm test
const { RCApiClient, RCWeather } = require('../lib')
async function main() {
let locationStr = 'Municipio Especial Isla de la Juventud'
try {
let res = await RCApiClient.get(locationStr)
let weather = new Weather(res.data.data)
console.log(weather.weathertoString())
} catch (err) {
let error = {
status: err.response.status,
statusText: err.response.statusText,
locationStr,
}
console.log(error)
}
}
main().catch(console.error)
const { IsmetWeather, IsmetClient } = require('../lib')
async function main() {
try {
let res = await IsmetClient.get()
let weather = new IsmetWeather(res.data)
console.log(weather.getAllDataFromIsmet())
} catch (err) {
console.log(err)
}
}
main().catch(console.error)
const {
RCApiClient,
RCWeather,
RED_CUBA_SOURCE,
MUNICIPALITIES,
UtilsService,
} = require('../lib')
async function main() {
let locationStr = 'cerro'
let municipality = MUNICIPALITIES.find(
(municipality) => municipality.nameCured === locationStr
)
let bestSource = UtilsService.getBestDistanceByMunicipality(
municipality,
RED_CUBA_SOURCE
)
try {
let res = await RCApiClient.get(bestSource.name)
let weather = new RCWeather(res.data.data)
console.log(weather.weathertoString())
} catch (err) {
console.log(err)
}
}
main().catch(console.error)
FAQs
Simple SDK for cuba_weather API
We found that cuba-weather-javascript 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 CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.