Class: OnebusawaySDK::Resources::ScheduleForStop
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::ScheduleForStop
- Defined in:
- lib/onebusaway_sdk/resources/schedule_for_stop.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ ScheduleForStop
constructor
private
A new instance of ScheduleForStop.
-
#retrieve(stop_id, date: nil, request_options: {}) ⇒ OnebusawaySDK::Models::ScheduleForStopRetrieveResponse
Some parameter documentations has been truncated, see Models::ScheduleForStopRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ ScheduleForStop
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 ScheduleForStop.
36 37 38 |
# File 'lib/onebusaway_sdk/resources/schedule_for_stop.rb', line 36 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(stop_id, date: nil, request_options: {}) ⇒ OnebusawaySDK::Models::ScheduleForStopRetrieveResponse
Some parameter documentations has been truncated, see Models::ScheduleForStopRetrieveParams for more details.
Get schedule for a specific stop
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/onebusaway_sdk/resources/schedule_for_stop.rb', line 22 def retrieve(stop_id, params = {}) parsed, = OnebusawaySDK::ScheduleForStopRetrieveParams.dump_request(params) @client.request( method: :get, path: ["api/where/schedule-for-stop/%1$s.json", stop_id], query: parsed, model: OnebusawaySDK::Models::ScheduleForStopRetrieveResponse, options: ) end |