Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Latest commit

 

History

History
64 lines (43 loc) · 1.71 KB

File metadata and controls

64 lines (43 loc) · 1.71 KB

ForecastCFML

ForecastCFML is a wrapper for the Forecast.io v2 api (Dark Sky legacy). Forecast.io claims to be "The easiest, most advanced, weather API on the web".

Status / Notes

Forecast.io (Dark Sky) v2 is discontinued for new signups. Existing keys may still work, but the service is legacy. The original developer site https://developer.forecast.io/ is no longer available; keep a local copy of the API docs if you need it.

Usage

You need an account with Forecast.io. In the config.cfc, replace YOUR_APIKEY_GOES_HERE with your valid api key along with your latitude and longitude You may find your citys' coordinates by going to LatLong.net.

To use, call the getWeather() function which takes four arguments:

Implementation note

In Components/weather.cfc, make sure the config variable instantiates ForecastCFML.Components.config (not the weather component), or config.getSecrets() will fail.

Output

After plugging in with your parameters, code will generate this.

this.

Scripts

css

js

Version

1.0 Written by DannyD

2.0 Written by damiththa

License

Apache

Testing

Tested against Railo 4. Should work with ColdFusion (might have to import the https cert for https://api.forecast.io/forecast).