Class: OnebusawaySDK::Resources::VehiclesForAgency
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::VehiclesForAgency
- Defined in:
- lib/onebusaway_sdk/resources/vehicles_for_agency.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ VehiclesForAgency
constructor
private
A new instance of VehiclesForAgency.
-
#list(agency_id, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::VehiclesForAgencyListResponse
Get vehicles for a specific agency.
Constructor Details
#initialize(client:) ⇒ VehiclesForAgency
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 VehiclesForAgency.
33 34 35 |
# File 'lib/onebusaway_sdk/resources/vehicles_for_agency.rb', line 33 def initialize(client:) @client = client end |
Instance Method Details
#list(agency_id, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::VehiclesForAgencyListResponse
Get vehicles for a specific agency
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/onebusaway_sdk/resources/vehicles_for_agency.rb', line 19 def list(agency_id, params = {}) parsed, = OnebusawaySDK::VehiclesForAgencyListParams.dump_request(params) @client.request( method: :get, path: ["api/where/vehicles-for-agency/%1$s.json", agency_id], query: parsed, model: OnebusawaySDK::Models::VehiclesForAgencyListResponse, options: ) end |