Class: OnebusawaySDK::Resources::TripsForLocation
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::TripsForLocation
- Defined in:
- lib/onebusaway_sdk/resources/trips_for_location.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ TripsForLocation
constructor
private
A new instance of TripsForLocation.
-
#list(lat: , lat_span: , lon: , lon_span: , include_schedule: nil, include_trip: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripsForLocationListResponse
Some parameter documentations has been truncated, see Models::TripsForLocationListParams for more details.
Constructor Details
#initialize(client:) ⇒ TripsForLocation
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 TripsForLocation.
51 52 53 |
# File 'lib/onebusaway_sdk/resources/trips_for_location.rb', line 51 def initialize(client:) @client = client end |
Instance Method Details
#list(lat: , lat_span: , lon: , lon_span: , include_schedule: nil, include_trip: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripsForLocationListResponse
Some parameter documentations has been truncated, see Models::TripsForLocationListParams for more details.
Retrieve trips for a given location
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/onebusaway_sdk/resources/trips_for_location.rb', line 32 def list(params) parsed, = OnebusawaySDK::TripsForLocationListParams.dump_request(params) @client.request( method: :get, path: "api/where/trips-for-location.json", query: parsed.transform_keys( lat_span: "latSpan", lon_span: "lonSpan", include_schedule: "includeSchedule", include_trip: "includeTrip" ), model: OnebusawaySDK::Models::TripsForLocationListResponse, options: ) end |