module RubyPtv::Directions

Public Instance Methods

direction(direction_id) click to toggle source

Get all routes that travel in a specified direction

Required params:

direction_id [Integer]

No optional params available

# File lib/ruby_ptv/client/directions.rb, line 9
def direction(direction_id)
  data = request("directions/#{direction_id}")
  data["directions"]
end
directions_for_route(route_id) click to toggle source

Get all directions that a specified route travels in

Required params:

route_id [Integer]

No optional params available

# File lib/ruby_ptv/client/directions.rb, line 20
def directions_for_route(route_id)
  data = request("directions/route/#{route_id}")
  data["directions"]
end
directions_for_route_type(direction_id, route_type) click to toggle source

Get all routes of the specified route type that travel in the specified direction

Required params:

direction_id [Integer]
route_id [Integer]

No optional params available

# File lib/ruby_ptv/client/directions.rb, line 32
def directions_for_route_type(direction_id, route_type)
  data = request("directions/#{direction_id}/route_type/#{route_type}")
  data["directions"]
end