class Swissforecast::Client
Constants
- DEFAULT_DOMAIN
Public Instance Methods
Private Instance Methods
perform(params = '')
click to toggle source
# File lib/swissforecast.rb, line 23 def perform(params = '') response = Net::HTTP.get(URI("#{DEFAULT_DOMAIN}/#{params}")) # Uncomment the line below to dump the response in order to generate # a file to use as response stub in tests. # File.write('/tmp/response.json', response) JSON.parse(response, object_class: OpenStruct) end