Module: RubyPtv::Runs
- Included in:
- Client
- Defined in:
- lib/ruby_ptv/client/runs.rb
Instance Method Summary collapse
-
#run_for_run_id_and_route_type(run_id, route_type) ⇒ Object
Get the run details for the specified run ID and route type.
-
#runs_for_route_id(route_id) ⇒ Object
Get all runs for the specified route ID.
-
#runs_for_route_id_and_type(route_id, route_type) ⇒ Object
Get all runs for the specified route ID and route type.
-
#runs_for_run_id(run_id) ⇒ Object
Get all runs for the specified run ID.
Instance Method Details
#run_for_run_id_and_route_type(run_id, route_type) ⇒ Object
Get the run details for the specified run ID and route type
Required params:
run_id [Integer]
route_type [Integer]
No optional params available
44 45 46 47 |
# File 'lib/ruby_ptv/client/runs.rb', line 44 def run_for_run_id_and_route_type(run_id, route_type) data = request("runs/#{run_id}/route_type/#{route_type}") data["run"] end |
#runs_for_route_id(route_id) ⇒ Object
Get all runs for the specified route ID
Required params:
route_id [Integer]
No optional params available
9 10 11 12 |
# File 'lib/ruby_ptv/client/runs.rb', line 9 def runs_for_route_id(route_id) data = request("runs/route/#{route_id}") data["runs"] end |
#runs_for_route_id_and_type(route_id, route_type) ⇒ Object
Get all runs for the specified route ID and route type
Required params:
route_id [Integer]
route_type [Integer]
No optional params available
21 22 23 24 |
# File 'lib/ruby_ptv/client/runs.rb', line 21 def runs_for_route_id_and_type(route_id, route_type) data = request("runs/route/#{route_id}/route_type/#{route_type}") data["runs"] end |
#runs_for_run_id(run_id) ⇒ Object
Get all runs for the specified run ID
Required params:
run_id [Integer]
No optional params available
32 33 34 35 |
# File 'lib/ruby_ptv/client/runs.rb', line 32 def runs_for_run_id(run_id) data = request("runs/#{run_id}") data["runs"] end |