class OnebusawaySDK::Resources::StopsForLocation
def initialize(client:)
-
client
(OnebusawaySDK::Client
) --
Other tags:
- Api: - private
def initialize(client:) @client = client end
def list(params)
- See: OnebusawaySDK::Models::StopsForLocationListParams -
Returns:
-
(OnebusawaySDK::Models::StopsForLocationListResponse)
-
Parameters:
-
request_options
(OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}, nil
) -- -
radius
(Float
) -- The radius in meters to search within -
query
(String
) -- A search query string to filter the results -
lon_span
(Float
) -- An alternative to radius to set the search bounding box (optional) -
lat_span
(Float
) -- An alternative to radius to set the search bounding box (optional) -
lon
(Float
) -- -
lat
(Float
) --
Overloads:
-
list(lat:, lon:, lat_span: nil, lon_span: nil, query: nil, radius: nil, request_options: {})
def list(params) parsed, options = 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: options ) end