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.
52 53 54 |
# File 'lib/onebusaway_sdk/resources/trips_for_location.rb', line 52 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 47 |
# File 'lib/onebusaway_sdk/resources/trips_for_location.rb', line 32 def list(params) parsed, = OnebusawaySDK::TripsForLocationListParams.dump_request(params) query = OnebusawaySDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "api/where/trips-for-location.json", query: query.transform_keys( lat_span: "latSpan", lon_span: "lonSpan", include_schedule: "includeSchedule", include_trip: "includeTrip" ), model: OnebusawaySDK::Models::TripsForLocationListResponse, options: ) end |