Class: OnebusawaySDK::Resources::TripsForRoute
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::TripsForRoute
- Defined in:
- lib/onebusaway_sdk/resources/trips_for_route.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ TripsForRoute
constructor
private
A new instance of TripsForRoute.
-
#list(route_id, include_schedule: nil, include_status: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripsForRouteListResponse
Some parameter documentations has been truncated, see Models::TripsForRouteListParams for more details.
Constructor Details
#initialize(client:) ⇒ TripsForRoute
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TripsForRoute.
40 41 42 |
# File 'lib/onebusaway_sdk/resources/trips_for_route.rb', line 40 def initialize(client:) @client = client end |
Instance Method Details
#list(route_id, include_schedule: nil, include_status: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripsForRouteListResponse
Some parameter documentations has been truncated, see Models::TripsForRouteListParams for more details.
Search for active trips for a specific route.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/onebusaway_sdk/resources/trips_for_route.rb', line 26 def list(route_id, params = {}) parsed, = OnebusawaySDK::TripsForRouteListParams.dump_request(params) @client.request( method: :get, path: ["api/where/trips-for-route/%1$s.json", route_id], query: parsed.transform_keys(include_schedule: "includeSchedule", include_status: "includeStatus"), model: OnebusawaySDK::Models::TripsForRouteListResponse, options: ) end |