Class: OnebusawaySDK::Resources::StopsForLocation
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::StopsForLocation
- Defined in:
- lib/onebusaway_sdk/resources/stops_for_location.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ StopsForLocation
constructor
private
A new instance of StopsForLocation.
-
#list(lat: , lon: , lat_span: nil, lon_span: nil, query: nil, radius: nil, request_options: {}) ⇒ OnebusawaySDK::Models::StopsForLocationListResponse
stops-for-location.
Constructor Details
#initialize(client:) ⇒ StopsForLocation
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 StopsForLocation.
41 42 43 |
# File 'lib/onebusaway_sdk/resources/stops_for_location.rb', line 41 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::StopsForLocationListResponse
stops-for-location
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/onebusaway_sdk/resources/stops_for_location.rb', line 27 def list(params) parsed, = OnebusawaySDK::StopsForLocationListParams.dump_request(params) @client.request( method: :get, path: "api/where/stops-for-location.json", query: parsed.transform_keys(lat_span: "latSpan", lon_span: "lonSpan"), model: OnebusawaySDK::Models::StopsForLocationListResponse, options: ) end |