Class: OnebusawaySDK::Resources::SearchForRoute
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::SearchForRoute
- Defined in:
- lib/onebusaway_sdk/resources/search_for_route.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ SearchForRoute
constructor
private
A new instance of SearchForRoute.
-
#list(input:, max_count: nil, request_options: {}) ⇒ OnebusawaySDK::Models::SearchForRouteListResponse
Search for a route based on its name.
Constructor Details
#initialize(client:) ⇒ SearchForRoute
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 SearchForRoute.
34 35 36 |
# File 'lib/onebusaway_sdk/resources/search_for_route.rb', line 34 def initialize(client:) @client = client end |
Instance Method Details
#list(input:, max_count: nil, request_options: {}) ⇒ OnebusawaySDK::Models::SearchForRouteListResponse
Search for a route based on its name.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/onebusaway_sdk/resources/search_for_route.rb', line 19 def list(params) parsed, = OnebusawaySDK::SearchForRouteListParams.dump_request(params) query = OnebusawaySDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "api/where/search/route.json", query: query.transform_keys(max_count: "maxCount"), model: OnebusawaySDK::Models::SearchForRouteListResponse, options: ) end |