No description, website, or topics provided.
HTML CSS PHP JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_config
code/services
owfonts
composer.json
readme.md

readme.md

SilverStripe weather forecast module

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.