Class: OnebusawaySDK::Resources::RoutesForLocation
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::RoutesForLocation
- Defined in:
- lib/onebusaway_sdk/resources/routes_for_location.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ RoutesForLocation
constructor
private
A new instance of RoutesForLocation.
-
#list(lat: , lon: , lat_span: nil, lon_span: nil, query: nil, radius: nil, request_options: {}) ⇒ OnebusawaySDK::Models::RoutesForLocationListResponse
routes-for-location.
Constructor Details
#initialize(client:) ⇒ RoutesForLocation
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 RoutesForLocation.
35 36 37 |
# File 'lib/onebusaway_sdk/resources/routes_for_location.rb', line 35 def initialize(client:) @client = client end |
Instance Method Details
#list(lat: , lon: , lat_span: nil, lon_span: nil, query: nil, radius: nil, request_options: {}) ⇒ OnebusawaySDK::Models::RoutesForLocationListResponse
routes-for-location
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/onebusaway_sdk/resources/routes_for_location.rb', line 21 def list(params) parsed, = OnebusawaySDK::RoutesForLocationListParams.dump_request(params) @client.request( method: :get, path: "api/where/routes-for-location.json", query: parsed.transform_keys(lat_span: "latSpan", lon_span: "lonSpan"), model: OnebusawaySDK::Models::RoutesForLocationListResponse, options: ) end |