module RubyPtv::Stops
Public Instance Methods
stop(stop_id, route_type, options = {})
click to toggle source
Stop location, amenity and accessibility facility information for the specified stop
Required params:
stop_id [Integer] route_type [Integer]
Optional params must have key matching official PTV param name
# File lib/ruby_ptv/client/stops.rb, line 10 def stop(stop_id, route_type, options = {}) data = request("stops/#{stop_id}/route_type/#{route_type}", options) data["stop"] end
stops_for_location(latitude, longitude, options = {})
click to toggle source
All stops for the specified location
Required params:
latitude [Float] longitude [Float]
Optional params must have key matching official PTV param name
# File lib/ruby_ptv/client/stops.rb, line 34 def stops_for_location(latitude, longitude, options = {}) data = request("stops/location/#{latitude},#{longitude}", options) data["stops"] end
stops_for_route(route_id, route_type)
click to toggle source
All stops for the specified route
Required params:
route_id [Integer] route_type [Integer]
No optional params available
# File lib/ruby_ptv/client/stops.rb, line 22 def stops_for_route(route_id, route_type) data = request("stops/route/#{route_id}/route_type/#{route_type}") data["stops"] end