Module: Usgs::Parsers::TimeSeriesParser
- Defined in:
- lib/usgs/parsers/time_series_parser.rb
Class Method Summary collapse
-
.parse(response) ⇒ Object
Parse both Instantaneous Values (IV) and Daily Values (DV) They have identical JSON structure.
Class Method Details
.parse(response) ⇒ Object
Parse both Instantaneous Values (IV) and Daily Values (DV) They have identical JSON structure
9 10 11 12 |
# File 'lib/usgs/parsers/time_series_parser.rb', line 9 def parse(response) series_list = response.dig("value", "timeSeries") || [] series_list.flat_map { |series| parse_series(series) } end |