nyeholt/silverstripe-weatherforecast
Retrieve a weather forecast (uses openweather)
Maintainers
Package info
github.com/nyeholt/silverstripe-weatherforecast
Language:HTML
Type:silverstripe-module
pkg:composer/nyeholt/silverstripe-weatherforecast
dev-master / 1.0.x-dev
2016-07-20 07:19 UTC
Requires
- silverstripe/framework: ~3.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
BSD-3-Clause 4cf065317b11fc758bbdf7b35add0df8f20e3fe0
- Marcus Nyeholt <marcus.woop@silverstripe.com.au>
This package is auto-updated.
Last update: 2026-06-29 01:33:16 UTC
README
Usage
In your project .yml config
---
Name: weather-config
After: weatherforecast/*
---
Injector:
OpenWeatherService:
properties:
key: {your key here}
From your code, call the following. The LocationID will need to be looked up from the openweather site.
Requirements::css('weatherforecast/owfonts/css/owfont-regular.min.css');
$forecast = singleton('OpenWeatherService')->forecastFor($locationID);
PLEASE NOTE
The requirements of OpenWeatherMaps mean you must provide attribution on your site for using the service.
