Sha256: fae569fe3da5639ad8a5a4b3cec2b56995c6f510be801a3970a0516e241e33fa
Contents?: true
Size: 780 Bytes
Versions: 8
Compression:
Stored size: 780 Bytes
Contents
module Barometer module Query module Service class WeatherId class Api < Utils::Api def url 'http://wxdata.weather.com/wxdata/search/search' end def params { where: format_query } end def unwrap_nodes ['search'] end private # filter out words that weather.com has trouble geo-locating # mostly these are icao related # def format_query output = query.q.dup words_to_remove = %w(international airport municipal) words_to_remove.each do |word| output.gsub!(/#{word}/i, "") end output end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems