
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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('../index')
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 {
RCApiClient,
RCWeather,
RED_CUBA_SOURCE,
MUNICIPALITIES,
UtilsService,
} = require('../index')
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
The npm package cuba-weather-javascript receives a total of 3 weekly downloads. As such, cuba-weather-javascript popularity was classified as not popular.
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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.