Class: OnebusawaySDK::Resources::StopsForRoute
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::StopsForRoute
- Defined in:
- lib/onebusaway_sdk/resources/stops_for_route.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ StopsForRoute
constructor
private
A new instance of StopsForRoute.
-
#list(route_id, include_polylines: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::StopsForRouteListResponse
Get stops for a specific route.
Constructor Details
#initialize(client:) ⇒ StopsForRoute
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 StopsForRoute.
35 36 37 |
# File 'lib/onebusaway_sdk/resources/stops_for_route.rb', line 35 def initialize(client:) @client = client end |
Instance Method Details
#list(route_id, include_polylines: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::StopsForRouteListResponse
Get stops for a specific route
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/onebusaway_sdk/resources/stops_for_route.rb', line 21 def list(route_id, params = {}) parsed, = OnebusawaySDK::StopsForRouteListParams.dump_request(params) @client.request( method: :get, path: ["api/where/stops-for-route/%1$s.json", route_id], query: parsed.transform_keys(include_polylines: "includePolylines"), model: OnebusawaySDK::Models::StopsForRouteListResponse, options: ) end |