Weather from the Australian Bureau of Meteorology
Ruby
Latest commit 139b5bb Jun 26, 2008 1 @benschwarz Corrected specs
Permalink
Failed to load latest commit information.
lib Corrected specs Jun 26, 2008
spec Corrected specs Jun 26, 2008
tasks Another commit, more specs Apr 2, 2008
README.textile more on usage in README Jun 21, 2008
Rakefile Another commit, more specs Apr 2, 2008
bom-weather.gemspec Added gemspec Apr 29, 2008

README.textile

BOMWeather

Weather from the Australian Bureau of Meteorology (BOM)

Usage

To get the weather forecast, there are a few options:

  1. Getting a location by name
    BOMWeather::Location.find({ :location => "NAME" })
  2. Getting a location by BOM location id
    BOMWeather::Location.find({ :loc_id => "ID" })
  3. Getting a whole state’s weather forecasts
    BOMWeather::Location.find({ :state => "STATE" })

    This takes state’s in abbreviated form (e.g. WA, NSW, VIC)

Provided this finds a location (or locations), you will get an array of Location objects.

You can then get access to the forecast information:

loc = BOMWeather::Location.find({ :location => "NAME" })
loc.first.outlook

This returns an array of Forecast objects, each of which have the following accessible methods

  1. max_temp
  2. min_temp
  3. conditions
  4. forecast_date (a Time object)
  5. issue_time