Sha256: 7ebbc185b5f9d11b302ebf3856160e549a3cce8b73acd53d9e6602c52d210acf
Contents?: true
Size: 561 Bytes
Versions: 1
Compression:
Stored size: 561 Bytes
Contents
require 'owmo' =begin rdoc An example on how to get current conditions and use the different parameters. =end api_key = "" OWMO::weather api_key: api_key do |weather| # http://openweathermap.org/current#data query = { city_name: "London,uk", # [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 } current_condition = weather.get :current, query puts current_condition end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
owmo-0.2.0 | examples/current_conditions.rb |