Class: OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation
- Defined in:
- lib/onebusaway_sdk/resources/arrivals_and_departures_for_location.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ ArrivalsAndDeparturesForLocation
constructor
private
A new instance of ArrivalsAndDeparturesForLocation.
-
#list(lat:, lon:, empty_returns_not_found: nil, lat_span: nil, lon_span: nil, max_count: nil, minutes_after: nil, minutes_before: nil, radius: nil, route_type: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse
Some parameter documentations has been truncated, see Models::ArrivalsAndDeparturesForLocationListParams for more details.
Constructor Details
#initialize(client:) ⇒ ArrivalsAndDeparturesForLocation
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 ArrivalsAndDeparturesForLocation.
65 66 67 |
# File 'lib/onebusaway_sdk/resources/arrivals_and_departures_for_location.rb', line 65 def initialize(client:) @client = client end |
Instance Method Details
#list(lat:, lon:, empty_returns_not_found: nil, lat_span: nil, lon_span: nil, max_count: nil, minutes_after: nil, minutes_before: nil, radius: nil, route_type: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse
Some parameter documentations has been truncated, see Models::ArrivalsAndDeparturesForLocationListParams for more details.
Returns real-time arrival and departure data for stops within a bounding box or radius centered on a specific location.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/onebusaway_sdk/resources/arrivals_and_departures_for_location.rb', line 42 def list(params) parsed, = OnebusawaySDK::ArrivalsAndDeparturesForLocationListParams.dump_request(params) query = OnebusawaySDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "api/where/arrivals-and-departures-for-location.json", query: query.transform_keys( empty_returns_not_found: "emptyReturnsNotFound", lat_span: "latSpan", lon_span: "lonSpan", max_count: "maxCount", minutes_after: "minutesAfter", minutes_before: "minutesBefore", route_type: "routeType" ), model: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse, options: ) end |