[commits] Horde branch master updated. 661c26df50b1f0515f89c4dad01b87ddf70e416f

Michael J. Rubinsky mrubinsk at horde.org
Sat Oct 29 05:38:58 UTC 2011


The branch "master" has been updated.
The following is a summary of the commits.

from: 2a33d2a73008ab9ae6d5acc4f1c4c868bcfb5ea8

661c26d Start a Horde/Service_Weather package.

-----------------------------------------------------------------------

commit 661c26df50b1f0515f89c4dad01b87ddf70e416f
Author: Michael J Rubinsky <mrubinsk at horde.org>
Date:   Sat Oct 29 01:30:46 2011 -0400

    Start a Horde/Service_Weather package.
    
    Not more than just a skeleton right now, but fetching the raw json results
    from weatherunderground is working.
    
    Basic idea is:
    
    $params = array(
        'apikey' => 'xxxxxx',
        'http_client' => $injector->getInstance('Horde_Core_Factory_HttpClient')->create());
    
    $location = new Horde_Service_Weather_Location_Base('KACY');
    $wug = new Horde_Service_Weather_WeatherUnderground($location, $params);
    $forecast = $wug->getForecast(Horde_Service_Weather::FORECAST_3DAY);
    $current = $wug->getCurrent():
    
    // Do something with $current
    
    foreach ($forecast as $period) {
      // Do something with $period
    }
    
    etc...

 framework/Service_Weather/lib/Horde/Service/Weather.php           |   27 +
 framework/Service_Weather/lib/Horde/Service/Weather/Base.php      |   60 ++
 framework/Service_Weather/lib/Horde/Service/Weather/Current.php   |   24 +
 framework/Service_Weather/lib/Horde/Service/Weather/Forecast.php  |   62 ++
 .../Service_Weather/lib/Horde/Service/Weather/Location/Base.php   |   51 ++
 framework/Service_Weather/lib/Horde/Service/Weather/Period.php    |   24 +
 framework/Service_Weather/lib/Horde/Service/Weather/Station.php   |   24 +
 .../lib/Horde/Service/Weather/WeatherUnderGround.php              |  154 +++++
 framework/Service_Weather/package.xml                             |  109 +++
 9 files changed, 535 insertions(+), 0 deletions(-)
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather.php
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather/Base.php
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather/Current.php
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather/Forecast.php
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather/Location/Base.php
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather/Period.php
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather/Station.php
 create mode 100644 framework/Service_Weather/lib/Horde/Service/Weather/WeatherUnderGround.php
 create mode 100644 framework/Service_Weather/package.xml

http://git.horde.org/horde-git/-/commit/661c26df50b1f0515f89c4dad01b87ddf70e416f




More information about the commits mailing list