class OnebusawaySDK::Resources::TripsForLocation

def initialize(client:)

Parameters:
  • client (OnebusawaySDK::Client) --

Other tags:
    Api: - private
def initialize(client:)
  @client = client
end

def list(params)

Other tags:
    See: OnebusawaySDK::Models::TripsForLocationListParams -

Returns:
  • (OnebusawaySDK::Models::TripsForLocationListResponse) -

Parameters:
  • request_options (OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}, nil) --
  • time (Integer) -- Specific time for the query. Defaults to the current time.
  • include_trip (Boolean) -- Whether to include full trip elements in the references section. Defaults to fal
  • include_schedule (Boolean) -- Whether to include full schedule elements in the tripDetails section. Defaults t
  • lon_span (Float) -- Longitude span of the search bounding box
  • lon (Float) -- The longitude coordinate of the search center
  • lat_span (Float) -- Latitude span of the search bounding box
  • lat (Float) -- The latitude coordinate of the search center

Overloads:
  • list(lat:, lat_span:, lon:, lon_span:, include_schedule: nil, include_trip: nil, time: nil, request_options: {})
def list(params)
  parsed, options = 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: options
  )
end