@robinpath/weather
v0.3.0
Published
Weather, forecasts, alerts, and geocoding via OpenWeatherMap
Readme
@robinpath/weather
Weather module for RobinPath.
Why use this module?
The weather module lets you:
- getCurrentWeather
- getForecast
- get5DayForecast
- getHourlyForecast
- getAirQuality
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
robinpath add @robinpath/weatherQuick Start
1. Set up credentials
weather.setCredentials "your-credentials"2. getCurrentWeather
weather.getCurrentWeatherAvailable Functions
| Function | Description |
|----------|-------------|
| weather.setCredentials | Configure weather credentials. |
| weather.getCurrentWeather | getCurrentWeather |
| weather.getForecast | getForecast |
| weather.get5DayForecast | get5DayForecast |
| weather.getHourlyForecast | getHourlyForecast |
| weather.getAirQuality | getAirQuality |
| weather.getUVIndex | getUVIndex |
| weather.getWeatherByZip | getWeatherByZip |
| weather.getHistoricalWeather | getHistoricalWeather |
| weather.getWeatherAlerts | getWeatherAlerts |
| weather.geocodeCity | geocodeCity |
| weather.reverseGeocode | reverseGeocode |
| weather.getWeatherMap | getWeatherMap |
Examples
getCurrentWeather
weather.getCurrentWeathergetForecast
weather.getForecastget5DayForecast
weather.get5DayForecastIntegration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/weather";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
weather.setCredentials "your-credentials"
weather.getCurrentWeather
`);Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
