Sha256: 2ed72967133f6932456a9e56d4384af45bad6caf10476d85ad48497637a964a3
Contents?: true
Size: 589 Bytes
Versions: 8
Compression:
Stored size: 589 Bytes
Contents
require_relative 'apis/weather_id' module Barometer module Query module Service module ToWeatherId def self.call(query) converted_query = query.get_conversion(:geocode, :unknown) return unless converted_query api = WeatherId::Api.new(converted_query) _parse_content(api.get) end def self._parse_content(payload) if payload.fetch('loc').is_a? Array payload.fetch('loc', 0, '@id') else payload.fetch('loc', '@id') end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems