class OpenWeather::Client
Public Instance Methods
build_query(args, use_id=true)
click to toggle source
# File lib/open_weather/client.rb, line 27 def build_query(args, use_id=true) QueryBuilder.new(args, use_id).build end
daily_forecast(*args)
click to toggle source
# File lib/open_weather/client.rb, line 15 def daily_forecast(*args) get '/forecast/daily', build_query(args) end
find(*args)
click to toggle source
# File lib/open_weather/client.rb, line 23 def find(*args) get '/find', build_query(args, false) end
forecast(*args)
click to toggle source
# File lib/open_weather/client.rb, line 19 def forecast(*args) get '/forecast', build_query(args) end
get(path, query)
click to toggle source
# File lib/open_weather/client.rb, line 31 def get(path, query) self.class.get(path, query: query.merge(units: "metric")) end
weather(*args)
click to toggle source
# File lib/open_weather/client.rb, line 11 def weather(*args) get '/weather', build_query(args) end