Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
node-weather-service
Advanced tools
Readme
This is a fairly simple API to use, it's really just a couple commands. Honestly, the hardest part is navigating the screwed up documentation all the data that is used has-- it took me like 20 minutes to figure out what the hell a 'gridpoint' is; I'll make an attempt to leave decent docs, but I'm not the best at it lol.
I'll just list the functions, hopefully my jsdoc is decent enoguh to carry me... If you need more clarification, take a look at this.
import weather from 'node-weather-service';
weather.getAlerts({ // This script gets all alerts
// between June 23, 2021 and June 24, 2021
start: '2021-06-23T09:07:21-07:00', // Start time
end: '2021-06-24T09:07:21-07:00'
}) // End time
.then((alerts) => { // Once request is finished
console.log(alerts);
});
weather.getGlossary() // This is probably the simplest method in this api,
// it's literally just one function call with no args
.then((glossary) => {
console.log(glossary);
});
weather.getGridPoint(null, 40.7, -74, { // Get hourly forecast from NYC
useLatLon: true, // Use lattitude and longitude instead of the weird
// coordinate system
forecast: true, // Get forecast data
hourly: true
}) // Make data hourly
.then((gridPoint) => {
console.log(gridPoint);
});
weather.getStations({ id: 'K12N' }) // Get data from K12N Station
.then((stations) => {
console.log(stations);
});
weather.getOffices({ id: 'OKX' }) // Gets data from OKX
// office
.then((offices) => {
console.log(offices);
});
weather.getPoint({ lat: 40.7, lon: -74 }) // The chad version of
// getGridPoint
.then((point) => {
console.log(point);
});
weather.getRadar({ stationid: 'K12N', stations: true })
// Get radar data from station K12N
.then((radar) => {
console.log(radar);
});
weather.getProducts({ // Get all items of type ABV at OKX I don't really
// know what this does, but it works, so eh
locations: true, // Sort by location
types: true, // Sort by type
typeid: 'ABV', // Type ID
locationid: 'OKX'
}) // Location ID
.then((products) => {
console.log(products);
});
weather.getZones({ // Get zone data of type land, id ANZ338
type: 'land',
zoneid: 'ANZ338',
forecast: true
})
.then((zone) => {
console.log(zone);
});
If you have any questions, shoot me an email at oranroha@gmail.com, or dm me on twitter @omanthehuman1, or just raise an issue, and I should respond pretty quickly. Contributions are greatly appreciated, to either my code or this dumpster fire of a readme. Oh yea, MIT license, do whatever you want with my code but I'm not liable if anything goes wrong, no warranty, etc
FAQs
Node.js wrapper for the api.weather.gov api.
The npm package node-weather-service receives a total of 1 weekly downloads. As such, node-weather-service popularity was classified as not popular.
We found that node-weather-service 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.