Module: RubyPtv::Departures

Included in:
Client
Defined in:
lib/ruby_ptv/client/departures.rb

Instance Method Summary collapse

Instance Method Details

#departures(route_type, stop_id, options = {}) ⇒ Object

Get departures for all routes for a specified stop

Required params:

route_type [Integer]
stop_id [Integer]

Optional params must have key matching official PTV param name



10
11
12
# File 'lib/ruby_ptv/client/departures.rb', line 10

def departures(route_type, stop_id, options = {})
  request("departures/route_type/#{route_type}/stop/#{stop_id}", options)
end

#departures_for_route(route_type, stop_id, route_id, options = {}) ⇒ Object

Get departures for a single route for a specified stop

Required params:

route_type [Integer]
stop_id [Integer]
route_id [String]

Optional params must have key matching official PTV param name



22
23
24
# File 'lib/ruby_ptv/client/departures.rb', line 22

def departures_for_route(route_type, stop_id, route_id, options = {})
  request("departures/route_type/#{route_type}/stop/#{stop_id}/route/#{route_id}", options)
end