Class: OnebusawaySDK::Resources::RoutesForAgency

Inherits:
Object
  • Object
show all
Defined in:
lib/onebusaway_sdk/resources/routes_for_agency.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RoutesForAgency

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 RoutesForAgency.

Parameters:



29
30
31
# File 'lib/onebusaway_sdk/resources/routes_for_agency.rb', line 29

def initialize(client:)
  @client = client
end

Instance Method Details

#list(agency_id, request_options: {}) ⇒ OnebusawaySDK::Models::RoutesForAgencyListResponse

Retrieve the list of all routes for a particular agency by id

Parameters:

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/onebusaway_sdk/resources/routes_for_agency.rb', line 17

def list(agency_id, params = {})
  @client.request(
    method: :get,
    path: ["api/where/routes-for-agency/%1$s.json", agency_id],
    model: OnebusawaySDK::Models::RoutesForAgencyListResponse,
    options: params[:request_options]
  )
end