@@ -48,10 +48,10 @@ OpenWeather::Current.geocode(9.94, 76.26 , options)
4848OpenWeather ::Current .cities([524901 , 703448 , 2643743 ], options)
4949
5050# get current weather for a bounding box
51- OpenWeather ::Current .rectangle_zone(12 , 32 , 15 , 37 , 10 )
51+ OpenWeather ::Current .rectangle_zone(12 , 32 , 15 , 37 , 10 , options )
5252
5353# get current weather for cities around a point
54- OpenWeather ::Current .circle_zone(55.5 , 37.5 , 10 )
54+ OpenWeather ::Current .circle_zone(55.5 , 37.5 , 10 , options )
5555
5656# By default temperature is returned in fahrenheit to get the current weather in degrees celsius use unit as follows.
5757options = { units: " metric" , APPID: " 1111111111" }
@@ -68,31 +68,32 @@ http://openweathermap.org/current
6868require ' open_weather'
6969
7070# get weather forecast by city name
71- OpenWeather ::Forecast .city(" Cochin, IN" )
71+ OpenWeather ::Forecast .city(" Cochin, IN" , options )
7272
7373# get weather forecast by city name in fahrenheit
74- OpenWeather ::Forecast .city(" Cochin, IN" , units: ' imperial ' )
74+ OpenWeather ::Forecast .city(" Cochin, IN" , options )
7575
7676# get weather forecast by city id
77- OpenWeather ::Forecast .city_id(" 1273874" )
77+ OpenWeather ::Forecast .city_id(" 1273874" , options )
7878
7979# get weather forecast by geocode. (lat, lon)
80- OpenWeather ::Forecast .geocode(9.94 , 76.26 )
80+ OpenWeather ::Forecast .geocode(9.94 , 76.26 , options )
8181
8282# get daily weather forecast by city name
83- OpenWeather ::ForecastDaily .city(" Cochin, IN" )
83+ OpenWeather ::ForecastDaily .city(" Cochin, IN" , options )
8484
8585# get daily weather forecast by city name in fahrenheit
86- OpenWeather ::ForecastDaily .city(" Cochin, IN" , units: ' imperial ' )
86+ OpenWeather ::ForecastDaily .city(" Cochin, IN" , options )
8787
8888# get daily weather forecast by city id
89- OpenWeather ::ForecastDaily .city_id(" 1273874" )
89+ OpenWeather ::ForecastDaily .city_id(" 1273874" , options )
9090
9191# get daily weather forecast by geocode. (lat, lon)
92- OpenWeather ::ForecastDaily .geocode(9.94 , 76.26 )
92+ OpenWeather ::ForecastDaily .geocode(9.94 , 76.26 , options )
9393
9494# get daily weather forecast for 6 days
95- OpenWeather ::ForecastDaily .city_id(" 1273874" , cnt: 6 )
95+ options[:cnt ] = 6
96+ OpenWeather ::ForecastDaily .city_id(" 1273874" , options)
9697```
9798
9899Doucumentation about the weather forecast end-point:
@@ -104,7 +105,8 @@ http://openweathermap.org/forecast
104105
105106``` ruby
106107# get current weather in german
107- OpenWeather ::Current .city(" Berlin, DE" , lang: " de" )
108+ options[:lang ] = " de"
109+ OpenWeather ::Current .city(" Berlin, DE" ,options)
108110```
109111
110112Available languages are listed at:
0 commit comments