Module: LibTAD::Client::TidesService
- Included in:
- LibTAD::Client
- Defined in:
- lib/services/tides.rb
Overview
Tides API.
Instance Method Summary collapse
-
#get_tidal_data(placeid:, onlyhighlow: nil, start_date: nil, end_date: nil, radius: nil, subordinate: nil, interval: nil, localtime: nil) ⇒ Array<::LibTAD::Tides::Station>
The Tides service can be used to retrieve predicted tidal data over a given time interval for one or multiple places.
Instance Method Details
#get_tidal_data(placeid:, onlyhighlow: nil, start_date: nil, end_date: nil, radius: nil, subordinate: nil, interval: nil, localtime: nil) ⇒ Array<::LibTAD::Tides::Station>
The Tides service can be used to retrieve predicted tidal data over a given time interval for one or multiple places.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/services/tides.rb', line 16 def get_tidal_data( placeid:, onlyhighlow: nil, start_date: nil, end_date: nil, radius: nil, subordinate: nil, interval: nil, localtime: nil ) args = { placeid: placeid, onlyhighlow: onlyhighlow, startdt: start_date, enddt: end_date, radius: radius, subordinate: subordinate, interval: interval, localtime: localtime }.compact response = get('tides', args) stations = response.fetch('stations', []) return stations.collect do |e| ::LibTAD::Tides::Station.new(e) end end |