Class: Citywrapper::TravelTime
- Defined in:
- lib/citywrapper/resources/travel_time.rb
Constant Summary
Constants inherited from ApiBase
Instance Attribute Summary
Attributes inherited from ApiBase
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ TravelTime
constructor
A new instance of TravelTime.
Methods inherited from ApiBase
Constructor Details
#initialize ⇒ TravelTime
Returns a new instance of TravelTime.
3 4 5 6 |
# File 'lib/citywrapper/resources/travel_time.rb', line 3 def initialize super @resource = 'traveltime' end |
Class Method Details
.between(start_coordinates: [], end_coordinates: [], time: nil, time_type: nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/citywrapper/resources/travel_time.rb', line 8 def self.between(start_coordinates: [], end_coordinates: [], time: nil, time_type: nil) new.request( params: { startcoord: start_coordinates.join(','), endcoord: end_coordinates.join(','), time: time ? time.to_i : nil, time_type: time_type } ) end |