From ba26372ea95b6404cf5ae4fcaceb68e32cea5530 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 18:19:56 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 8 +- lib/onebusaway_sdk.rb | 3 + lib/onebusaway_sdk/client.rb | 5 + lib/onebusaway_sdk/models.rb | 3 + ...and_departures_for_location_list_params.rb | 108 ++ ...d_departures_for_location_list_response.rb | 655 +++++++++++ .../arrivals_and_departures_for_location.rb | 70 ++ rbi/onebusaway_sdk/client.rbi | 3 + rbi/onebusaway_sdk/models.rbi | 3 + ...nd_departures_for_location_list_params.rbi | 157 +++ ..._departures_for_location_list_response.rbi | 1000 +++++++++++++++++ .../arrivals_and_departures_for_location.rbi | 61 + sig/onebusaway_sdk/client.rbs | 2 + sig/onebusaway_sdk/models.rbs | 2 + ...nd_departures_for_location_list_params.rbs | 94 ++ ..._departures_for_location_list_response.rbs | 525 +++++++++ .../arrivals_and_departures_for_location.rbs | 22 + ...rivals_and_departures_for_location_test.rb | 13 + 18 files changed, 2730 insertions(+), 4 deletions(-) create mode 100644 lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rb create mode 100644 lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rb create mode 100644 lib/onebusaway_sdk/resources/arrivals_and_departures_for_location.rb create mode 100644 rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbi create mode 100644 rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbi create mode 100644 rbi/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbi create mode 100644 sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbs create mode 100644 sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbs create mode 100644 sig/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbs create mode 100644 test/onebusaway_sdk/resources/arrivals_and_departures_for_location_test.rb diff --git a/.stats.yml b/.stats.yml index 1266cd82..fa222e3a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 29 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-30baad9d29b0909d180aae300750a0cd8425b52d7a60ba365b6aa4e5f8da6fab.yml -openapi_spec_hash: 218466af34966d9b08728f107cb3b3b0 -config_hash: 3871f5d21bb38ddd334ec04721dea64d +configured_endpoints: 30 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-a30b0967ffed17b866dc65b5528148a06a42cce7c3c6d8f740ae2f6079963e7d.yml +openapi_spec_hash: 9bf1e5bf00ef9936a9181ebd0956d5b8 +config_hash: c28ddf5b7754155603d9fd1c5fcaeeff diff --git a/lib/onebusaway_sdk.rb b/lib/onebusaway_sdk.rb index 0fe3835a..f3d5e601 100644 --- a/lib/onebusaway_sdk.rb +++ b/lib/onebusaway_sdk.rb @@ -61,6 +61,8 @@ require_relative "onebusaway_sdk/models/arrival_and_departure_list_response" require_relative "onebusaway_sdk/models/arrival_and_departure_retrieve_params" require_relative "onebusaway_sdk/models/arrival_and_departure_retrieve_response" +require_relative "onebusaway_sdk/models/arrivals_and_departures_for_location_list_params" +require_relative "onebusaway_sdk/models/arrivals_and_departures_for_location_list_response" require_relative "onebusaway_sdk/models/block_retrieve_params" require_relative "onebusaway_sdk/models/block_retrieve_response" require_relative "onebusaway_sdk/models/config_retrieve_params" @@ -114,6 +116,7 @@ require_relative "onebusaway_sdk/resources/agencies_with_coverage" require_relative "onebusaway_sdk/resources/agency" require_relative "onebusaway_sdk/resources/arrival_and_departure" +require_relative "onebusaway_sdk/resources/arrivals_and_departures_for_location" require_relative "onebusaway_sdk/resources/block" require_relative "onebusaway_sdk/resources/config" require_relative "onebusaway_sdk/resources/current_time" diff --git a/lib/onebusaway_sdk/client.rb b/lib/onebusaway_sdk/client.rb index 8958ea43..cb2c2460 100644 --- a/lib/onebusaway_sdk/client.rb +++ b/lib/onebusaway_sdk/client.rb @@ -66,6 +66,9 @@ class Client < OnebusawaySDK::Internal::Transport::BaseClient # @return [OnebusawaySDK::Resources::ScheduleForRoute] attr_reader :schedule_for_route + # @return [OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation] + attr_reader :arrivals_and_departures_for_location + # @return [OnebusawaySDK::Resources::ArrivalAndDeparture] attr_reader :arrival_and_departure @@ -163,6 +166,8 @@ def initialize( @routes_for_location = OnebusawaySDK::Resources::RoutesForLocation.new(client: self) @routes_for_agency = OnebusawaySDK::Resources::RoutesForAgency.new(client: self) @schedule_for_route = OnebusawaySDK::Resources::ScheduleForRoute.new(client: self) + @arrivals_and_departures_for_location = + OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation.new(client: self) @arrival_and_departure = OnebusawaySDK::Resources::ArrivalAndDeparture.new(client: self) @trip = OnebusawaySDK::Resources::Trip.new(client: self) @trips_for_location = OnebusawaySDK::Resources::TripsForLocation.new(client: self) diff --git a/lib/onebusaway_sdk/models.rb b/lib/onebusaway_sdk/models.rb index 253f9a28..4b4fa891 100644 --- a/lib/onebusaway_sdk/models.rb +++ b/lib/onebusaway_sdk/models.rb @@ -50,6 +50,9 @@ module OnebusawaySDK ArrivalAndDepartureRetrieveParams = OnebusawaySDK::Models::ArrivalAndDepartureRetrieveParams + ArrivalsAndDeparturesForLocationListParams = + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListParams + BlockRetrieveParams = OnebusawaySDK::Models::BlockRetrieveParams ConfigRetrieveParams = OnebusawaySDK::Models::ConfigRetrieveParams diff --git a/lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rb b/lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rb new file mode 100644 index 00000000..a0b5c1d2 --- /dev/null +++ b/lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +module OnebusawaySDK + module Models + # @see OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation#list + class ArrivalsAndDeparturesForLocationListParams < OnebusawaySDK::Internal::Type::BaseModel + extend OnebusawaySDK::Internal::Type::RequestParameters::Converter + include OnebusawaySDK::Internal::Type::RequestParameters + + # @!attribute lat + # The latitude coordinate of the search center. + # + # @return [Float] + required :lat, Float + + # @!attribute lon + # The longitude coordinate of the search center. + # + # @return [Float] + required :lon, Float + + # @!attribute empty_returns_not_found + # If true, returns a 404 Not Found error instead of an empty result. + # + # @return [Boolean, nil] + optional :empty_returns_not_found, OnebusawaySDK::Internal::Type::Boolean + + # @!attribute lat_span + # Sets the latitude limits of the search bounding box. + # + # @return [Float, nil] + optional :lat_span, Float + + # @!attribute lon_span + # Sets the longitude limits of the search bounding box. + # + # @return [Float, nil] + optional :lon_span, Float + + # @!attribute max_count + # The max size of the list of nearby stops and arrivals to return. Defaults to + # 250, max 1000. + # + # @return [Integer, nil] + optional :max_count, Integer + + # @!attribute minutes_after + # Include arrivals and departures this many minutes after the query time. + # + # @return [Integer, nil] + optional :minutes_after, Integer + + # @!attribute minutes_before + # Include arrivals and departures this many minutes before the query time. + # + # @return [Integer, nil] + optional :minutes_before, Integer + + # @!attribute radius + # The search radius in meters. + # + # @return [Float, nil] + optional :radius, Float + + # @!attribute route_type + # Optional list of GTFS routeTypes to filter by (comma delimited) e.g. "1,2,3". + # + # @return [String, nil] + optional :route_type, String + + # @!attribute time + # By default, returns the status right now. Can be queried at a specific time + # (milliseconds since epoch) for testing. + # + # @return [Integer, nil] + optional :time, Integer + + # @!method initialize(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: {}) + # Some parameter documentations has been truncated, see + # {OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListParams} for more + # details. + # + # @param lat [Float] The latitude coordinate of the search center. + # + # @param lon [Float] The longitude coordinate of the search center. + # + # @param empty_returns_not_found [Boolean] If true, returns a 404 Not Found error instead of an empty result. + # + # @param lat_span [Float] Sets the latitude limits of the search bounding box. + # + # @param lon_span [Float] Sets the longitude limits of the search bounding box. + # + # @param max_count [Integer] The max size of the list of nearby stops and arrivals to return. Defaults to 250 + # + # @param minutes_after [Integer] Include arrivals and departures this many minutes after the query time. + # + # @param minutes_before [Integer] Include arrivals and departures this many minutes before the query time. + # + # @param radius [Float] The search radius in meters. + # + # @param route_type [String] Optional list of GTFS routeTypes to filter by (comma delimited) e.g. "1,2,3". + # + # @param time [Integer] By default, returns the status right now. Can be queried at a specific time (mil + # + # @param request_options [OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rb b/lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rb new file mode 100644 index 00000000..c63da470 --- /dev/null +++ b/lib/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rb @@ -0,0 +1,655 @@ +# frozen_string_literal: true + +module OnebusawaySDK + module Models + # @see OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation#list + class ArrivalsAndDeparturesForLocationListResponse < OnebusawaySDK::Models::ResponseWrapper + # @!attribute data + # + # @return [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data] + required :data, -> { OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data } + + # @!method initialize(data:) + # @param data [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data] + + class Data < OnebusawaySDK::Internal::Type::BaseModel + # @!attribute entry + # + # @return [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry] + required :entry, -> { OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry } + + # @!attribute references + # + # @return [OnebusawaySDK::Models::References] + required :references, -> { OnebusawaySDK::References } + + # @!method initialize(entry:, references:) + # @param entry [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry] + # @param references [OnebusawaySDK::Models::References] + + # @see OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data#entry + class Entry < OnebusawaySDK::Internal::Type::BaseModel + # @!attribute arrivals_and_departures + # + # @return [Array] + required :arrivals_and_departures, + -> { OnebusawaySDK::Internal::Type::ArrayOf[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture] }, + api_name: :arrivalsAndDepartures + + # @!attribute limit_exceeded + # + # @return [Boolean] + required :limit_exceeded, OnebusawaySDK::Internal::Type::Boolean, api_name: :limitExceeded + + # @!attribute nearby_stop_ids + # + # @return [Array] + required :nearby_stop_ids, + -> { OnebusawaySDK::Internal::Type::ArrayOf[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID] }, + api_name: :nearbyStopIds + + # @!attribute stop_ids + # + # @return [Array] + required :stop_ids, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :stopIds + + # @!attribute situation_ids + # + # @return [Array, nil] + optional :situation_ids, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :situationIds + + # @!method initialize(arrivals_and_departures:, limit_exceeded:, nearby_stop_ids:, stop_ids:, situation_ids: nil) + # @param arrivals_and_departures [Array] + # @param limit_exceeded [Boolean] + # @param nearby_stop_ids [Array] + # @param stop_ids [Array] + # @param situation_ids [Array] + + class ArrivalsAndDeparture < OnebusawaySDK::Internal::Type::BaseModel + # @!attribute arrival_enabled + # Indicates if riders can arrive on this transit vehicle. + # + # @return [Boolean] + required :arrival_enabled, OnebusawaySDK::Internal::Type::Boolean, api_name: :arrivalEnabled + + # @!attribute block_trip_sequence + # Index of this arrival’s trip into the sequence of trips for the active block. + # + # @return [Integer] + required :block_trip_sequence, Integer, api_name: :blockTripSequence + + # @!attribute departure_enabled + # Indicates if riders can depart from this transit vehicle. + # + # @return [Boolean] + required :departure_enabled, OnebusawaySDK::Internal::Type::Boolean, api_name: :departureEnabled + + # @!attribute number_of_stops_away + # Number of stops between the arriving transit vehicle and the current stop + # (excluding the current stop). + # + # @return [Integer] + required :number_of_stops_away, Integer, api_name: :numberOfStopsAway + + # @!attribute predicted_arrival_time + # Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time + # available). + # + # @return [Integer] + required :predicted_arrival_time, Integer, api_name: :predictedArrivalTime + + # @!attribute predicted_departure_time + # Predicted departure time, in milliseconds since Unix epoch (zero if no real-time + # available). + # + # @return [Integer] + required :predicted_departure_time, Integer, api_name: :predictedDepartureTime + + # @!attribute route_id + # The ID of the route for the arriving vehicle. + # + # @return [String] + required :route_id, String, api_name: :routeId + + # @!attribute scheduled_arrival_time + # Scheduled arrival time, in milliseconds since Unix epoch. + # + # @return [Integer] + required :scheduled_arrival_time, Integer, api_name: :scheduledArrivalTime + + # @!attribute scheduled_departure_time + # Scheduled departure time, in milliseconds since Unix epoch. + # + # @return [Integer] + required :scheduled_departure_time, Integer, api_name: :scheduledDepartureTime + + # @!attribute service_date + # Time, in milliseconds since the Unix epoch, of midnight for the start of the + # service date for the trip. + # + # @return [Integer] + required :service_date, Integer, api_name: :serviceDate + + # @!attribute stop_id + # The ID of the stop the vehicle is arriving at. + # + # @return [String] + required :stop_id, String, api_name: :stopId + + # @!attribute stop_sequence + # Index of the stop into the sequence of stops that make up the trip for this + # arrival. + # + # @return [Integer] + required :stop_sequence, Integer, api_name: :stopSequence + + # @!attribute total_stops_in_trip + # Total number of stops visited on the trip for this arrival. + # + # @return [Integer] + required :total_stops_in_trip, Integer, api_name: :totalStopsInTrip + + # @!attribute trip_headsign + # Optional trip headsign that potentially overrides the trip headsign in the + # referenced trip element. + # + # @return [String] + required :trip_headsign, String, api_name: :tripHeadsign + + # @!attribute trip_id + # The ID of the trip for the arriving vehicle. + # + # @return [String] + required :trip_id, String, api_name: :tripId + + # @!attribute vehicle_id + # ID of the transit vehicle serving this trip. + # + # @return [String] + required :vehicle_id, String, api_name: :vehicleId + + # @!attribute actual_track + # The actual track information of the arriving transit vehicle. + # + # @return [String, nil] + optional :actual_track, String, api_name: :actualTrack + + # @!attribute distance_from_stop + # Distance of the arriving transit vehicle from the stop, in meters. + # + # @return [Float, nil] + optional :distance_from_stop, Float, api_name: :distanceFromStop + + # @!attribute frequency + # Information about frequency-based scheduling, if applicable to the trip. + # + # @return [String, nil] + optional :frequency, String + + # @!attribute historical_occupancy + # Historical occupancy information of the transit vehicle. + # + # @return [String, nil] + optional :historical_occupancy, String, api_name: :historicalOccupancy + + # @!attribute last_update_time + # Timestamp of the last update time for this arrival. + # + # @return [Integer, nil] + optional :last_update_time, Integer, api_name: :lastUpdateTime + + # @!attribute occupancy_status + # Current occupancy status of the transit vehicle. + # + # @return [String, nil] + optional :occupancy_status, String, api_name: :occupancyStatus + + # @!attribute predicted + # Indicates if real-time arrival info is available for this trip. + # + # @return [Boolean, nil] + optional :predicted, OnebusawaySDK::Internal::Type::Boolean + + # @!attribute predicted_arrival_interval + # Interval for predicted arrival time, if available. + # + # @return [String, nil] + optional :predicted_arrival_interval, String, api_name: :predictedArrivalInterval + + # @!attribute predicted_departure_interval + # Interval for predicted departure time, if available. + # + # @return [String, nil] + optional :predicted_departure_interval, String, api_name: :predictedDepartureInterval + + # @!attribute predicted_occupancy + # Predicted occupancy status of the transit vehicle. + # + # @return [String, nil] + optional :predicted_occupancy, String, api_name: :predictedOccupancy + + # @!attribute route_long_name + # Optional route long name that potentially overrides the route long name in the + # referenced route element. + # + # @return [String, nil] + optional :route_long_name, String, api_name: :routeLongName + + # @!attribute route_short_name + # Optional route short name that potentially overrides the route short name in the + # referenced route element. + # + # @return [String, nil] + optional :route_short_name, String, api_name: :routeShortName + + # @!attribute scheduled_arrival_interval + # Interval for scheduled arrival time. + # + # @return [String, nil] + optional :scheduled_arrival_interval, String, api_name: :scheduledArrivalInterval + + # @!attribute scheduled_departure_interval + # Interval for scheduled departure time. + # + # @return [String, nil] + optional :scheduled_departure_interval, String, api_name: :scheduledDepartureInterval + + # @!attribute scheduled_track + # Scheduled track information of the arriving transit vehicle. + # + # @return [String, nil] + optional :scheduled_track, String, api_name: :scheduledTrack + + # @!attribute situation_ids + # References to situation elements (if any) applicable to this arrival. + # + # @return [Array, nil] + optional :situation_ids, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :situationIds + + # @!attribute status + # Current status of the arrival. + # + # @return [String, nil] + optional :status, String + + # @!attribute trip_status + # Trip-specific status for the arriving transit vehicle. + # + # @return [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus, nil] + optional :trip_status, + -> { OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus }, + api_name: :tripStatus + + # @!method initialize(arrival_enabled:, block_trip_sequence:, departure_enabled:, number_of_stops_away:, predicted_arrival_time:, predicted_departure_time:, route_id:, scheduled_arrival_time:, scheduled_departure_time:, service_date:, stop_id:, stop_sequence:, total_stops_in_trip:, trip_headsign:, trip_id:, vehicle_id:, actual_track: nil, distance_from_stop: nil, frequency: nil, historical_occupancy: nil, last_update_time: nil, occupancy_status: nil, predicted: nil, predicted_arrival_interval: nil, predicted_departure_interval: nil, predicted_occupancy: nil, route_long_name: nil, route_short_name: nil, scheduled_arrival_interval: nil, scheduled_departure_interval: nil, scheduled_track: nil, situation_ids: nil, status: nil, trip_status: nil) + # Some parameter documentations has been truncated, see + # {OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture} + # for more details. + # + # @param arrival_enabled [Boolean] Indicates if riders can arrive on this transit vehicle. + # + # @param block_trip_sequence [Integer] Index of this arrival’s trip into the sequence of trips for the active block. + # + # @param departure_enabled [Boolean] Indicates if riders can depart from this transit vehicle. + # + # @param number_of_stops_away [Integer] Number of stops between the arriving transit vehicle and the current stop (exclu + # + # @param predicted_arrival_time [Integer] Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time a + # + # @param predicted_departure_time [Integer] Predicted departure time, in milliseconds since Unix epoch (zero if no real-time + # + # @param route_id [String] The ID of the route for the arriving vehicle. + # + # @param scheduled_arrival_time [Integer] Scheduled arrival time, in milliseconds since Unix epoch. + # + # @param scheduled_departure_time [Integer] Scheduled departure time, in milliseconds since Unix epoch. + # + # @param service_date [Integer] Time, in milliseconds since the Unix epoch, of midnight for the start of the ser + # + # @param stop_id [String] The ID of the stop the vehicle is arriving at. + # + # @param stop_sequence [Integer] Index of the stop into the sequence of stops that make up the trip for this arri + # + # @param total_stops_in_trip [Integer] Total number of stops visited on the trip for this arrival. + # + # @param trip_headsign [String] Optional trip headsign that potentially overrides the trip headsign in the refer + # + # @param trip_id [String] The ID of the trip for the arriving vehicle. + # + # @param vehicle_id [String] ID of the transit vehicle serving this trip. + # + # @param actual_track [String] The actual track information of the arriving transit vehicle. + # + # @param distance_from_stop [Float] Distance of the arriving transit vehicle from the stop, in meters. + # + # @param frequency [String] Information about frequency-based scheduling, if applicable to the trip. + # + # @param historical_occupancy [String] Historical occupancy information of the transit vehicle. + # + # @param last_update_time [Integer] Timestamp of the last update time for this arrival. + # + # @param occupancy_status [String] Current occupancy status of the transit vehicle. + # + # @param predicted [Boolean] Indicates if real-time arrival info is available for this trip. + # + # @param predicted_arrival_interval [String] Interval for predicted arrival time, if available. + # + # @param predicted_departure_interval [String] Interval for predicted departure time, if available. + # + # @param predicted_occupancy [String] Predicted occupancy status of the transit vehicle. + # + # @param route_long_name [String] Optional route long name that potentially overrides the route long name in the r + # + # @param route_short_name [String] Optional route short name that potentially overrides the route short name in the + # + # @param scheduled_arrival_interval [String] Interval for scheduled arrival time. + # + # @param scheduled_departure_interval [String] Interval for scheduled departure time. + # + # @param scheduled_track [String] Scheduled track information of the arriving transit vehicle. + # + # @param situation_ids [Array] References to situation elements (if any) applicable to this arrival. + # + # @param status [String] Current status of the arrival. + # + # @param trip_status [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus] Trip-specific status for the arriving transit vehicle. + + # @see OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture#trip_status + class TripStatus < OnebusawaySDK::Internal::Type::BaseModel + # @!attribute active_trip_id + # Trip ID of the trip the vehicle is actively serving. + # + # @return [String] + required :active_trip_id, String, api_name: :activeTripId + + # @!attribute block_trip_sequence + # Index of the active trip into the sequence of trips for the active block. + # + # @return [Integer] + required :block_trip_sequence, Integer, api_name: :blockTripSequence + + # @!attribute closest_stop + # ID of the closest stop to the current location of the transit vehicle. + # + # @return [String] + required :closest_stop, String, api_name: :closestStop + + # @!attribute distance_along_trip + # Distance, in meters, the transit vehicle has progressed along the active trip. + # + # @return [Float] + required :distance_along_trip, Float, api_name: :distanceAlongTrip + + # @!attribute last_known_distance_along_trip + # Last known distance along the trip received in real-time from the transit + # vehicle. + # + # @return [Float] + required :last_known_distance_along_trip, Float, api_name: :lastKnownDistanceAlongTrip + + # @!attribute last_location_update_time + # Timestamp of the last known real-time location update from the transit vehicle. + # + # @return [Integer] + required :last_location_update_time, Integer, api_name: :lastLocationUpdateTime + + # @!attribute last_update_time + # Timestamp of the last known real-time update from the transit vehicle. + # + # @return [Integer] + required :last_update_time, Integer, api_name: :lastUpdateTime + + # @!attribute occupancy_capacity + # Capacity of the transit vehicle in terms of occupancy. + # + # @return [Integer] + required :occupancy_capacity, Integer, api_name: :occupancyCapacity + + # @!attribute occupancy_count + # Current count of occupants in the transit vehicle. + # + # @return [Integer] + required :occupancy_count, Integer, api_name: :occupancyCount + + # @!attribute occupancy_status + # Current occupancy status of the transit vehicle. + # + # @return [String] + required :occupancy_status, String, api_name: :occupancyStatus + + # @!attribute phase + # Current journey phase of the trip. + # + # @return [String] + required :phase, String + + # @!attribute predicted + # Indicates if real-time arrival info is available for this trip. + # + # @return [Boolean] + required :predicted, OnebusawaySDK::Internal::Type::Boolean + + # @!attribute schedule_deviation + # Deviation from the schedule in seconds (positive for late, negative for early). + # + # @return [Integer] + required :schedule_deviation, Integer, api_name: :scheduleDeviation + + # @!attribute service_date + # Time, in milliseconds since the Unix epoch, of midnight for the start of the + # service date for the trip. + # + # @return [Integer] + required :service_date, Integer, api_name: :serviceDate + + # @!attribute status + # Current status modifiers for the trip. + # + # @return [String] + required :status, String + + # @!attribute total_distance_along_trip + # Total length of the trip, in meters. + # + # @return [Float] + required :total_distance_along_trip, Float, api_name: :totalDistanceAlongTrip + + # @!attribute closest_stop_time_offset + # Time offset from the closest stop to the current position of the transit vehicle + # (in seconds). + # + # @return [Integer, nil] + optional :closest_stop_time_offset, Integer, api_name: :closestStopTimeOffset + + # @!attribute frequency + # Information about frequency-based scheduling, if applicable to the trip. + # + # @return [String, nil] + optional :frequency, String + + # @!attribute last_known_location + # Last known location of the transit vehicle (optional). + # + # @return [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation, nil] + optional :last_known_location, + -> { OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation }, + api_name: :lastKnownLocation, + nil?: true + + # @!attribute last_known_orientation + # Last known orientation value received in real-time from the transit vehicle. + # + # @return [Float, nil] + optional :last_known_orientation, Float, api_name: :lastKnownOrientation + + # @!attribute next_stop + # ID of the next stop the transit vehicle is scheduled to arrive at. + # + # @return [String, nil] + optional :next_stop, String, api_name: :nextStop + + # @!attribute next_stop_time_offset + # Time offset from the next stop to the current position of the transit vehicle + # (in seconds). + # + # @return [Integer, nil] + optional :next_stop_time_offset, Integer, api_name: :nextStopTimeOffset + + # @!attribute orientation + # Orientation of the transit vehicle, represented as an angle in degrees. + # + # @return [Float, nil] + optional :orientation, Float + + # @!attribute position + # Current position of the transit vehicle. + # + # @return [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position, nil] + optional :position, + -> { OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position } + + # @!attribute scheduled_distance_along_trip + # Distance, in meters, the transit vehicle is scheduled to have progressed along + # the active trip. + # + # @return [Float, nil] + optional :scheduled_distance_along_trip, Float, api_name: :scheduledDistanceAlongTrip + + # @!attribute situation_ids + # References to situation elements (if any) applicable to this trip. + # + # @return [Array, nil] + optional :situation_ids, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :situationIds + + # @!attribute vehicle_id + # ID of the transit vehicle currently serving the trip. + # + # @return [String, nil] + optional :vehicle_id, String, api_name: :vehicleId + + # @!method initialize(active_trip_id:, block_trip_sequence:, closest_stop:, distance_along_trip:, last_known_distance_along_trip:, last_location_update_time:, last_update_time:, occupancy_capacity:, occupancy_count:, occupancy_status:, phase:, predicted:, schedule_deviation:, service_date:, status:, total_distance_along_trip:, closest_stop_time_offset: nil, frequency: nil, last_known_location: nil, last_known_orientation: nil, next_stop: nil, next_stop_time_offset: nil, orientation: nil, position: nil, scheduled_distance_along_trip: nil, situation_ids: nil, vehicle_id: nil) + # Some parameter documentations has been truncated, see + # {OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus} + # for more details. + # + # Trip-specific status for the arriving transit vehicle. + # + # @param active_trip_id [String] Trip ID of the trip the vehicle is actively serving. + # + # @param block_trip_sequence [Integer] Index of the active trip into the sequence of trips for the active block. + # + # @param closest_stop [String] ID of the closest stop to the current location of the transit vehicle. + # + # @param distance_along_trip [Float] Distance, in meters, the transit vehicle has progressed along the active trip. + # + # @param last_known_distance_along_trip [Float] Last known distance along the trip received in real-time from the transit vehicl + # + # @param last_location_update_time [Integer] Timestamp of the last known real-time location update from the transit vehicle. + # + # @param last_update_time [Integer] Timestamp of the last known real-time update from the transit vehicle. + # + # @param occupancy_capacity [Integer] Capacity of the transit vehicle in terms of occupancy. + # + # @param occupancy_count [Integer] Current count of occupants in the transit vehicle. + # + # @param occupancy_status [String] Current occupancy status of the transit vehicle. + # + # @param phase [String] Current journey phase of the trip. + # + # @param predicted [Boolean] Indicates if real-time arrival info is available for this trip. + # + # @param schedule_deviation [Integer] Deviation from the schedule in seconds (positive for late, negative for early). + # + # @param service_date [Integer] Time, in milliseconds since the Unix epoch, of midnight for the start of the ser + # + # @param status [String] Current status modifiers for the trip. + # + # @param total_distance_along_trip [Float] Total length of the trip, in meters. + # + # @param closest_stop_time_offset [Integer] Time offset from the closest stop to the current position of the transit vehicle + # + # @param frequency [String] Information about frequency-based scheduling, if applicable to the trip. + # + # @param last_known_location [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation, nil] Last known location of the transit vehicle (optional). + # + # @param last_known_orientation [Float] Last known orientation value received in real-time from the transit vehicle. + # + # @param next_stop [String] ID of the next stop the transit vehicle is scheduled to arrive at. + # + # @param next_stop_time_offset [Integer] Time offset from the next stop to the current position of the transit vehicle (i + # + # @param orientation [Float] Orientation of the transit vehicle, represented as an angle in degrees. + # + # @param position [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position] Current position of the transit vehicle. + # + # @param scheduled_distance_along_trip [Float] Distance, in meters, the transit vehicle is scheduled to have progressed along t + # + # @param situation_ids [Array] References to situation elements (if any) applicable to this trip. + # + # @param vehicle_id [String] ID of the transit vehicle currently serving the trip. + + # @see OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus#last_known_location + class LastKnownLocation < OnebusawaySDK::Internal::Type::BaseModel + # @!attribute lat + # Latitude of the last known location of the transit vehicle. + # + # @return [Float, nil] + optional :lat, Float + + # @!attribute lon + # Longitude of the last known location of the transit vehicle. + # + # @return [Float, nil] + optional :lon, Float + + # @!method initialize(lat: nil, lon: nil) + # Last known location of the transit vehicle (optional). + # + # @param lat [Float] Latitude of the last known location of the transit vehicle. + # + # @param lon [Float] Longitude of the last known location of the transit vehicle. + end + + # @see OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus#position + class Position < OnebusawaySDK::Internal::Type::BaseModel + # @!attribute lat + # Latitude of the current position of the transit vehicle. + # + # @return [Float, nil] + optional :lat, Float + + # @!attribute lon + # Longitude of the current position of the transit vehicle. + # + # @return [Float, nil] + optional :lon, Float + + # @!method initialize(lat: nil, lon: nil) + # Current position of the transit vehicle. + # + # @param lat [Float] Latitude of the current position of the transit vehicle. + # + # @param lon [Float] Longitude of the current position of the transit vehicle. + end + end + end + + class NearbyStopID < OnebusawaySDK::Internal::Type::BaseModel + # @!attribute distance_from_query + # + # @return [Float, nil] + optional :distance_from_query, Float, api_name: :distanceFromQuery + + # @!attribute stop_id + # + # @return [String, nil] + optional :stop_id, String, api_name: :stopId + + # @!method initialize(distance_from_query: nil, stop_id: nil) + # @param distance_from_query [Float] + # @param stop_id [String] + end + end + end + end + end +end diff --git a/lib/onebusaway_sdk/resources/arrivals_and_departures_for_location.rb b/lib/onebusaway_sdk/resources/arrivals_and_departures_for_location.rb new file mode 100644 index 00000000..3791723c --- /dev/null +++ b/lib/onebusaway_sdk/resources/arrivals_and_departures_for_location.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +module OnebusawaySDK + module Resources + class ArrivalsAndDeparturesForLocation + # Some parameter documentations has been truncated, see + # {OnebusawaySDK::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. + # + # @overload 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: {}) + # + # @param lat [Float] The latitude coordinate of the search center. + # + # @param lon [Float] The longitude coordinate of the search center. + # + # @param empty_returns_not_found [Boolean] If true, returns a 404 Not Found error instead of an empty result. + # + # @param lat_span [Float] Sets the latitude limits of the search bounding box. + # + # @param lon_span [Float] Sets the longitude limits of the search bounding box. + # + # @param max_count [Integer] The max size of the list of nearby stops and arrivals to return. Defaults to 250 + # + # @param minutes_after [Integer] Include arrivals and departures this many minutes after the query time. + # + # @param minutes_before [Integer] Include arrivals and departures this many minutes before the query time. + # + # @param radius [Float] The search radius in meters. + # + # @param route_type [String] Optional list of GTFS routeTypes to filter by (comma delimited) e.g. "1,2,3". + # + # @param time [Integer] By default, returns the status right now. Can be queried at a specific time (mil + # + # @param request_options [OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse] + # + # @see OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListParams + def list(params) + parsed, options = 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: options + ) + end + + # @api private + # + # @param client [OnebusawaySDK::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/rbi/onebusaway_sdk/client.rbi b/rbi/onebusaway_sdk/client.rbi index dcf1acd1..55e587e5 100644 --- a/rbi/onebusaway_sdk/client.rbi +++ b/rbi/onebusaway_sdk/client.rbi @@ -61,6 +61,9 @@ module OnebusawaySDK sig { returns(OnebusawaySDK::Resources::ScheduleForRoute) } attr_reader :schedule_for_route + sig { returns(OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation) } + attr_reader :arrivals_and_departures_for_location + sig { returns(OnebusawaySDK::Resources::ArrivalAndDeparture) } attr_reader :arrival_and_departure diff --git a/rbi/onebusaway_sdk/models.rbi b/rbi/onebusaway_sdk/models.rbi index d67f4438..87abad0d 100644 --- a/rbi/onebusaway_sdk/models.rbi +++ b/rbi/onebusaway_sdk/models.rbi @@ -12,6 +12,9 @@ module OnebusawaySDK ArrivalAndDepartureRetrieveParams = OnebusawaySDK::Models::ArrivalAndDepartureRetrieveParams + ArrivalsAndDeparturesForLocationListParams = + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListParams + BlockRetrieveParams = OnebusawaySDK::Models::BlockRetrieveParams ConfigRetrieveParams = OnebusawaySDK::Models::ConfigRetrieveParams diff --git a/rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbi b/rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbi new file mode 100644 index 00000000..cef36b64 --- /dev/null +++ b/rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbi @@ -0,0 +1,157 @@ +# typed: strong + +module OnebusawaySDK + module Models + class ArrivalsAndDeparturesForLocationListParams < OnebusawaySDK::Internal::Type::BaseModel + extend OnebusawaySDK::Internal::Type::RequestParameters::Converter + include OnebusawaySDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::ArrivalsAndDeparturesForLocationListParams, + OnebusawaySDK::Internal::AnyHash + ) + end + + # The latitude coordinate of the search center. + sig { returns(Float) } + attr_accessor :lat + + # The longitude coordinate of the search center. + sig { returns(Float) } + attr_accessor :lon + + # If true, returns a 404 Not Found error instead of an empty result. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :empty_returns_not_found + + sig { params(empty_returns_not_found: T::Boolean).void } + attr_writer :empty_returns_not_found + + # Sets the latitude limits of the search bounding box. + sig { returns(T.nilable(Float)) } + attr_reader :lat_span + + sig { params(lat_span: Float).void } + attr_writer :lat_span + + # Sets the longitude limits of the search bounding box. + sig { returns(T.nilable(Float)) } + attr_reader :lon_span + + sig { params(lon_span: Float).void } + attr_writer :lon_span + + # The max size of the list of nearby stops and arrivals to return. Defaults to + # 250, max 1000. + sig { returns(T.nilable(Integer)) } + attr_reader :max_count + + sig { params(max_count: Integer).void } + attr_writer :max_count + + # Include arrivals and departures this many minutes after the query time. + sig { returns(T.nilable(Integer)) } + attr_reader :minutes_after + + sig { params(minutes_after: Integer).void } + attr_writer :minutes_after + + # Include arrivals and departures this many minutes before the query time. + sig { returns(T.nilable(Integer)) } + attr_reader :minutes_before + + sig { params(minutes_before: Integer).void } + attr_writer :minutes_before + + # The search radius in meters. + sig { returns(T.nilable(Float)) } + attr_reader :radius + + sig { params(radius: Float).void } + attr_writer :radius + + # Optional list of GTFS routeTypes to filter by (comma delimited) e.g. "1,2,3". + sig { returns(T.nilable(String)) } + attr_reader :route_type + + sig { params(route_type: String).void } + attr_writer :route_type + + # By default, returns the status right now. Can be queried at a specific time + # (milliseconds since epoch) for testing. + sig { returns(T.nilable(Integer)) } + attr_reader :time + + sig { params(time: Integer).void } + attr_writer :time + + sig do + params( + lat: Float, + lon: Float, + empty_returns_not_found: T::Boolean, + lat_span: Float, + lon_span: Float, + max_count: Integer, + minutes_after: Integer, + minutes_before: Integer, + radius: Float, + route_type: String, + time: Integer, + request_options: OnebusawaySDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The latitude coordinate of the search center. + lat:, + # The longitude coordinate of the search center. + lon:, + # If true, returns a 404 Not Found error instead of an empty result. + empty_returns_not_found: nil, + # Sets the latitude limits of the search bounding box. + lat_span: nil, + # Sets the longitude limits of the search bounding box. + lon_span: nil, + # The max size of the list of nearby stops and arrivals to return. Defaults to + # 250, max 1000. + max_count: nil, + # Include arrivals and departures this many minutes after the query time. + minutes_after: nil, + # Include arrivals and departures this many minutes before the query time. + minutes_before: nil, + # The search radius in meters. + radius: nil, + # Optional list of GTFS routeTypes to filter by (comma delimited) e.g. "1,2,3". + route_type: nil, + # By default, returns the status right now. Can be queried at a specific time + # (milliseconds since epoch) for testing. + time: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + lat: Float, + lon: Float, + empty_returns_not_found: T::Boolean, + lat_span: Float, + lon_span: Float, + max_count: Integer, + minutes_after: Integer, + minutes_before: Integer, + radius: Float, + route_type: String, + time: Integer, + request_options: OnebusawaySDK::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbi b/rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbi new file mode 100644 index 00000000..02f2b22c --- /dev/null +++ b/rbi/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbi @@ -0,0 +1,1000 @@ +# typed: strong + +module OnebusawaySDK + module Models + class ArrivalsAndDeparturesForLocationListResponse < OnebusawaySDK::Models::ResponseWrapper + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse, + OnebusawaySDK::Internal::AnyHash + ) + end + + sig do + returns( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data + ) + end + attr_reader :data + + sig do + params( + data: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::OrHash + ).void + end + attr_writer :data + + sig do + params( + data: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::OrHash + ).returns(T.attached_class) + end + def self.new(data:) + end + + sig do + override.returns( + { + data: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data + } + ) + end + def to_hash + end + + class Data < OnebusawaySDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data, + OnebusawaySDK::Internal::AnyHash + ) + end + + sig do + returns( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry + ) + end + attr_reader :entry + + sig do + params( + entry: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::OrHash + ).void + end + attr_writer :entry + + sig { returns(OnebusawaySDK::References) } + attr_reader :references + + sig { params(references: OnebusawaySDK::References::OrHash).void } + attr_writer :references + + sig do + params( + entry: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::OrHash, + references: OnebusawaySDK::References::OrHash + ).returns(T.attached_class) + end + def self.new(entry:, references:) + end + + sig do + override.returns( + { + entry: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry, + references: OnebusawaySDK::References + } + ) + end + def to_hash + end + + class Entry < OnebusawaySDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry, + OnebusawaySDK::Internal::AnyHash + ) + end + + sig do + returns( + T::Array[ + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture + ] + ) + end + attr_accessor :arrivals_and_departures + + sig { returns(T::Boolean) } + attr_accessor :limit_exceeded + + sig do + returns( + T::Array[ + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID + ] + ) + end + attr_accessor :nearby_stop_ids + + sig { returns(T::Array[String]) } + attr_accessor :stop_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_reader :situation_ids + + sig { params(situation_ids: T::Array[String]).void } + attr_writer :situation_ids + + sig do + params( + arrivals_and_departures: + T::Array[ + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::OrHash + ], + limit_exceeded: T::Boolean, + nearby_stop_ids: + T::Array[ + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID::OrHash + ], + stop_ids: T::Array[String], + situation_ids: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + arrivals_and_departures:, + limit_exceeded:, + nearby_stop_ids:, + stop_ids:, + situation_ids: nil + ) + end + + sig do + override.returns( + { + arrivals_and_departures: + T::Array[ + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture + ], + limit_exceeded: T::Boolean, + nearby_stop_ids: + T::Array[ + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID + ], + stop_ids: T::Array[String], + situation_ids: T::Array[String] + } + ) + end + def to_hash + end + + class ArrivalsAndDeparture < OnebusawaySDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture, + OnebusawaySDK::Internal::AnyHash + ) + end + + # Indicates if riders can arrive on this transit vehicle. + sig { returns(T::Boolean) } + attr_accessor :arrival_enabled + + # Index of this arrival’s trip into the sequence of trips for the active block. + sig { returns(Integer) } + attr_accessor :block_trip_sequence + + # Indicates if riders can depart from this transit vehicle. + sig { returns(T::Boolean) } + attr_accessor :departure_enabled + + # Number of stops between the arriving transit vehicle and the current stop + # (excluding the current stop). + sig { returns(Integer) } + attr_accessor :number_of_stops_away + + # Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time + # available). + sig { returns(Integer) } + attr_accessor :predicted_arrival_time + + # Predicted departure time, in milliseconds since Unix epoch (zero if no real-time + # available). + sig { returns(Integer) } + attr_accessor :predicted_departure_time + + # The ID of the route for the arriving vehicle. + sig { returns(String) } + attr_accessor :route_id + + # Scheduled arrival time, in milliseconds since Unix epoch. + sig { returns(Integer) } + attr_accessor :scheduled_arrival_time + + # Scheduled departure time, in milliseconds since Unix epoch. + sig { returns(Integer) } + attr_accessor :scheduled_departure_time + + # Time, in milliseconds since the Unix epoch, of midnight for the start of the + # service date for the trip. + sig { returns(Integer) } + attr_accessor :service_date + + # The ID of the stop the vehicle is arriving at. + sig { returns(String) } + attr_accessor :stop_id + + # Index of the stop into the sequence of stops that make up the trip for this + # arrival. + sig { returns(Integer) } + attr_accessor :stop_sequence + + # Total number of stops visited on the trip for this arrival. + sig { returns(Integer) } + attr_accessor :total_stops_in_trip + + # Optional trip headsign that potentially overrides the trip headsign in the + # referenced trip element. + sig { returns(String) } + attr_accessor :trip_headsign + + # The ID of the trip for the arriving vehicle. + sig { returns(String) } + attr_accessor :trip_id + + # ID of the transit vehicle serving this trip. + sig { returns(String) } + attr_accessor :vehicle_id + + # The actual track information of the arriving transit vehicle. + sig { returns(T.nilable(String)) } + attr_reader :actual_track + + sig { params(actual_track: String).void } + attr_writer :actual_track + + # Distance of the arriving transit vehicle from the stop, in meters. + sig { returns(T.nilable(Float)) } + attr_reader :distance_from_stop + + sig { params(distance_from_stop: Float).void } + attr_writer :distance_from_stop + + # Information about frequency-based scheduling, if applicable to the trip. + sig { returns(T.nilable(String)) } + attr_reader :frequency + + sig { params(frequency: String).void } + attr_writer :frequency + + # Historical occupancy information of the transit vehicle. + sig { returns(T.nilable(String)) } + attr_reader :historical_occupancy + + sig { params(historical_occupancy: String).void } + attr_writer :historical_occupancy + + # Timestamp of the last update time for this arrival. + sig { returns(T.nilable(Integer)) } + attr_reader :last_update_time + + sig { params(last_update_time: Integer).void } + attr_writer :last_update_time + + # Current occupancy status of the transit vehicle. + sig { returns(T.nilable(String)) } + attr_reader :occupancy_status + + sig { params(occupancy_status: String).void } + attr_writer :occupancy_status + + # Indicates if real-time arrival info is available for this trip. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :predicted + + sig { params(predicted: T::Boolean).void } + attr_writer :predicted + + # Interval for predicted arrival time, if available. + sig { returns(T.nilable(String)) } + attr_reader :predicted_arrival_interval + + sig { params(predicted_arrival_interval: String).void } + attr_writer :predicted_arrival_interval + + # Interval for predicted departure time, if available. + sig { returns(T.nilable(String)) } + attr_reader :predicted_departure_interval + + sig { params(predicted_departure_interval: String).void } + attr_writer :predicted_departure_interval + + # Predicted occupancy status of the transit vehicle. + sig { returns(T.nilable(String)) } + attr_reader :predicted_occupancy + + sig { params(predicted_occupancy: String).void } + attr_writer :predicted_occupancy + + # Optional route long name that potentially overrides the route long name in the + # referenced route element. + sig { returns(T.nilable(String)) } + attr_reader :route_long_name + + sig { params(route_long_name: String).void } + attr_writer :route_long_name + + # Optional route short name that potentially overrides the route short name in the + # referenced route element. + sig { returns(T.nilable(String)) } + attr_reader :route_short_name + + sig { params(route_short_name: String).void } + attr_writer :route_short_name + + # Interval for scheduled arrival time. + sig { returns(T.nilable(String)) } + attr_reader :scheduled_arrival_interval + + sig { params(scheduled_arrival_interval: String).void } + attr_writer :scheduled_arrival_interval + + # Interval for scheduled departure time. + sig { returns(T.nilable(String)) } + attr_reader :scheduled_departure_interval + + sig { params(scheduled_departure_interval: String).void } + attr_writer :scheduled_departure_interval + + # Scheduled track information of the arriving transit vehicle. + sig { returns(T.nilable(String)) } + attr_reader :scheduled_track + + sig { params(scheduled_track: String).void } + attr_writer :scheduled_track + + # References to situation elements (if any) applicable to this arrival. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :situation_ids + + sig { params(situation_ids: T::Array[String]).void } + attr_writer :situation_ids + + # Current status of the arrival. + sig { returns(T.nilable(String)) } + attr_reader :status + + sig { params(status: String).void } + attr_writer :status + + # Trip-specific status for the arriving transit vehicle. + sig do + returns( + T.nilable( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus + ) + ) + end + attr_reader :trip_status + + sig do + params( + trip_status: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::OrHash + ).void + end + attr_writer :trip_status + + sig do + params( + arrival_enabled: T::Boolean, + block_trip_sequence: Integer, + departure_enabled: T::Boolean, + number_of_stops_away: Integer, + predicted_arrival_time: Integer, + predicted_departure_time: Integer, + route_id: String, + scheduled_arrival_time: Integer, + scheduled_departure_time: Integer, + service_date: Integer, + stop_id: String, + stop_sequence: Integer, + total_stops_in_trip: Integer, + trip_headsign: String, + trip_id: String, + vehicle_id: String, + actual_track: String, + distance_from_stop: Float, + frequency: String, + historical_occupancy: String, + last_update_time: Integer, + occupancy_status: String, + predicted: T::Boolean, + predicted_arrival_interval: String, + predicted_departure_interval: String, + predicted_occupancy: String, + route_long_name: String, + route_short_name: String, + scheduled_arrival_interval: String, + scheduled_departure_interval: String, + scheduled_track: String, + situation_ids: T::Array[String], + status: String, + trip_status: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::OrHash + ).returns(T.attached_class) + end + def self.new( + # Indicates if riders can arrive on this transit vehicle. + arrival_enabled:, + # Index of this arrival’s trip into the sequence of trips for the active block. + block_trip_sequence:, + # Indicates if riders can depart from this transit vehicle. + departure_enabled:, + # Number of stops between the arriving transit vehicle and the current stop + # (excluding the current stop). + number_of_stops_away:, + # Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time + # available). + predicted_arrival_time:, + # Predicted departure time, in milliseconds since Unix epoch (zero if no real-time + # available). + predicted_departure_time:, + # The ID of the route for the arriving vehicle. + route_id:, + # Scheduled arrival time, in milliseconds since Unix epoch. + scheduled_arrival_time:, + # Scheduled departure time, in milliseconds since Unix epoch. + scheduled_departure_time:, + # Time, in milliseconds since the Unix epoch, of midnight for the start of the + # service date for the trip. + service_date:, + # The ID of the stop the vehicle is arriving at. + stop_id:, + # Index of the stop into the sequence of stops that make up the trip for this + # arrival. + stop_sequence:, + # Total number of stops visited on the trip for this arrival. + total_stops_in_trip:, + # Optional trip headsign that potentially overrides the trip headsign in the + # referenced trip element. + trip_headsign:, + # The ID of the trip for the arriving vehicle. + trip_id:, + # ID of the transit vehicle serving this trip. + vehicle_id:, + # The actual track information of the arriving transit vehicle. + actual_track: nil, + # Distance of the arriving transit vehicle from the stop, in meters. + distance_from_stop: nil, + # Information about frequency-based scheduling, if applicable to the trip. + frequency: nil, + # Historical occupancy information of the transit vehicle. + historical_occupancy: nil, + # Timestamp of the last update time for this arrival. + last_update_time: nil, + # Current occupancy status of the transit vehicle. + occupancy_status: nil, + # Indicates if real-time arrival info is available for this trip. + predicted: nil, + # Interval for predicted arrival time, if available. + predicted_arrival_interval: nil, + # Interval for predicted departure time, if available. + predicted_departure_interval: nil, + # Predicted occupancy status of the transit vehicle. + predicted_occupancy: nil, + # Optional route long name that potentially overrides the route long name in the + # referenced route element. + route_long_name: nil, + # Optional route short name that potentially overrides the route short name in the + # referenced route element. + route_short_name: nil, + # Interval for scheduled arrival time. + scheduled_arrival_interval: nil, + # Interval for scheduled departure time. + scheduled_departure_interval: nil, + # Scheduled track information of the arriving transit vehicle. + scheduled_track: nil, + # References to situation elements (if any) applicable to this arrival. + situation_ids: nil, + # Current status of the arrival. + status: nil, + # Trip-specific status for the arriving transit vehicle. + trip_status: nil + ) + end + + sig do + override.returns( + { + arrival_enabled: T::Boolean, + block_trip_sequence: Integer, + departure_enabled: T::Boolean, + number_of_stops_away: Integer, + predicted_arrival_time: Integer, + predicted_departure_time: Integer, + route_id: String, + scheduled_arrival_time: Integer, + scheduled_departure_time: Integer, + service_date: Integer, + stop_id: String, + stop_sequence: Integer, + total_stops_in_trip: Integer, + trip_headsign: String, + trip_id: String, + vehicle_id: String, + actual_track: String, + distance_from_stop: Float, + frequency: String, + historical_occupancy: String, + last_update_time: Integer, + occupancy_status: String, + predicted: T::Boolean, + predicted_arrival_interval: String, + predicted_departure_interval: String, + predicted_occupancy: String, + route_long_name: String, + route_short_name: String, + scheduled_arrival_interval: String, + scheduled_departure_interval: String, + scheduled_track: String, + situation_ids: T::Array[String], + status: String, + trip_status: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus + } + ) + end + def to_hash + end + + class TripStatus < OnebusawaySDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus, + OnebusawaySDK::Internal::AnyHash + ) + end + + # Trip ID of the trip the vehicle is actively serving. + sig { returns(String) } + attr_accessor :active_trip_id + + # Index of the active trip into the sequence of trips for the active block. + sig { returns(Integer) } + attr_accessor :block_trip_sequence + + # ID of the closest stop to the current location of the transit vehicle. + sig { returns(String) } + attr_accessor :closest_stop + + # Distance, in meters, the transit vehicle has progressed along the active trip. + sig { returns(Float) } + attr_accessor :distance_along_trip + + # Last known distance along the trip received in real-time from the transit + # vehicle. + sig { returns(Float) } + attr_accessor :last_known_distance_along_trip + + # Timestamp of the last known real-time location update from the transit vehicle. + sig { returns(Integer) } + attr_accessor :last_location_update_time + + # Timestamp of the last known real-time update from the transit vehicle. + sig { returns(Integer) } + attr_accessor :last_update_time + + # Capacity of the transit vehicle in terms of occupancy. + sig { returns(Integer) } + attr_accessor :occupancy_capacity + + # Current count of occupants in the transit vehicle. + sig { returns(Integer) } + attr_accessor :occupancy_count + + # Current occupancy status of the transit vehicle. + sig { returns(String) } + attr_accessor :occupancy_status + + # Current journey phase of the trip. + sig { returns(String) } + attr_accessor :phase + + # Indicates if real-time arrival info is available for this trip. + sig { returns(T::Boolean) } + attr_accessor :predicted + + # Deviation from the schedule in seconds (positive for late, negative for early). + sig { returns(Integer) } + attr_accessor :schedule_deviation + + # Time, in milliseconds since the Unix epoch, of midnight for the start of the + # service date for the trip. + sig { returns(Integer) } + attr_accessor :service_date + + # Current status modifiers for the trip. + sig { returns(String) } + attr_accessor :status + + # Total length of the trip, in meters. + sig { returns(Float) } + attr_accessor :total_distance_along_trip + + # Time offset from the closest stop to the current position of the transit vehicle + # (in seconds). + sig { returns(T.nilable(Integer)) } + attr_reader :closest_stop_time_offset + + sig { params(closest_stop_time_offset: Integer).void } + attr_writer :closest_stop_time_offset + + # Information about frequency-based scheduling, if applicable to the trip. + sig { returns(T.nilable(String)) } + attr_reader :frequency + + sig { params(frequency: String).void } + attr_writer :frequency + + # Last known location of the transit vehicle (optional). + sig do + returns( + T.nilable( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation + ) + ) + end + attr_reader :last_known_location + + sig do + params( + last_known_location: + T.nilable( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation::OrHash + ) + ).void + end + attr_writer :last_known_location + + # Last known orientation value received in real-time from the transit vehicle. + sig { returns(T.nilable(Float)) } + attr_reader :last_known_orientation + + sig { params(last_known_orientation: Float).void } + attr_writer :last_known_orientation + + # ID of the next stop the transit vehicle is scheduled to arrive at. + sig { returns(T.nilable(String)) } + attr_reader :next_stop + + sig { params(next_stop: String).void } + attr_writer :next_stop + + # Time offset from the next stop to the current position of the transit vehicle + # (in seconds). + sig { returns(T.nilable(Integer)) } + attr_reader :next_stop_time_offset + + sig { params(next_stop_time_offset: Integer).void } + attr_writer :next_stop_time_offset + + # Orientation of the transit vehicle, represented as an angle in degrees. + sig { returns(T.nilable(Float)) } + attr_reader :orientation + + sig { params(orientation: Float).void } + attr_writer :orientation + + # Current position of the transit vehicle. + sig do + returns( + T.nilable( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position + ) + ) + end + attr_reader :position + + sig do + params( + position: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position::OrHash + ).void + end + attr_writer :position + + # Distance, in meters, the transit vehicle is scheduled to have progressed along + # the active trip. + sig { returns(T.nilable(Float)) } + attr_reader :scheduled_distance_along_trip + + sig { params(scheduled_distance_along_trip: Float).void } + attr_writer :scheduled_distance_along_trip + + # References to situation elements (if any) applicable to this trip. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :situation_ids + + sig { params(situation_ids: T::Array[String]).void } + attr_writer :situation_ids + + # ID of the transit vehicle currently serving the trip. + sig { returns(T.nilable(String)) } + attr_reader :vehicle_id + + sig { params(vehicle_id: String).void } + attr_writer :vehicle_id + + # Trip-specific status for the arriving transit vehicle. + sig do + params( + active_trip_id: String, + block_trip_sequence: Integer, + closest_stop: String, + distance_along_trip: Float, + last_known_distance_along_trip: Float, + last_location_update_time: Integer, + last_update_time: Integer, + occupancy_capacity: Integer, + occupancy_count: Integer, + occupancy_status: String, + phase: String, + predicted: T::Boolean, + schedule_deviation: Integer, + service_date: Integer, + status: String, + total_distance_along_trip: Float, + closest_stop_time_offset: Integer, + frequency: String, + last_known_location: + T.nilable( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation::OrHash + ), + last_known_orientation: Float, + next_stop: String, + next_stop_time_offset: Integer, + orientation: Float, + position: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position::OrHash, + scheduled_distance_along_trip: Float, + situation_ids: T::Array[String], + vehicle_id: String + ).returns(T.attached_class) + end + def self.new( + # Trip ID of the trip the vehicle is actively serving. + active_trip_id:, + # Index of the active trip into the sequence of trips for the active block. + block_trip_sequence:, + # ID of the closest stop to the current location of the transit vehicle. + closest_stop:, + # Distance, in meters, the transit vehicle has progressed along the active trip. + distance_along_trip:, + # Last known distance along the trip received in real-time from the transit + # vehicle. + last_known_distance_along_trip:, + # Timestamp of the last known real-time location update from the transit vehicle. + last_location_update_time:, + # Timestamp of the last known real-time update from the transit vehicle. + last_update_time:, + # Capacity of the transit vehicle in terms of occupancy. + occupancy_capacity:, + # Current count of occupants in the transit vehicle. + occupancy_count:, + # Current occupancy status of the transit vehicle. + occupancy_status:, + # Current journey phase of the trip. + phase:, + # Indicates if real-time arrival info is available for this trip. + predicted:, + # Deviation from the schedule in seconds (positive for late, negative for early). + schedule_deviation:, + # Time, in milliseconds since the Unix epoch, of midnight for the start of the + # service date for the trip. + service_date:, + # Current status modifiers for the trip. + status:, + # Total length of the trip, in meters. + total_distance_along_trip:, + # Time offset from the closest stop to the current position of the transit vehicle + # (in seconds). + closest_stop_time_offset: nil, + # Information about frequency-based scheduling, if applicable to the trip. + frequency: nil, + # Last known location of the transit vehicle (optional). + last_known_location: nil, + # Last known orientation value received in real-time from the transit vehicle. + last_known_orientation: nil, + # ID of the next stop the transit vehicle is scheduled to arrive at. + next_stop: nil, + # Time offset from the next stop to the current position of the transit vehicle + # (in seconds). + next_stop_time_offset: nil, + # Orientation of the transit vehicle, represented as an angle in degrees. + orientation: nil, + # Current position of the transit vehicle. + position: nil, + # Distance, in meters, the transit vehicle is scheduled to have progressed along + # the active trip. + scheduled_distance_along_trip: nil, + # References to situation elements (if any) applicable to this trip. + situation_ids: nil, + # ID of the transit vehicle currently serving the trip. + vehicle_id: nil + ) + end + + sig do + override.returns( + { + active_trip_id: String, + block_trip_sequence: Integer, + closest_stop: String, + distance_along_trip: Float, + last_known_distance_along_trip: Float, + last_location_update_time: Integer, + last_update_time: Integer, + occupancy_capacity: Integer, + occupancy_count: Integer, + occupancy_status: String, + phase: String, + predicted: T::Boolean, + schedule_deviation: Integer, + service_date: Integer, + status: String, + total_distance_along_trip: Float, + closest_stop_time_offset: Integer, + frequency: String, + last_known_location: + T.nilable( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation + ), + last_known_orientation: Float, + next_stop: String, + next_stop_time_offset: Integer, + orientation: Float, + position: + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position, + scheduled_distance_along_trip: Float, + situation_ids: T::Array[String], + vehicle_id: String + } + ) + end + def to_hash + end + + class LastKnownLocation < OnebusawaySDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation, + OnebusawaySDK::Internal::AnyHash + ) + end + + # Latitude of the last known location of the transit vehicle. + sig { returns(T.nilable(Float)) } + attr_reader :lat + + sig { params(lat: Float).void } + attr_writer :lat + + # Longitude of the last known location of the transit vehicle. + sig { returns(T.nilable(Float)) } + attr_reader :lon + + sig { params(lon: Float).void } + attr_writer :lon + + # Last known location of the transit vehicle (optional). + sig { params(lat: Float, lon: Float).returns(T.attached_class) } + def self.new( + # Latitude of the last known location of the transit vehicle. + lat: nil, + # Longitude of the last known location of the transit vehicle. + lon: nil + ) + end + + sig { override.returns({ lat: Float, lon: Float }) } + def to_hash + end + end + + class Position < OnebusawaySDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position, + OnebusawaySDK::Internal::AnyHash + ) + end + + # Latitude of the current position of the transit vehicle. + sig { returns(T.nilable(Float)) } + attr_reader :lat + + sig { params(lat: Float).void } + attr_writer :lat + + # Longitude of the current position of the transit vehicle. + sig { returns(T.nilable(Float)) } + attr_reader :lon + + sig { params(lon: Float).void } + attr_writer :lon + + # Current position of the transit vehicle. + sig { params(lat: Float, lon: Float).returns(T.attached_class) } + def self.new( + # Latitude of the current position of the transit vehicle. + lat: nil, + # Longitude of the current position of the transit vehicle. + lon: nil + ) + end + + sig { override.returns({ lat: Float, lon: Float }) } + def to_hash + end + end + end + end + + class NearbyStopID < OnebusawaySDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID, + OnebusawaySDK::Internal::AnyHash + ) + end + + sig { returns(T.nilable(Float)) } + attr_reader :distance_from_query + + sig { params(distance_from_query: Float).void } + attr_writer :distance_from_query + + sig { returns(T.nilable(String)) } + attr_reader :stop_id + + sig { params(stop_id: String).void } + attr_writer :stop_id + + sig do + params(distance_from_query: Float, stop_id: String).returns( + T.attached_class + ) + end + def self.new(distance_from_query: nil, stop_id: nil) + end + + sig do + override.returns({ distance_from_query: Float, stop_id: String }) + end + def to_hash + end + end + end + end + end + end +end diff --git a/rbi/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbi b/rbi/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbi new file mode 100644 index 00000000..b920466d --- /dev/null +++ b/rbi/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbi @@ -0,0 +1,61 @@ +# typed: strong + +module OnebusawaySDK + module Resources + class ArrivalsAndDeparturesForLocation + # Returns real-time arrival and departure data for stops within a bounding box or + # radius centered on a specific location. + sig do + params( + lat: Float, + lon: Float, + empty_returns_not_found: T::Boolean, + lat_span: Float, + lon_span: Float, + max_count: Integer, + minutes_after: Integer, + minutes_before: Integer, + radius: Float, + route_type: String, + time: Integer, + request_options: OnebusawaySDK::RequestOptions::OrHash + ).returns( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse + ) + end + def list( + # The latitude coordinate of the search center. + lat:, + # The longitude coordinate of the search center. + lon:, + # If true, returns a 404 Not Found error instead of an empty result. + empty_returns_not_found: nil, + # Sets the latitude limits of the search bounding box. + lat_span: nil, + # Sets the longitude limits of the search bounding box. + lon_span: nil, + # The max size of the list of nearby stops and arrivals to return. Defaults to + # 250, max 1000. + max_count: nil, + # Include arrivals and departures this many minutes after the query time. + minutes_after: nil, + # Include arrivals and departures this many minutes before the query time. + minutes_before: nil, + # The search radius in meters. + radius: nil, + # Optional list of GTFS routeTypes to filter by (comma delimited) e.g. "1,2,3". + route_type: nil, + # By default, returns the status right now. Can be queried at a specific time + # (milliseconds since epoch) for testing. + time: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/sig/onebusaway_sdk/client.rbs b/sig/onebusaway_sdk/client.rbs index 63c3fdfb..f210a080 100644 --- a/sig/onebusaway_sdk/client.rbs +++ b/sig/onebusaway_sdk/client.rbs @@ -42,6 +42,8 @@ module OnebusawaySDK attr_reader schedule_for_route: OnebusawaySDK::Resources::ScheduleForRoute + attr_reader arrivals_and_departures_for_location: OnebusawaySDK::Resources::ArrivalsAndDeparturesForLocation + attr_reader arrival_and_departure: OnebusawaySDK::Resources::ArrivalAndDeparture attr_reader trip: OnebusawaySDK::Resources::Trip diff --git a/sig/onebusaway_sdk/models.rbs b/sig/onebusaway_sdk/models.rbs index 9bc6b080..a88c0118 100644 --- a/sig/onebusaway_sdk/models.rbs +++ b/sig/onebusaway_sdk/models.rbs @@ -7,6 +7,8 @@ module OnebusawaySDK class ArrivalAndDepartureRetrieveParams = OnebusawaySDK::Models::ArrivalAndDepartureRetrieveParams + class ArrivalsAndDeparturesForLocationListParams = OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListParams + class BlockRetrieveParams = OnebusawaySDK::Models::BlockRetrieveParams class ConfigRetrieveParams = OnebusawaySDK::Models::ConfigRetrieveParams diff --git a/sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbs b/sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbs new file mode 100644 index 00000000..28c89bbe --- /dev/null +++ b/sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_params.rbs @@ -0,0 +1,94 @@ +module OnebusawaySDK + module Models + type arrivals_and_departures_for_location_list_params = + { + lat: Float, + lon: Float, + empty_returns_not_found: bool, + lat_span: Float, + lon_span: Float, + max_count: Integer, + minutes_after: Integer, + minutes_before: Integer, + radius: Float, + route_type: String, + time: Integer + } + & OnebusawaySDK::Internal::Type::request_parameters + + class ArrivalsAndDeparturesForLocationListParams < OnebusawaySDK::Internal::Type::BaseModel + extend OnebusawaySDK::Internal::Type::RequestParameters::Converter + include OnebusawaySDK::Internal::Type::RequestParameters + + attr_accessor lat: Float + + attr_accessor lon: Float + + attr_reader empty_returns_not_found: bool? + + def empty_returns_not_found=: (bool) -> bool + + attr_reader lat_span: Float? + + def lat_span=: (Float) -> Float + + attr_reader lon_span: Float? + + def lon_span=: (Float) -> Float + + attr_reader max_count: Integer? + + def max_count=: (Integer) -> Integer + + attr_reader minutes_after: Integer? + + def minutes_after=: (Integer) -> Integer + + attr_reader minutes_before: Integer? + + def minutes_before=: (Integer) -> Integer + + attr_reader radius: Float? + + def radius=: (Float) -> Float + + attr_reader route_type: String? + + def route_type=: (String) -> String + + attr_reader time: Integer? + + def time=: (Integer) -> Integer + + def initialize: ( + lat: Float, + lon: Float, + ?empty_returns_not_found: bool, + ?lat_span: Float, + ?lon_span: Float, + ?max_count: Integer, + ?minutes_after: Integer, + ?minutes_before: Integer, + ?radius: Float, + ?route_type: String, + ?time: Integer, + ?request_options: OnebusawaySDK::request_opts + ) -> void + + def to_hash: -> { + lat: Float, + lon: Float, + empty_returns_not_found: bool, + lat_span: Float, + lon_span: Float, + max_count: Integer, + minutes_after: Integer, + minutes_before: Integer, + radius: Float, + route_type: String, + time: Integer, + request_options: OnebusawaySDK::RequestOptions + } + end + end +end diff --git a/sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbs b/sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbs new file mode 100644 index 00000000..0d2068e9 --- /dev/null +++ b/sig/onebusaway_sdk/models/arrivals_and_departures_for_location_list_response.rbs @@ -0,0 +1,525 @@ +module OnebusawaySDK + module Models + type arrivals_and_departures_for_location_list_response = + { + data: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data + } + + class ArrivalsAndDeparturesForLocationListResponse < OnebusawaySDK::Models::ResponseWrapper + def data: -> OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data + + def data=: ( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data _ + ) -> OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data + + def initialize: ( + data: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data + ) -> void + + def to_hash: -> { + data: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data + } + + type data = + { + entry: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry, + references: OnebusawaySDK::References + } + + class Data < OnebusawaySDK::Internal::Type::BaseModel + attr_accessor entry: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry + + attr_accessor references: OnebusawaySDK::References + + def initialize: ( + entry: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry, + references: OnebusawaySDK::References + ) -> void + + def to_hash: -> { + entry: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry, + references: OnebusawaySDK::References + } + + type entry = + { + arrivals_and_departures: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture], + limit_exceeded: bool, + nearby_stop_ids: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID], + stop_ids: ::Array[String], + situation_ids: ::Array[String] + } + + class Entry < OnebusawaySDK::Internal::Type::BaseModel + attr_accessor arrivals_and_departures: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture] + + attr_accessor limit_exceeded: bool + + attr_accessor nearby_stop_ids: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID] + + attr_accessor stop_ids: ::Array[String] + + attr_reader situation_ids: ::Array[String]? + + def situation_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + arrivals_and_departures: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture], + limit_exceeded: bool, + nearby_stop_ids: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID], + stop_ids: ::Array[String], + ?situation_ids: ::Array[String] + ) -> void + + def to_hash: -> { + arrivals_and_departures: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture], + limit_exceeded: bool, + nearby_stop_ids: ::Array[OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::NearbyStopID], + stop_ids: ::Array[String], + situation_ids: ::Array[String] + } + + type arrivals_and_departure = + { + arrival_enabled: bool, + block_trip_sequence: Integer, + departure_enabled: bool, + number_of_stops_away: Integer, + predicted_arrival_time: Integer, + predicted_departure_time: Integer, + route_id: String, + scheduled_arrival_time: Integer, + scheduled_departure_time: Integer, + service_date: Integer, + stop_id: String, + stop_sequence: Integer, + total_stops_in_trip: Integer, + trip_headsign: String, + trip_id: String, + vehicle_id: String, + actual_track: String, + distance_from_stop: Float, + frequency: String, + historical_occupancy: String, + last_update_time: Integer, + occupancy_status: String, + predicted: bool, + predicted_arrival_interval: String, + predicted_departure_interval: String, + predicted_occupancy: String, + route_long_name: String, + route_short_name: String, + scheduled_arrival_interval: String, + scheduled_departure_interval: String, + scheduled_track: String, + situation_ids: ::Array[String], + status: String, + trip_status: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus + } + + class ArrivalsAndDeparture < OnebusawaySDK::Internal::Type::BaseModel + attr_accessor arrival_enabled: bool + + attr_accessor block_trip_sequence: Integer + + attr_accessor departure_enabled: bool + + attr_accessor number_of_stops_away: Integer + + attr_accessor predicted_arrival_time: Integer + + attr_accessor predicted_departure_time: Integer + + attr_accessor route_id: String + + attr_accessor scheduled_arrival_time: Integer + + attr_accessor scheduled_departure_time: Integer + + attr_accessor service_date: Integer + + attr_accessor stop_id: String + + attr_accessor stop_sequence: Integer + + attr_accessor total_stops_in_trip: Integer + + attr_accessor trip_headsign: String + + attr_accessor trip_id: String + + attr_accessor vehicle_id: String + + attr_reader actual_track: String? + + def actual_track=: (String) -> String + + attr_reader distance_from_stop: Float? + + def distance_from_stop=: (Float) -> Float + + attr_reader frequency: String? + + def frequency=: (String) -> String + + attr_reader historical_occupancy: String? + + def historical_occupancy=: (String) -> String + + attr_reader last_update_time: Integer? + + def last_update_time=: (Integer) -> Integer + + attr_reader occupancy_status: String? + + def occupancy_status=: (String) -> String + + attr_reader predicted: bool? + + def predicted=: (bool) -> bool + + attr_reader predicted_arrival_interval: String? + + def predicted_arrival_interval=: (String) -> String + + attr_reader predicted_departure_interval: String? + + def predicted_departure_interval=: (String) -> String + + attr_reader predicted_occupancy: String? + + def predicted_occupancy=: (String) -> String + + attr_reader route_long_name: String? + + def route_long_name=: (String) -> String + + attr_reader route_short_name: String? + + def route_short_name=: (String) -> String + + attr_reader scheduled_arrival_interval: String? + + def scheduled_arrival_interval=: (String) -> String + + attr_reader scheduled_departure_interval: String? + + def scheduled_departure_interval=: (String) -> String + + attr_reader scheduled_track: String? + + def scheduled_track=: (String) -> String + + attr_reader situation_ids: ::Array[String]? + + def situation_ids=: (::Array[String]) -> ::Array[String] + + attr_reader status: String? + + def status=: (String) -> String + + attr_reader trip_status: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus? + + def trip_status=: ( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus + ) -> OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus + + def initialize: ( + arrival_enabled: bool, + block_trip_sequence: Integer, + departure_enabled: bool, + number_of_stops_away: Integer, + predicted_arrival_time: Integer, + predicted_departure_time: Integer, + route_id: String, + scheduled_arrival_time: Integer, + scheduled_departure_time: Integer, + service_date: Integer, + stop_id: String, + stop_sequence: Integer, + total_stops_in_trip: Integer, + trip_headsign: String, + trip_id: String, + vehicle_id: String, + ?actual_track: String, + ?distance_from_stop: Float, + ?frequency: String, + ?historical_occupancy: String, + ?last_update_time: Integer, + ?occupancy_status: String, + ?predicted: bool, + ?predicted_arrival_interval: String, + ?predicted_departure_interval: String, + ?predicted_occupancy: String, + ?route_long_name: String, + ?route_short_name: String, + ?scheduled_arrival_interval: String, + ?scheduled_departure_interval: String, + ?scheduled_track: String, + ?situation_ids: ::Array[String], + ?status: String, + ?trip_status: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus + ) -> void + + def to_hash: -> { + arrival_enabled: bool, + block_trip_sequence: Integer, + departure_enabled: bool, + number_of_stops_away: Integer, + predicted_arrival_time: Integer, + predicted_departure_time: Integer, + route_id: String, + scheduled_arrival_time: Integer, + scheduled_departure_time: Integer, + service_date: Integer, + stop_id: String, + stop_sequence: Integer, + total_stops_in_trip: Integer, + trip_headsign: String, + trip_id: String, + vehicle_id: String, + actual_track: String, + distance_from_stop: Float, + frequency: String, + historical_occupancy: String, + last_update_time: Integer, + occupancy_status: String, + predicted: bool, + predicted_arrival_interval: String, + predicted_departure_interval: String, + predicted_occupancy: String, + route_long_name: String, + route_short_name: String, + scheduled_arrival_interval: String, + scheduled_departure_interval: String, + scheduled_track: String, + situation_ids: ::Array[String], + status: String, + trip_status: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus + } + + type trip_status = + { + active_trip_id: String, + block_trip_sequence: Integer, + closest_stop: String, + distance_along_trip: Float, + last_known_distance_along_trip: Float, + last_location_update_time: Integer, + last_update_time: Integer, + occupancy_capacity: Integer, + occupancy_count: Integer, + occupancy_status: String, + phase: String, + predicted: bool, + schedule_deviation: Integer, + service_date: Integer, + status: String, + total_distance_along_trip: Float, + closest_stop_time_offset: Integer, + frequency: String, + last_known_location: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation?, + last_known_orientation: Float, + next_stop: String, + next_stop_time_offset: Integer, + orientation: Float, + position: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position, + scheduled_distance_along_trip: Float, + situation_ids: ::Array[String], + vehicle_id: String + } + + class TripStatus < OnebusawaySDK::Internal::Type::BaseModel + attr_accessor active_trip_id: String + + attr_accessor block_trip_sequence: Integer + + attr_accessor closest_stop: String + + attr_accessor distance_along_trip: Float + + attr_accessor last_known_distance_along_trip: Float + + attr_accessor last_location_update_time: Integer + + attr_accessor last_update_time: Integer + + attr_accessor occupancy_capacity: Integer + + attr_accessor occupancy_count: Integer + + attr_accessor occupancy_status: String + + attr_accessor phase: String + + attr_accessor predicted: bool + + attr_accessor schedule_deviation: Integer + + attr_accessor service_date: Integer + + attr_accessor status: String + + attr_accessor total_distance_along_trip: Float + + attr_reader closest_stop_time_offset: Integer? + + def closest_stop_time_offset=: (Integer) -> Integer + + attr_reader frequency: String? + + def frequency=: (String) -> String + + attr_accessor last_known_location: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation? + + attr_reader last_known_orientation: Float? + + def last_known_orientation=: (Float) -> Float + + attr_reader next_stop: String? + + def next_stop=: (String) -> String + + attr_reader next_stop_time_offset: Integer? + + def next_stop_time_offset=: (Integer) -> Integer + + attr_reader orientation: Float? + + def orientation=: (Float) -> Float + + attr_reader position: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position? + + def position=: ( + OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position + ) -> OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position + + attr_reader scheduled_distance_along_trip: Float? + + def scheduled_distance_along_trip=: (Float) -> Float + + attr_reader situation_ids: ::Array[String]? + + def situation_ids=: (::Array[String]) -> ::Array[String] + + attr_reader vehicle_id: String? + + def vehicle_id=: (String) -> String + + def initialize: ( + active_trip_id: String, + block_trip_sequence: Integer, + closest_stop: String, + distance_along_trip: Float, + last_known_distance_along_trip: Float, + last_location_update_time: Integer, + last_update_time: Integer, + occupancy_capacity: Integer, + occupancy_count: Integer, + occupancy_status: String, + phase: String, + predicted: bool, + schedule_deviation: Integer, + service_date: Integer, + status: String, + total_distance_along_trip: Float, + ?closest_stop_time_offset: Integer, + ?frequency: String, + ?last_known_location: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation?, + ?last_known_orientation: Float, + ?next_stop: String, + ?next_stop_time_offset: Integer, + ?orientation: Float, + ?position: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position, + ?scheduled_distance_along_trip: Float, + ?situation_ids: ::Array[String], + ?vehicle_id: String + ) -> void + + def to_hash: -> { + active_trip_id: String, + block_trip_sequence: Integer, + closest_stop: String, + distance_along_trip: Float, + last_known_distance_along_trip: Float, + last_location_update_time: Integer, + last_update_time: Integer, + occupancy_capacity: Integer, + occupancy_count: Integer, + occupancy_status: String, + phase: String, + predicted: bool, + schedule_deviation: Integer, + service_date: Integer, + status: String, + total_distance_along_trip: Float, + closest_stop_time_offset: Integer, + frequency: String, + last_known_location: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::LastKnownLocation?, + last_known_orientation: Float, + next_stop: String, + next_stop_time_offset: Integer, + orientation: Float, + position: OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus::Position, + scheduled_distance_along_trip: Float, + situation_ids: ::Array[String], + vehicle_id: String + } + + type last_known_location = { lat: Float, lon: Float } + + class LastKnownLocation < OnebusawaySDK::Internal::Type::BaseModel + attr_reader lat: Float? + + def lat=: (Float) -> Float + + attr_reader lon: Float? + + def lon=: (Float) -> Float + + def initialize: (?lat: Float, ?lon: Float) -> void + + def to_hash: -> { lat: Float, lon: Float } + end + + type position = { lat: Float, lon: Float } + + class Position < OnebusawaySDK::Internal::Type::BaseModel + attr_reader lat: Float? + + def lat=: (Float) -> Float + + attr_reader lon: Float? + + def lon=: (Float) -> Float + + def initialize: (?lat: Float, ?lon: Float) -> void + + def to_hash: -> { lat: Float, lon: Float } + end + end + end + + type nearby_stop_id = { distance_from_query: Float, stop_id: String } + + class NearbyStopID < OnebusawaySDK::Internal::Type::BaseModel + attr_reader distance_from_query: Float? + + def distance_from_query=: (Float) -> Float + + attr_reader stop_id: String? + + def stop_id=: (String) -> String + + def initialize: ( + ?distance_from_query: Float, + ?stop_id: String + ) -> void + + def to_hash: -> { distance_from_query: Float, stop_id: String } + end + end + end + end + end +end diff --git a/sig/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbs b/sig/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbs new file mode 100644 index 00000000..df4bd369 --- /dev/null +++ b/sig/onebusaway_sdk/resources/arrivals_and_departures_for_location.rbs @@ -0,0 +1,22 @@ +module OnebusawaySDK + module Resources + class ArrivalsAndDeparturesForLocation + def list: ( + lat: Float, + lon: Float, + ?empty_returns_not_found: bool, + ?lat_span: Float, + ?lon_span: Float, + ?max_count: Integer, + ?minutes_after: Integer, + ?minutes_before: Integer, + ?radius: Float, + ?route_type: String, + ?time: Integer, + ?request_options: OnebusawaySDK::request_opts + ) -> OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse + + def initialize: (client: OnebusawaySDK::Client) -> void + end + end +end diff --git a/test/onebusaway_sdk/resources/arrivals_and_departures_for_location_test.rb b/test/onebusaway_sdk/resources/arrivals_and_departures_for_location_test.rb new file mode 100644 index 00000000..c419201b --- /dev/null +++ b/test/onebusaway_sdk/resources/arrivals_and_departures_for_location_test.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class OnebusawaySDK::Test::Resources::ArrivalsAndDeparturesForLocationTest < OnebusawaySDK::Test::ResourceTest + def test_list_required_params + response = @onebusaway_sdk.arrivals_and_departures_for_location.list(lat: 0, lon: 0) + + assert_pattern do + response => OnebusawaySDK::Models::ArrivalsAndDeparturesForLocationListResponse + end + end +end From 96f550692f0ab9d6ece95c699f5133941147a261 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 18:20:16 +0000 Subject: [PATCH 2/2] release: 1.6.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/onebusaway_sdk/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fe6bbb61..7deae338 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.5.6" + ".": "1.6.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bd8ad59a..a2555d9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.6.0 (2026-03-29) + +Full Changelog: [v1.5.6...v1.6.0](https://github.com/OneBusAway/ruby-sdk/compare/v1.5.6...v1.6.0) + +### Features + +* **api:** api update ([ba26372](https://github.com/OneBusAway/ruby-sdk/commit/ba26372ea95b6404cf5ae4fcaceb68e32cea5530)) + ## 1.5.6 (2026-03-28) Full Changelog: [v1.5.5...v1.5.6](https://github.com/OneBusAway/ruby-sdk/compare/v1.5.5...v1.5.6) diff --git a/Gemfile.lock b/Gemfile.lock index 28b869cd..fca4878c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - onebusaway-sdk (1.5.6) + onebusaway-sdk (1.6.0) cgi connection_pool diff --git a/README.md b/README.md index 6fdc1fcf..26baca3b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "onebusaway-sdk", "~> 1.5.6" +gem "onebusaway-sdk", "~> 1.6.0" ``` diff --git a/lib/onebusaway_sdk/version.rb b/lib/onebusaway_sdk/version.rb index 2bdc6f0d..5bb0f29b 100644 --- a/lib/onebusaway_sdk/version.rb +++ b/lib/onebusaway_sdk/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module OnebusawaySDK - VERSION = "1.5.6" + VERSION = "1.6.0" end