README.md in owmo-1.1.0 vs README.md in owmo-1.2.0

- old
+ new

@@ -30,10 +30,16 @@ ### Quick Start ```ruby require 'owmo' api_key = "<api key here>" +puts OWMO::weather(api_key).get :current, city_name: "London,UK" +``` + +```ruby +require 'owmo' +api_key = "<api key here>" weather = OWMO::weather api_key puts weather.get :current, city_name: "London,UK" ``` ```ruby @@ -43,72 +49,77 @@ ``` ---- ### Weather Information #### [Current weather data](http://openweathermap.org/current) ```ruby -weather.get :current, city_name: "London,UK" +OWMO::weather(api_key).get :current, city_name: "London,UK" ``` [Full example](https://github.com/robb-randall/owmo/blob/master/examples/current.rb) +### [Current weather data for multiple cities](http://openweathermap.org/current#severalid) +```ruby +OWMO::weather(api_key).get :group, city_id: [4850751,4887398,2643743,4164138,5368361].join(",") +``` + #### [5 day weather forecast](http://openweathermap.org/forecast5) ```ruby -weather.get :forecast5, city_name: "London,UK" +OWMO::weather(api_key).get :forecast5, city_name: "London,UK" ``` [Full example](https://github.com/robb-randall/owmo/blob/master/examples/forecast5.rb) #### [16 day weather forecast](http://openweathermap.org/forecast16) ```ruby -weather.get :forecast16, city_name: "London,UK" +OWMO::weather(api_key).get :forecast16, city_name: "London,UK" ``` [Full example](https://github.com/robb-randall/owmo/blob/master/examples/forecast16.rb) ---- ### Query parameters #### Geocode (required) ```ruby # Geocode by City ID -weather.get :current, city_id: 5328041 -weather.get :current, id: 5328041 +OWMO::weather(api_key).get :current, city_id: 5328041 +OWMO::weather(api_key).get :current, id: 5328041 # Geocode by City Name -weather.get :current, city_name: "Beverly Hills" -weather.get :current, q: "Beverly Hills" +OWMO::weather(api_key).get :current, city_name: "Beverly Hills" +OWMO::weather(api_key).get :current, q: "Beverly Hills" # Geocode by Zip Code -weather.get :current, zip: 90210 -weather.get :current, zip_code: 90210 +OWMO::weather(api_key).get :current, zip: 90210 +OWMO::weather(api_key).get :current, zip_code: 90210 # Geocode by Coordinance -weather.get :current, lon: -118.41, lat: 34.09 +OWMO::weather(api_key).get :current, lon: -118.41, lat: 34.09 ``` [Full example](https://github.com/robb-randall/owmo/blob/master/examples/query_geocode.rb) #### Mode ```ruby # Response in JSON format (default) -weather.get :current, city_name: "London,UK" -weather.get :current, city_name: "London,UK", mode: :json +OWMO::weather(api_key).get :current, city_name: "London,UK" +OWMO::weather(api_key).get :current, city_name: "London,UK", mode: :json # Response in XML format -weather.get :current, city_name: "London,UK", mode: :xml +OWMO::weather(api_key).get :current, city_name: "London,UK", mode: :xml # Response in HTML format -weather.get :current, city_name: "London,UK", mode: :html +OWMO::weather(api_key).get :current, city_name: "London,UK", mode: :html ``` [Full example](https://github.com/robb-randall/owmo/blob/master/examples/query_mode.rb) #### Units ```ruby # Kelvin (default) -weather.get :current, city_name: "London,UK" +OWMO::weather(api_key).get :current, city_name: "London,UK" # Imperial -weather.get :current, city_name: "London,UK", units: :imperial +OWMO::weather(api_key).get :current, city_name: "London,UK", units: :imperial # Metric -weather.get :current, city_name: "London,UK", units: :metric +OWMO::weather(api_key).get :current, city_name: "London,UK", units: :metric ``` [Full example](https://github.com/robb-randall/owmo/blob/master/examples/query_units.rb) #### All ```ruby @@ -117,10 +128,10 @@ mode: 'json', units: 'imperial', lang: 'fr' } -weather.get :current, query +OWMO::weather(api_key).get :current, query ``` [Full example](https://github.com/robb-randall/owmo/blob/master/examples/query_all.rb) ---- ### Working example using Sinatra