Class: Wettr::WeatherAPI

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/wettr/weather_api.rb

Class Method Summary collapse

Class Method Details

.call_with_lat_and_lon(lat:, lon:) ⇒ Object



8
9
10
11
# File 'lib/wettr/weather_api.rb', line 8

def self.call_with_lat_and_lon(lat:, lon:)
  @options = { query: { lat: lat, lon: lon } }
  call
end

.call_with_zip(zip) ⇒ Object



13
14
15
16
# File 'lib/wettr/weather_api.rb', line 13

def self.call_with_zip(zip)
  @options = { query: { zip: zip } }
  call
end