Sha256: 84a5b33596eebaf2cdf931b8c6f1eaf6f693f2bd63a4db28b46af5490ab332c0

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

require 'owmo'


=begin rdoc
An example on how to get the extended forcast and use the different parameters.
=end
api_key = ""

OWMO::weather api_key: api_key do |weather|

  # http://openweathermap.org/forecast5
  query = {
    zip: "90210", # [city_name, city_id, zip, lat/lon]
    mode: 'json', # [json, xml, html] Not required, but an option
    units: 'imperial', # [imperial, metric] Not required, but an option
    lang: 'en_US' # Not required, but an option
  }

  forecast = weather.get :forecast, query

  puts forecast
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
owmo-0.2.0 examples/forecast.rb