onebusaway-sdk 0.1.0.pre.alpha.205 → 0.1.0.pre.alpha.207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +32 -20
- data/lib/onebusaway-sdk/base_client.rb +63 -91
- data/lib/onebusaway-sdk/base_model.rb +489 -514
- data/lib/onebusaway-sdk/base_page.rb +35 -15
- data/lib/onebusaway-sdk/client.rb +1 -3
- data/lib/onebusaway-sdk/errors.rb +15 -19
- data/lib/onebusaway-sdk/extern.rb +1 -4
- data/lib/onebusaway-sdk/models/references.rb +0 -21
- data/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rb +0 -21
- data/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rb +0 -23
- data/lib/onebusaway-sdk/pooled_net_requester.rb +53 -54
- data/lib/onebusaway-sdk/request_options.rb +4 -11
- data/lib/onebusaway-sdk/resources/agencies_with_coverage.rb +0 -2
- data/lib/onebusaway-sdk/resources/agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/arrival_and_departure.rb +0 -3
- data/lib/onebusaway-sdk/resources/block.rb +0 -2
- data/lib/onebusaway-sdk/resources/config.rb +0 -2
- data/lib/onebusaway-sdk/resources/current_time.rb +0 -2
- data/lib/onebusaway-sdk/resources/report_problem_with_stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/report_problem_with_trip.rb +0 -2
- data/lib/onebusaway-sdk/resources/route.rb +0 -2
- data/lib/onebusaway-sdk/resources/route_ids_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/routes_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/routes_for_location.rb +0 -2
- data/lib/onebusaway-sdk/resources/schedule_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/schedule_for_stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/search_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/search_for_stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/shape.rb +0 -2
- data/lib/onebusaway-sdk/resources/stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/stop_ids_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/stops_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/stops_for_location.rb +0 -2
- data/lib/onebusaway-sdk/resources/stops_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/trip.rb +0 -2
- data/lib/onebusaway-sdk/resources/trip_details.rb +0 -2
- data/lib/onebusaway-sdk/resources/trip_for_vehicle.rb +0 -2
- data/lib/onebusaway-sdk/resources/trips_for_location.rb +0 -2
- data/lib/onebusaway-sdk/resources/trips_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/vehicles_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/util.rb +297 -96
- data/lib/onebusaway-sdk/version.rb +1 -1
- data/lib/onebusaway-sdk.rb +1 -0
- data/manifest.yaml +1 -0
- data/rbi/lib/onebusaway-sdk/base_client.rbi +52 -35
- data/rbi/lib/onebusaway-sdk/base_model.rbi +400 -256
- data/rbi/lib/onebusaway-sdk/base_page.rbi +3 -4
- data/rbi/lib/onebusaway-sdk/client.rbi +7 -2
- data/rbi/lib/onebusaway-sdk/errors.rbi +44 -10
- data/rbi/lib/onebusaway-sdk/extern.rbi +1 -1
- data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_response.rbi +9 -6
- data/rbi/lib/onebusaway-sdk/models/agency_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/agency_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_response.rbi +95 -14
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_params.rbi +2 -9
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_response.rbi +93 -12
- data/rbi/lib/onebusaway-sdk/models/block_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/block_retrieve_response.rbi +14 -20
- data/rbi/lib/onebusaway-sdk/models/config_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/config_retrieve_response.rbi +8 -14
- data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/references.rbi +60 -43
- data/rbi/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rbi +10 -6
- data/rbi/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rbi +15 -6
- data/rbi/lib/onebusaway-sdk/models/response_wrapper.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_response.rbi +4 -4
- data/rbi/lib/onebusaway-sdk/models/route_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/route_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_params.rbi +2 -2
- data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_params.rbi +5 -8
- data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_response.rbi +19 -16
- data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_params.rbi +5 -8
- data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_response.rbi +14 -14
- data/rbi/lib/onebusaway-sdk/models/search_for_route_list_params.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/search_for_route_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_params.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/shape_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/shape_retrieve_response.rbi +7 -6
- data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_response.rbi +4 -4
- data/rbi/lib/onebusaway-sdk/models/stop_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/stop_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_response.rbi +4 -4
- data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_params.rbi +6 -2
- data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_params.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_response.rbi +14 -14
- data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_params.rbi +10 -2
- data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_response.rbi +54 -23
- data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_params.rbi +9 -8
- data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_response.rbi +54 -23
- data/rbi/lib/onebusaway-sdk/models/trip_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/trip_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_params.rbi +12 -12
- data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_response.rbi +56 -16
- data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_params.rbi +6 -2
- data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_response.rbi +54 -16
- data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_params.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_response.rbi +52 -14
- data/rbi/lib/onebusaway-sdk/pooled_net_requester.rbi +28 -13
- data/rbi/lib/onebusaway-sdk/request_options.rbi +25 -2
- data/rbi/lib/onebusaway-sdk/resources/agencies_with_coverage.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/resources/agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/arrival_and_departure.rbi +14 -3
- data/rbi/lib/onebusaway-sdk/resources/block.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/config.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/resources/current_time.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/resources/report_problem_with_stop.rbi +9 -2
- data/rbi/lib/onebusaway-sdk/resources/report_problem_with_trip.rbi +14 -2
- data/rbi/lib/onebusaway-sdk/resources/route.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/route_ids_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/routes_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/routes_for_location.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/resources/schedule_for_route.rbi +11 -3
- data/rbi/lib/onebusaway-sdk/resources/schedule_for_stop.rbi +11 -3
- data/rbi/lib/onebusaway-sdk/resources/search_for_route.rbi +10 -3
- data/rbi/lib/onebusaway-sdk/resources/search_for_stop.rbi +10 -3
- data/rbi/lib/onebusaway-sdk/resources/shape.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stop.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stop_ids_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stops_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stops_for_location.rbi +16 -3
- data/rbi/lib/onebusaway-sdk/resources/stops_for_route.rbi +12 -3
- data/rbi/lib/onebusaway-sdk/resources/trip.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/trip_details.rbi +12 -2
- data/rbi/lib/onebusaway-sdk/resources/trip_for_vehicle.rbi +11 -2
- data/rbi/lib/onebusaway-sdk/resources/trips_for_location.rbi +12 -2
- data/rbi/lib/onebusaway-sdk/resources/trips_for_route.rbi +15 -3
- data/rbi/lib/onebusaway-sdk/resources/vehicles_for_agency.rbi +10 -3
- data/rbi/lib/onebusaway-sdk/util.rbi +214 -83
- data/rbi/lib/onebusaway-sdk/version.rbi +1 -1
- data/sig/onebusaway-sdk/base_client.rbs +9 -8
- data/sig/onebusaway-sdk/base_model.rbs +8 -6
- data/sig/onebusaway-sdk/base_page.rbs +1 -1
- data/sig/onebusaway-sdk/errors.rbs +6 -5
- data/sig/onebusaway-sdk/pooled_net_requester.rbs +11 -4
- data/sig/onebusaway-sdk/request_options.rbs +4 -0
- data/sig/onebusaway-sdk/util.rbs +46 -2
- data/sig/onebusaway-sdk/version.rbs +1 -1
- metadata +4 -4
@@ -14,8 +14,8 @@ module OnebusawaySDK
|
|
14
14
|
def data=(_)
|
15
15
|
end
|
16
16
|
|
17
|
-
sig { params(data: OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data}) }
|
@@ -47,9 +47,9 @@ module OnebusawaySDK
|
|
47
47
|
entry: OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data::Entry,
|
48
48
|
references: OnebusawaySDK::Models::References
|
49
49
|
)
|
50
|
-
.
|
50
|
+
.returns(T.attached_class)
|
51
51
|
end
|
52
|
-
def
|
52
|
+
def self.new(entry:, references:)
|
53
53
|
end
|
54
54
|
|
55
55
|
sig do
|
@@ -88,9 +88,9 @@ module OnebusawaySDK
|
|
88
88
|
params(
|
89
89
|
arrivals_and_departures: T::Array[OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data::Entry::ArrivalsAndDeparture]
|
90
90
|
)
|
91
|
-
.
|
91
|
+
.returns(T.attached_class)
|
92
92
|
end
|
93
|
-
def
|
93
|
+
def self.new(arrivals_and_departures:)
|
94
94
|
end
|
95
95
|
|
96
96
|
sig do
|
@@ -105,6 +105,7 @@ module OnebusawaySDK
|
|
105
105
|
end
|
106
106
|
|
107
107
|
class ArrivalsAndDeparture < OnebusawaySDK::BaseModel
|
108
|
+
# Indicates if riders can arrive on this transit vehicle.
|
108
109
|
sig { returns(T::Boolean) }
|
109
110
|
def arrival_enabled
|
110
111
|
end
|
@@ -113,6 +114,7 @@ module OnebusawaySDK
|
|
113
114
|
def arrival_enabled=(_)
|
114
115
|
end
|
115
116
|
|
117
|
+
# Index of this arrival’s trip into the sequence of trips for the active block.
|
116
118
|
sig { returns(Integer) }
|
117
119
|
def block_trip_sequence
|
118
120
|
end
|
@@ -121,6 +123,7 @@ module OnebusawaySDK
|
|
121
123
|
def block_trip_sequence=(_)
|
122
124
|
end
|
123
125
|
|
126
|
+
# Indicates if riders can depart from this transit vehicle.
|
124
127
|
sig { returns(T::Boolean) }
|
125
128
|
def departure_enabled
|
126
129
|
end
|
@@ -129,6 +132,8 @@ module OnebusawaySDK
|
|
129
132
|
def departure_enabled=(_)
|
130
133
|
end
|
131
134
|
|
135
|
+
# Number of stops between the arriving transit vehicle and the current stop
|
136
|
+
# (excluding the current stop).
|
132
137
|
sig { returns(Integer) }
|
133
138
|
def number_of_stops_away
|
134
139
|
end
|
@@ -137,6 +142,8 @@ module OnebusawaySDK
|
|
137
142
|
def number_of_stops_away=(_)
|
138
143
|
end
|
139
144
|
|
145
|
+
# Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time
|
146
|
+
# available).
|
140
147
|
sig { returns(Integer) }
|
141
148
|
def predicted_arrival_time
|
142
149
|
end
|
@@ -145,6 +152,8 @@ module OnebusawaySDK
|
|
145
152
|
def predicted_arrival_time=(_)
|
146
153
|
end
|
147
154
|
|
155
|
+
# Predicted departure time, in milliseconds since Unix epoch (zero if no real-time
|
156
|
+
# available).
|
148
157
|
sig { returns(Integer) }
|
149
158
|
def predicted_departure_time
|
150
159
|
end
|
@@ -153,6 +162,7 @@ module OnebusawaySDK
|
|
153
162
|
def predicted_departure_time=(_)
|
154
163
|
end
|
155
164
|
|
165
|
+
# The ID of the route for the arriving vehicle.
|
156
166
|
sig { returns(String) }
|
157
167
|
def route_id
|
158
168
|
end
|
@@ -161,6 +171,7 @@ module OnebusawaySDK
|
|
161
171
|
def route_id=(_)
|
162
172
|
end
|
163
173
|
|
174
|
+
# Scheduled arrival time, in milliseconds since Unix epoch.
|
164
175
|
sig { returns(Integer) }
|
165
176
|
def scheduled_arrival_time
|
166
177
|
end
|
@@ -169,6 +180,7 @@ module OnebusawaySDK
|
|
169
180
|
def scheduled_arrival_time=(_)
|
170
181
|
end
|
171
182
|
|
183
|
+
# Scheduled departure time, in milliseconds since Unix epoch.
|
172
184
|
sig { returns(Integer) }
|
173
185
|
def scheduled_departure_time
|
174
186
|
end
|
@@ -177,6 +189,8 @@ module OnebusawaySDK
|
|
177
189
|
def scheduled_departure_time=(_)
|
178
190
|
end
|
179
191
|
|
192
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
193
|
+
# service date for the trip.
|
180
194
|
sig { returns(Integer) }
|
181
195
|
def service_date
|
182
196
|
end
|
@@ -185,6 +199,7 @@ module OnebusawaySDK
|
|
185
199
|
def service_date=(_)
|
186
200
|
end
|
187
201
|
|
202
|
+
# The ID of the stop the vehicle is arriving at.
|
188
203
|
sig { returns(String) }
|
189
204
|
def stop_id
|
190
205
|
end
|
@@ -193,6 +208,8 @@ module OnebusawaySDK
|
|
193
208
|
def stop_id=(_)
|
194
209
|
end
|
195
210
|
|
211
|
+
# Index of the stop into the sequence of stops that make up the trip for this
|
212
|
+
# arrival.
|
196
213
|
sig { returns(Integer) }
|
197
214
|
def stop_sequence
|
198
215
|
end
|
@@ -201,6 +218,7 @@ module OnebusawaySDK
|
|
201
218
|
def stop_sequence=(_)
|
202
219
|
end
|
203
220
|
|
221
|
+
# Total number of stops visited on the trip for this arrival.
|
204
222
|
sig { returns(Integer) }
|
205
223
|
def total_stops_in_trip
|
206
224
|
end
|
@@ -209,6 +227,8 @@ module OnebusawaySDK
|
|
209
227
|
def total_stops_in_trip=(_)
|
210
228
|
end
|
211
229
|
|
230
|
+
# Optional trip headsign that potentially overrides the trip headsign in the
|
231
|
+
# referenced trip element.
|
212
232
|
sig { returns(String) }
|
213
233
|
def trip_headsign
|
214
234
|
end
|
@@ -217,6 +237,7 @@ module OnebusawaySDK
|
|
217
237
|
def trip_headsign=(_)
|
218
238
|
end
|
219
239
|
|
240
|
+
# The ID of the trip for the arriving vehicle.
|
220
241
|
sig { returns(String) }
|
221
242
|
def trip_id
|
222
243
|
end
|
@@ -225,6 +246,7 @@ module OnebusawaySDK
|
|
225
246
|
def trip_id=(_)
|
226
247
|
end
|
227
248
|
|
249
|
+
# ID of the transit vehicle serving this trip.
|
228
250
|
sig { returns(String) }
|
229
251
|
def vehicle_id
|
230
252
|
end
|
@@ -233,6 +255,7 @@ module OnebusawaySDK
|
|
233
255
|
def vehicle_id=(_)
|
234
256
|
end
|
235
257
|
|
258
|
+
# The actual track information of the arriving transit vehicle.
|
236
259
|
sig { returns(T.nilable(String)) }
|
237
260
|
def actual_track
|
238
261
|
end
|
@@ -241,6 +264,7 @@ module OnebusawaySDK
|
|
241
264
|
def actual_track=(_)
|
242
265
|
end
|
243
266
|
|
267
|
+
# Distance of the arriving transit vehicle from the stop, in meters.
|
244
268
|
sig { returns(T.nilable(Float)) }
|
245
269
|
def distance_from_stop
|
246
270
|
end
|
@@ -249,6 +273,7 @@ module OnebusawaySDK
|
|
249
273
|
def distance_from_stop=(_)
|
250
274
|
end
|
251
275
|
|
276
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
252
277
|
sig { returns(T.nilable(String)) }
|
253
278
|
def frequency
|
254
279
|
end
|
@@ -257,6 +282,7 @@ module OnebusawaySDK
|
|
257
282
|
def frequency=(_)
|
258
283
|
end
|
259
284
|
|
285
|
+
# Historical occupancy information of the transit vehicle.
|
260
286
|
sig { returns(T.nilable(String)) }
|
261
287
|
def historical_occupancy
|
262
288
|
end
|
@@ -265,6 +291,7 @@ module OnebusawaySDK
|
|
265
291
|
def historical_occupancy=(_)
|
266
292
|
end
|
267
293
|
|
294
|
+
# Timestamp of the last update time for this arrival.
|
268
295
|
sig { returns(T.nilable(Integer)) }
|
269
296
|
def last_update_time
|
270
297
|
end
|
@@ -273,6 +300,7 @@ module OnebusawaySDK
|
|
273
300
|
def last_update_time=(_)
|
274
301
|
end
|
275
302
|
|
303
|
+
# Current occupancy status of the transit vehicle.
|
276
304
|
sig { returns(T.nilable(String)) }
|
277
305
|
def occupancy_status
|
278
306
|
end
|
@@ -281,6 +309,7 @@ module OnebusawaySDK
|
|
281
309
|
def occupancy_status=(_)
|
282
310
|
end
|
283
311
|
|
312
|
+
# Indicates if real-time arrival info is available for this trip.
|
284
313
|
sig { returns(T.nilable(T::Boolean)) }
|
285
314
|
def predicted
|
286
315
|
end
|
@@ -289,6 +318,7 @@ module OnebusawaySDK
|
|
289
318
|
def predicted=(_)
|
290
319
|
end
|
291
320
|
|
321
|
+
# Interval for predicted arrival time, if available.
|
292
322
|
sig { returns(T.nilable(String)) }
|
293
323
|
def predicted_arrival_interval
|
294
324
|
end
|
@@ -297,6 +327,7 @@ module OnebusawaySDK
|
|
297
327
|
def predicted_arrival_interval=(_)
|
298
328
|
end
|
299
329
|
|
330
|
+
# Interval for predicted departure time, if available.
|
300
331
|
sig { returns(T.nilable(String)) }
|
301
332
|
def predicted_departure_interval
|
302
333
|
end
|
@@ -305,6 +336,7 @@ module OnebusawaySDK
|
|
305
336
|
def predicted_departure_interval=(_)
|
306
337
|
end
|
307
338
|
|
339
|
+
# Predicted occupancy status of the transit vehicle.
|
308
340
|
sig { returns(T.nilable(String)) }
|
309
341
|
def predicted_occupancy
|
310
342
|
end
|
@@ -313,6 +345,8 @@ module OnebusawaySDK
|
|
313
345
|
def predicted_occupancy=(_)
|
314
346
|
end
|
315
347
|
|
348
|
+
# Optional route long name that potentially overrides the route long name in the
|
349
|
+
# referenced route element.
|
316
350
|
sig { returns(T.nilable(String)) }
|
317
351
|
def route_long_name
|
318
352
|
end
|
@@ -321,6 +355,8 @@ module OnebusawaySDK
|
|
321
355
|
def route_long_name=(_)
|
322
356
|
end
|
323
357
|
|
358
|
+
# Optional route short name that potentially overrides the route short name in the
|
359
|
+
# referenced route element.
|
324
360
|
sig { returns(T.nilable(String)) }
|
325
361
|
def route_short_name
|
326
362
|
end
|
@@ -329,6 +365,7 @@ module OnebusawaySDK
|
|
329
365
|
def route_short_name=(_)
|
330
366
|
end
|
331
367
|
|
368
|
+
# Interval for scheduled arrival time.
|
332
369
|
sig { returns(T.nilable(String)) }
|
333
370
|
def scheduled_arrival_interval
|
334
371
|
end
|
@@ -337,6 +374,7 @@ module OnebusawaySDK
|
|
337
374
|
def scheduled_arrival_interval=(_)
|
338
375
|
end
|
339
376
|
|
377
|
+
# Interval for scheduled departure time.
|
340
378
|
sig { returns(T.nilable(String)) }
|
341
379
|
def scheduled_departure_interval
|
342
380
|
end
|
@@ -345,6 +383,7 @@ module OnebusawaySDK
|
|
345
383
|
def scheduled_departure_interval=(_)
|
346
384
|
end
|
347
385
|
|
386
|
+
# Scheduled track information of the arriving transit vehicle.
|
348
387
|
sig { returns(T.nilable(String)) }
|
349
388
|
def scheduled_track
|
350
389
|
end
|
@@ -353,6 +392,7 @@ module OnebusawaySDK
|
|
353
392
|
def scheduled_track=(_)
|
354
393
|
end
|
355
394
|
|
395
|
+
# References to situation elements (if any) applicable to this arrival.
|
356
396
|
sig { returns(T.nilable(T::Array[String])) }
|
357
397
|
def situation_ids
|
358
398
|
end
|
@@ -361,6 +401,7 @@ module OnebusawaySDK
|
|
361
401
|
def situation_ids=(_)
|
362
402
|
end
|
363
403
|
|
404
|
+
# Current status of the arrival.
|
364
405
|
sig { returns(T.nilable(String)) }
|
365
406
|
def status
|
366
407
|
end
|
@@ -369,6 +410,7 @@ module OnebusawaySDK
|
|
369
410
|
def status=(_)
|
370
411
|
end
|
371
412
|
|
413
|
+
# Trip-specific status for the arriving transit vehicle.
|
372
414
|
sig do
|
373
415
|
returns(
|
374
416
|
T.nilable(
|
@@ -427,9 +469,9 @@ module OnebusawaySDK
|
|
427
469
|
status: String,
|
428
470
|
trip_status: OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data::Entry::ArrivalsAndDeparture::TripStatus
|
429
471
|
)
|
430
|
-
.
|
472
|
+
.returns(T.attached_class)
|
431
473
|
end
|
432
|
-
def
|
474
|
+
def self.new(
|
433
475
|
arrival_enabled:,
|
434
476
|
block_trip_sequence:,
|
435
477
|
departure_enabled:,
|
@@ -512,6 +554,7 @@ module OnebusawaySDK
|
|
512
554
|
end
|
513
555
|
|
514
556
|
class TripStatus < OnebusawaySDK::BaseModel
|
557
|
+
# Trip ID of the trip the vehicle is actively serving.
|
515
558
|
sig { returns(String) }
|
516
559
|
def active_trip_id
|
517
560
|
end
|
@@ -520,6 +563,7 @@ module OnebusawaySDK
|
|
520
563
|
def active_trip_id=(_)
|
521
564
|
end
|
522
565
|
|
566
|
+
# Index of the active trip into the sequence of trips for the active block.
|
523
567
|
sig { returns(Integer) }
|
524
568
|
def block_trip_sequence
|
525
569
|
end
|
@@ -528,6 +572,7 @@ module OnebusawaySDK
|
|
528
572
|
def block_trip_sequence=(_)
|
529
573
|
end
|
530
574
|
|
575
|
+
# ID of the closest stop to the current location of the transit vehicle.
|
531
576
|
sig { returns(String) }
|
532
577
|
def closest_stop
|
533
578
|
end
|
@@ -536,6 +581,7 @@ module OnebusawaySDK
|
|
536
581
|
def closest_stop=(_)
|
537
582
|
end
|
538
583
|
|
584
|
+
# Distance, in meters, the transit vehicle has progressed along the active trip.
|
539
585
|
sig { returns(Float) }
|
540
586
|
def distance_along_trip
|
541
587
|
end
|
@@ -544,6 +590,8 @@ module OnebusawaySDK
|
|
544
590
|
def distance_along_trip=(_)
|
545
591
|
end
|
546
592
|
|
593
|
+
# Last known distance along the trip received in real-time from the transit
|
594
|
+
# vehicle.
|
547
595
|
sig { returns(Float) }
|
548
596
|
def last_known_distance_along_trip
|
549
597
|
end
|
@@ -552,6 +600,7 @@ module OnebusawaySDK
|
|
552
600
|
def last_known_distance_along_trip=(_)
|
553
601
|
end
|
554
602
|
|
603
|
+
# Timestamp of the last known real-time location update from the transit vehicle.
|
555
604
|
sig { returns(Integer) }
|
556
605
|
def last_location_update_time
|
557
606
|
end
|
@@ -560,6 +609,7 @@ module OnebusawaySDK
|
|
560
609
|
def last_location_update_time=(_)
|
561
610
|
end
|
562
611
|
|
612
|
+
# Timestamp of the last known real-time update from the transit vehicle.
|
563
613
|
sig { returns(Integer) }
|
564
614
|
def last_update_time
|
565
615
|
end
|
@@ -568,6 +618,7 @@ module OnebusawaySDK
|
|
568
618
|
def last_update_time=(_)
|
569
619
|
end
|
570
620
|
|
621
|
+
# Capacity of the transit vehicle in terms of occupancy.
|
571
622
|
sig { returns(Integer) }
|
572
623
|
def occupancy_capacity
|
573
624
|
end
|
@@ -576,6 +627,7 @@ module OnebusawaySDK
|
|
576
627
|
def occupancy_capacity=(_)
|
577
628
|
end
|
578
629
|
|
630
|
+
# Current count of occupants in the transit vehicle.
|
579
631
|
sig { returns(Integer) }
|
580
632
|
def occupancy_count
|
581
633
|
end
|
@@ -584,6 +636,7 @@ module OnebusawaySDK
|
|
584
636
|
def occupancy_count=(_)
|
585
637
|
end
|
586
638
|
|
639
|
+
# Current occupancy status of the transit vehicle.
|
587
640
|
sig { returns(String) }
|
588
641
|
def occupancy_status
|
589
642
|
end
|
@@ -592,6 +645,7 @@ module OnebusawaySDK
|
|
592
645
|
def occupancy_status=(_)
|
593
646
|
end
|
594
647
|
|
648
|
+
# Current journey phase of the trip.
|
595
649
|
sig { returns(String) }
|
596
650
|
def phase
|
597
651
|
end
|
@@ -600,6 +654,7 @@ module OnebusawaySDK
|
|
600
654
|
def phase=(_)
|
601
655
|
end
|
602
656
|
|
657
|
+
# Indicates if real-time arrival info is available for this trip.
|
603
658
|
sig { returns(T::Boolean) }
|
604
659
|
def predicted
|
605
660
|
end
|
@@ -608,6 +663,7 @@ module OnebusawaySDK
|
|
608
663
|
def predicted=(_)
|
609
664
|
end
|
610
665
|
|
666
|
+
# Deviation from the schedule in seconds (positive for late, negative for early).
|
611
667
|
sig { returns(Integer) }
|
612
668
|
def schedule_deviation
|
613
669
|
end
|
@@ -616,6 +672,8 @@ module OnebusawaySDK
|
|
616
672
|
def schedule_deviation=(_)
|
617
673
|
end
|
618
674
|
|
675
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
676
|
+
# service date for the trip.
|
619
677
|
sig { returns(Integer) }
|
620
678
|
def service_date
|
621
679
|
end
|
@@ -624,6 +682,7 @@ module OnebusawaySDK
|
|
624
682
|
def service_date=(_)
|
625
683
|
end
|
626
684
|
|
685
|
+
# Current status modifiers for the trip.
|
627
686
|
sig { returns(String) }
|
628
687
|
def status
|
629
688
|
end
|
@@ -632,6 +691,7 @@ module OnebusawaySDK
|
|
632
691
|
def status=(_)
|
633
692
|
end
|
634
693
|
|
694
|
+
# Total length of the trip, in meters.
|
635
695
|
sig { returns(Float) }
|
636
696
|
def total_distance_along_trip
|
637
697
|
end
|
@@ -640,6 +700,8 @@ module OnebusawaySDK
|
|
640
700
|
def total_distance_along_trip=(_)
|
641
701
|
end
|
642
702
|
|
703
|
+
# Time offset from the closest stop to the current position of the transit vehicle
|
704
|
+
# (in seconds).
|
643
705
|
sig { returns(T.nilable(Integer)) }
|
644
706
|
def closest_stop_time_offset
|
645
707
|
end
|
@@ -648,6 +710,7 @@ module OnebusawaySDK
|
|
648
710
|
def closest_stop_time_offset=(_)
|
649
711
|
end
|
650
712
|
|
713
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
651
714
|
sig { returns(T.nilable(String)) }
|
652
715
|
def frequency
|
653
716
|
end
|
@@ -656,6 +719,7 @@ module OnebusawaySDK
|
|
656
719
|
def frequency=(_)
|
657
720
|
end
|
658
721
|
|
722
|
+
# Last known location of the transit vehicle.
|
659
723
|
sig do
|
660
724
|
returns(
|
661
725
|
T.nilable(
|
@@ -677,6 +741,7 @@ module OnebusawaySDK
|
|
677
741
|
def last_known_location=(_)
|
678
742
|
end
|
679
743
|
|
744
|
+
# Last known orientation value received in real-time from the transit vehicle.
|
680
745
|
sig { returns(T.nilable(Float)) }
|
681
746
|
def last_known_orientation
|
682
747
|
end
|
@@ -685,6 +750,7 @@ module OnebusawaySDK
|
|
685
750
|
def last_known_orientation=(_)
|
686
751
|
end
|
687
752
|
|
753
|
+
# ID of the next stop the transit vehicle is scheduled to arrive at.
|
688
754
|
sig { returns(T.nilable(String)) }
|
689
755
|
def next_stop
|
690
756
|
end
|
@@ -693,6 +759,8 @@ module OnebusawaySDK
|
|
693
759
|
def next_stop=(_)
|
694
760
|
end
|
695
761
|
|
762
|
+
# Time offset from the next stop to the current position of the transit vehicle
|
763
|
+
# (in seconds).
|
696
764
|
sig { returns(T.nilable(Integer)) }
|
697
765
|
def next_stop_time_offset
|
698
766
|
end
|
@@ -701,6 +769,7 @@ module OnebusawaySDK
|
|
701
769
|
def next_stop_time_offset=(_)
|
702
770
|
end
|
703
771
|
|
772
|
+
# Orientation of the transit vehicle, represented as an angle in degrees.
|
704
773
|
sig { returns(T.nilable(Float)) }
|
705
774
|
def orientation
|
706
775
|
end
|
@@ -709,6 +778,7 @@ module OnebusawaySDK
|
|
709
778
|
def orientation=(_)
|
710
779
|
end
|
711
780
|
|
781
|
+
# Current position of the transit vehicle.
|
712
782
|
sig do
|
713
783
|
returns(
|
714
784
|
T.nilable(
|
@@ -730,6 +800,8 @@ module OnebusawaySDK
|
|
730
800
|
def position=(_)
|
731
801
|
end
|
732
802
|
|
803
|
+
# Distance, in meters, the transit vehicle is scheduled to have progressed along
|
804
|
+
# the active trip.
|
733
805
|
sig { returns(T.nilable(Float)) }
|
734
806
|
def scheduled_distance_along_trip
|
735
807
|
end
|
@@ -738,6 +810,7 @@ module OnebusawaySDK
|
|
738
810
|
def scheduled_distance_along_trip=(_)
|
739
811
|
end
|
740
812
|
|
813
|
+
# References to situation elements (if any) applicable to this trip.
|
741
814
|
sig { returns(T.nilable(T::Array[String])) }
|
742
815
|
def situation_ids
|
743
816
|
end
|
@@ -746,6 +819,7 @@ module OnebusawaySDK
|
|
746
819
|
def situation_ids=(_)
|
747
820
|
end
|
748
821
|
|
822
|
+
# ID of the transit vehicle currently serving the trip.
|
749
823
|
sig { returns(T.nilable(String)) }
|
750
824
|
def vehicle_id
|
751
825
|
end
|
@@ -754,6 +828,7 @@ module OnebusawaySDK
|
|
754
828
|
def vehicle_id=(_)
|
755
829
|
end
|
756
830
|
|
831
|
+
# Trip-specific status for the arriving transit vehicle.
|
757
832
|
sig do
|
758
833
|
params(
|
759
834
|
active_trip_id: String,
|
@@ -784,9 +859,9 @@ module OnebusawaySDK
|
|
784
859
|
situation_ids: T::Array[String],
|
785
860
|
vehicle_id: String
|
786
861
|
)
|
787
|
-
.
|
862
|
+
.returns(T.attached_class)
|
788
863
|
end
|
789
|
-
def
|
864
|
+
def self.new(
|
790
865
|
active_trip_id:,
|
791
866
|
block_trip_sequence:,
|
792
867
|
closest_stop:,
|
@@ -855,6 +930,7 @@ module OnebusawaySDK
|
|
855
930
|
end
|
856
931
|
|
857
932
|
class LastKnownLocation < OnebusawaySDK::BaseModel
|
933
|
+
# Latitude of the last known location of the transit vehicle.
|
858
934
|
sig { returns(T.nilable(Float)) }
|
859
935
|
def lat
|
860
936
|
end
|
@@ -863,6 +939,7 @@ module OnebusawaySDK
|
|
863
939
|
def lat=(_)
|
864
940
|
end
|
865
941
|
|
942
|
+
# Longitude of the last known location of the transit vehicle.
|
866
943
|
sig { returns(T.nilable(Float)) }
|
867
944
|
def lon
|
868
945
|
end
|
@@ -871,8 +948,9 @@ module OnebusawaySDK
|
|
871
948
|
def lon=(_)
|
872
949
|
end
|
873
950
|
|
874
|
-
|
875
|
-
|
951
|
+
# Last known location of the transit vehicle.
|
952
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
953
|
+
def self.new(lat: nil, lon: nil)
|
876
954
|
end
|
877
955
|
|
878
956
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -881,6 +959,7 @@ module OnebusawaySDK
|
|
881
959
|
end
|
882
960
|
|
883
961
|
class Position < OnebusawaySDK::BaseModel
|
962
|
+
# Latitude of the current position of the transit vehicle.
|
884
963
|
sig { returns(T.nilable(Float)) }
|
885
964
|
def lat
|
886
965
|
end
|
@@ -889,6 +968,7 @@ module OnebusawaySDK
|
|
889
968
|
def lat=(_)
|
890
969
|
end
|
891
970
|
|
971
|
+
# Longitude of the current position of the transit vehicle.
|
892
972
|
sig { returns(T.nilable(Float)) }
|
893
973
|
def lon
|
894
974
|
end
|
@@ -897,8 +977,9 @@ module OnebusawaySDK
|
|
897
977
|
def lon=(_)
|
898
978
|
end
|
899
979
|
|
900
|
-
|
901
|
-
|
980
|
+
# Current position of the transit vehicle.
|
981
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
982
|
+
def self.new(lat: nil, lon: nil)
|
902
983
|
end
|
903
984
|
|
904
985
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -55,16 +55,9 @@ module OnebusawaySDK
|
|
55
55
|
vehicle_id: String,
|
56
56
|
request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
|
57
57
|
)
|
58
|
-
.
|
58
|
+
.returns(T.attached_class)
|
59
59
|
end
|
60
|
-
def
|
61
|
-
service_date:,
|
62
|
-
trip_id:,
|
63
|
-
stop_sequence: nil,
|
64
|
-
time: nil,
|
65
|
-
vehicle_id: nil,
|
66
|
-
request_options: {}
|
67
|
-
)
|
60
|
+
def self.new(service_date:, trip_id:, stop_sequence: nil, time: nil, vehicle_id: nil, request_options: {})
|
68
61
|
end
|
69
62
|
|
70
63
|
sig do
|