onebusaway-sdk 0.1.0.pre.alpha.206 → 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 +41 -49
- 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 +12 -17
- 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 +40 -46
- 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 +201 -118
- 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 +46 -21
- 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 +41 -8
- 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 +207 -105
- data/rbi/lib/onebusaway-sdk/version.rbi +1 -1
- data/sig/onebusaway-sdk/base_client.rbs +6 -1
- data/sig/onebusaway-sdk/base_model.rbs +8 -6
- data/sig/onebusaway-sdk/base_page.rbs +1 -1
- data/sig/onebusaway-sdk/errors.rbs +4 -4
- 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 +33 -8
- 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::TripsForRouteListResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::TripsForRouteListResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::TripsForRouteListResponse::Data}) }
|
@@ -56,9 +56,9 @@ module OnebusawaySDK
|
|
56
56
|
list: T::Array[OnebusawaySDK::Models::TripsForRouteListResponse::Data::List],
|
57
57
|
references: OnebusawaySDK::Models::References
|
58
58
|
)
|
59
|
-
.
|
59
|
+
.returns(T.attached_class)
|
60
60
|
end
|
61
|
-
def
|
61
|
+
def self.new(limit_exceeded:, list:, references:)
|
62
62
|
end
|
63
63
|
|
64
64
|
sig do
|
@@ -138,9 +138,9 @@ module OnebusawaySDK
|
|
138
138
|
service_date: Integer,
|
139
139
|
situation_ids: T::Array[String]
|
140
140
|
)
|
141
|
-
.
|
141
|
+
.returns(T.attached_class)
|
142
142
|
end
|
143
|
-
def
|
143
|
+
def self.new(schedule:, status:, trip_id:, frequency: nil, service_date: nil, situation_ids: nil)
|
144
144
|
end
|
145
145
|
|
146
146
|
sig do
|
@@ -211,9 +211,9 @@ module OnebusawaySDK
|
|
211
211
|
time_zone: String,
|
212
212
|
frequency: T.nilable(String)
|
213
213
|
)
|
214
|
-
.
|
214
|
+
.returns(T.attached_class)
|
215
215
|
end
|
216
|
-
def
|
216
|
+
def self.new(next_trip_id:, previous_trip_id:, stop_times:, time_zone:, frequency: nil)
|
217
217
|
end
|
218
218
|
|
219
219
|
sig do
|
@@ -289,9 +289,9 @@ module OnebusawaySDK
|
|
289
289
|
stop_headsign: String,
|
290
290
|
stop_id: String
|
291
291
|
)
|
292
|
-
.
|
292
|
+
.returns(T.attached_class)
|
293
293
|
end
|
294
|
-
def
|
294
|
+
def self.new(
|
295
295
|
arrival_time: nil,
|
296
296
|
departure_time: nil,
|
297
297
|
distance_along_trip: nil,
|
@@ -320,6 +320,7 @@ module OnebusawaySDK
|
|
320
320
|
end
|
321
321
|
|
322
322
|
class Status < OnebusawaySDK::BaseModel
|
323
|
+
# Trip ID of the trip the vehicle is actively serving.
|
323
324
|
sig { returns(String) }
|
324
325
|
def active_trip_id
|
325
326
|
end
|
@@ -328,6 +329,7 @@ module OnebusawaySDK
|
|
328
329
|
def active_trip_id=(_)
|
329
330
|
end
|
330
331
|
|
332
|
+
# Index of the active trip into the sequence of trips for the active block.
|
331
333
|
sig { returns(Integer) }
|
332
334
|
def block_trip_sequence
|
333
335
|
end
|
@@ -336,6 +338,7 @@ module OnebusawaySDK
|
|
336
338
|
def block_trip_sequence=(_)
|
337
339
|
end
|
338
340
|
|
341
|
+
# ID of the closest stop to the current location of the transit vehicle.
|
339
342
|
sig { returns(String) }
|
340
343
|
def closest_stop
|
341
344
|
end
|
@@ -344,6 +347,7 @@ module OnebusawaySDK
|
|
344
347
|
def closest_stop=(_)
|
345
348
|
end
|
346
349
|
|
350
|
+
# Distance, in meters, the transit vehicle has progressed along the active trip.
|
347
351
|
sig { returns(Float) }
|
348
352
|
def distance_along_trip
|
349
353
|
end
|
@@ -352,6 +356,8 @@ module OnebusawaySDK
|
|
352
356
|
def distance_along_trip=(_)
|
353
357
|
end
|
354
358
|
|
359
|
+
# Last known distance along the trip received in real-time from the transit
|
360
|
+
# vehicle.
|
355
361
|
sig { returns(Float) }
|
356
362
|
def last_known_distance_along_trip
|
357
363
|
end
|
@@ -360,6 +366,7 @@ module OnebusawaySDK
|
|
360
366
|
def last_known_distance_along_trip=(_)
|
361
367
|
end
|
362
368
|
|
369
|
+
# Timestamp of the last known real-time location update from the transit vehicle.
|
363
370
|
sig { returns(Integer) }
|
364
371
|
def last_location_update_time
|
365
372
|
end
|
@@ -368,6 +375,7 @@ module OnebusawaySDK
|
|
368
375
|
def last_location_update_time=(_)
|
369
376
|
end
|
370
377
|
|
378
|
+
# Timestamp of the last known real-time update from the transit vehicle.
|
371
379
|
sig { returns(Integer) }
|
372
380
|
def last_update_time
|
373
381
|
end
|
@@ -376,6 +384,7 @@ module OnebusawaySDK
|
|
376
384
|
def last_update_time=(_)
|
377
385
|
end
|
378
386
|
|
387
|
+
# Capacity of the transit vehicle in terms of occupancy.
|
379
388
|
sig { returns(Integer) }
|
380
389
|
def occupancy_capacity
|
381
390
|
end
|
@@ -384,6 +393,7 @@ module OnebusawaySDK
|
|
384
393
|
def occupancy_capacity=(_)
|
385
394
|
end
|
386
395
|
|
396
|
+
# Current count of occupants in the transit vehicle.
|
387
397
|
sig { returns(Integer) }
|
388
398
|
def occupancy_count
|
389
399
|
end
|
@@ -392,6 +402,7 @@ module OnebusawaySDK
|
|
392
402
|
def occupancy_count=(_)
|
393
403
|
end
|
394
404
|
|
405
|
+
# Current occupancy status of the transit vehicle.
|
395
406
|
sig { returns(String) }
|
396
407
|
def occupancy_status
|
397
408
|
end
|
@@ -400,6 +411,7 @@ module OnebusawaySDK
|
|
400
411
|
def occupancy_status=(_)
|
401
412
|
end
|
402
413
|
|
414
|
+
# Current journey phase of the trip.
|
403
415
|
sig { returns(String) }
|
404
416
|
def phase
|
405
417
|
end
|
@@ -408,6 +420,7 @@ module OnebusawaySDK
|
|
408
420
|
def phase=(_)
|
409
421
|
end
|
410
422
|
|
423
|
+
# Indicates if real-time arrival info is available for this trip.
|
411
424
|
sig { returns(T::Boolean) }
|
412
425
|
def predicted
|
413
426
|
end
|
@@ -416,6 +429,7 @@ module OnebusawaySDK
|
|
416
429
|
def predicted=(_)
|
417
430
|
end
|
418
431
|
|
432
|
+
# Deviation from the schedule in seconds (positive for late, negative for early).
|
419
433
|
sig { returns(Integer) }
|
420
434
|
def schedule_deviation
|
421
435
|
end
|
@@ -424,6 +438,8 @@ module OnebusawaySDK
|
|
424
438
|
def schedule_deviation=(_)
|
425
439
|
end
|
426
440
|
|
441
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
442
|
+
# service date for the trip.
|
427
443
|
sig { returns(Integer) }
|
428
444
|
def service_date
|
429
445
|
end
|
@@ -432,6 +448,7 @@ module OnebusawaySDK
|
|
432
448
|
def service_date=(_)
|
433
449
|
end
|
434
450
|
|
451
|
+
# Current status modifiers for the trip.
|
435
452
|
sig { returns(String) }
|
436
453
|
def status
|
437
454
|
end
|
@@ -440,6 +457,7 @@ module OnebusawaySDK
|
|
440
457
|
def status=(_)
|
441
458
|
end
|
442
459
|
|
460
|
+
# Total length of the trip, in meters.
|
443
461
|
sig { returns(Float) }
|
444
462
|
def total_distance_along_trip
|
445
463
|
end
|
@@ -448,6 +466,8 @@ module OnebusawaySDK
|
|
448
466
|
def total_distance_along_trip=(_)
|
449
467
|
end
|
450
468
|
|
469
|
+
# Time offset from the closest stop to the current position of the transit vehicle
|
470
|
+
# (in seconds).
|
451
471
|
sig { returns(T.nilable(Integer)) }
|
452
472
|
def closest_stop_time_offset
|
453
473
|
end
|
@@ -456,6 +476,7 @@ module OnebusawaySDK
|
|
456
476
|
def closest_stop_time_offset=(_)
|
457
477
|
end
|
458
478
|
|
479
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
459
480
|
sig { returns(T.nilable(String)) }
|
460
481
|
def frequency
|
461
482
|
end
|
@@ -464,6 +485,7 @@ module OnebusawaySDK
|
|
464
485
|
def frequency=(_)
|
465
486
|
end
|
466
487
|
|
488
|
+
# Last known location of the transit vehicle.
|
467
489
|
sig do
|
468
490
|
returns(
|
469
491
|
T.nilable(OnebusawaySDK::Models::TripsForRouteListResponse::Data::List::Status::LastKnownLocation)
|
@@ -479,6 +501,7 @@ module OnebusawaySDK
|
|
479
501
|
def last_known_location=(_)
|
480
502
|
end
|
481
503
|
|
504
|
+
# Last known orientation value received in real-time from the transit vehicle.
|
482
505
|
sig { returns(T.nilable(Float)) }
|
483
506
|
def last_known_orientation
|
484
507
|
end
|
@@ -487,6 +510,7 @@ module OnebusawaySDK
|
|
487
510
|
def last_known_orientation=(_)
|
488
511
|
end
|
489
512
|
|
513
|
+
# ID of the next stop the transit vehicle is scheduled to arrive at.
|
490
514
|
sig { returns(T.nilable(String)) }
|
491
515
|
def next_stop
|
492
516
|
end
|
@@ -495,6 +519,8 @@ module OnebusawaySDK
|
|
495
519
|
def next_stop=(_)
|
496
520
|
end
|
497
521
|
|
522
|
+
# Time offset from the next stop to the current position of the transit vehicle
|
523
|
+
# (in seconds).
|
498
524
|
sig { returns(T.nilable(Integer)) }
|
499
525
|
def next_stop_time_offset
|
500
526
|
end
|
@@ -503,6 +529,7 @@ module OnebusawaySDK
|
|
503
529
|
def next_stop_time_offset=(_)
|
504
530
|
end
|
505
531
|
|
532
|
+
# Orientation of the transit vehicle, represented as an angle in degrees.
|
506
533
|
sig { returns(T.nilable(Float)) }
|
507
534
|
def orientation
|
508
535
|
end
|
@@ -511,6 +538,7 @@ module OnebusawaySDK
|
|
511
538
|
def orientation=(_)
|
512
539
|
end
|
513
540
|
|
541
|
+
# Current position of the transit vehicle.
|
514
542
|
sig { returns(T.nilable(OnebusawaySDK::Models::TripsForRouteListResponse::Data::List::Status::Position)) }
|
515
543
|
def position
|
516
544
|
end
|
@@ -522,6 +550,8 @@ module OnebusawaySDK
|
|
522
550
|
def position=(_)
|
523
551
|
end
|
524
552
|
|
553
|
+
# Distance, in meters, the transit vehicle is scheduled to have progressed along
|
554
|
+
# the active trip.
|
525
555
|
sig { returns(T.nilable(Float)) }
|
526
556
|
def scheduled_distance_along_trip
|
527
557
|
end
|
@@ -530,6 +560,7 @@ module OnebusawaySDK
|
|
530
560
|
def scheduled_distance_along_trip=(_)
|
531
561
|
end
|
532
562
|
|
563
|
+
# References to situation elements (if any) applicable to this trip.
|
533
564
|
sig { returns(T.nilable(T::Array[String])) }
|
534
565
|
def situation_ids
|
535
566
|
end
|
@@ -538,6 +569,7 @@ module OnebusawaySDK
|
|
538
569
|
def situation_ids=(_)
|
539
570
|
end
|
540
571
|
|
572
|
+
# ID of the transit vehicle currently serving the trip.
|
541
573
|
sig { returns(T.nilable(String)) }
|
542
574
|
def vehicle_id
|
543
575
|
end
|
@@ -576,9 +608,9 @@ module OnebusawaySDK
|
|
576
608
|
situation_ids: T::Array[String],
|
577
609
|
vehicle_id: String
|
578
610
|
)
|
579
|
-
.
|
611
|
+
.returns(T.attached_class)
|
580
612
|
end
|
581
|
-
def
|
613
|
+
def self.new(
|
582
614
|
active_trip_id:,
|
583
615
|
block_trip_sequence:,
|
584
616
|
closest_stop:,
|
@@ -647,6 +679,7 @@ module OnebusawaySDK
|
|
647
679
|
end
|
648
680
|
|
649
681
|
class LastKnownLocation < OnebusawaySDK::BaseModel
|
682
|
+
# Latitude of the last known location of the transit vehicle.
|
650
683
|
sig { returns(T.nilable(Float)) }
|
651
684
|
def lat
|
652
685
|
end
|
@@ -655,6 +688,7 @@ module OnebusawaySDK
|
|
655
688
|
def lat=(_)
|
656
689
|
end
|
657
690
|
|
691
|
+
# Longitude of the last known location of the transit vehicle.
|
658
692
|
sig { returns(T.nilable(Float)) }
|
659
693
|
def lon
|
660
694
|
end
|
@@ -663,8 +697,9 @@ module OnebusawaySDK
|
|
663
697
|
def lon=(_)
|
664
698
|
end
|
665
699
|
|
666
|
-
|
667
|
-
|
700
|
+
# Last known location of the transit vehicle.
|
701
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
702
|
+
def self.new(lat: nil, lon: nil)
|
668
703
|
end
|
669
704
|
|
670
705
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -673,6 +708,7 @@ module OnebusawaySDK
|
|
673
708
|
end
|
674
709
|
|
675
710
|
class Position < OnebusawaySDK::BaseModel
|
711
|
+
# Latitude of the current position of the transit vehicle.
|
676
712
|
sig { returns(T.nilable(Float)) }
|
677
713
|
def lat
|
678
714
|
end
|
@@ -681,6 +717,7 @@ module OnebusawaySDK
|
|
681
717
|
def lat=(_)
|
682
718
|
end
|
683
719
|
|
720
|
+
# Longitude of the current position of the transit vehicle.
|
684
721
|
sig { returns(T.nilable(Float)) }
|
685
722
|
def lon
|
686
723
|
end
|
@@ -689,8 +726,9 @@ module OnebusawaySDK
|
|
689
726
|
def lon=(_)
|
690
727
|
end
|
691
728
|
|
692
|
-
|
693
|
-
|
729
|
+
# Current position of the transit vehicle.
|
730
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
731
|
+
def self.new(lat: nil, lon: nil)
|
694
732
|
end
|
695
733
|
|
696
734
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -6,6 +6,7 @@ module OnebusawaySDK
|
|
6
6
|
extend OnebusawaySDK::RequestParameters::Converter
|
7
7
|
include OnebusawaySDK::RequestParameters
|
8
8
|
|
9
|
+
# Specific time for querying the status (timestamp format)
|
9
10
|
sig { returns(T.nilable(String)) }
|
10
11
|
def time
|
11
12
|
end
|
@@ -22,9 +23,9 @@ module OnebusawaySDK
|
|
22
23
|
T::Hash[Symbol, T.anything]
|
23
24
|
)
|
24
25
|
)
|
25
|
-
.
|
26
|
+
.returns(T.attached_class)
|
26
27
|
end
|
27
|
-
def
|
28
|
+
def self.new(time: nil, request_options: {})
|
28
29
|
end
|
29
30
|
|
30
31
|
sig { override.returns({time: String, request_options: OnebusawaySDK::RequestOptions}) }
|
@@ -14,8 +14,8 @@ module OnebusawaySDK
|
|
14
14
|
def data=(_)
|
15
15
|
end
|
16
16
|
|
17
|
-
sig { params(data: OnebusawaySDK::Models::VehiclesForAgencyListResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::VehiclesForAgencyListResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::VehiclesForAgencyListResponse::Data}) }
|
@@ -56,9 +56,9 @@ module OnebusawaySDK
|
|
56
56
|
list: T::Array[OnebusawaySDK::Models::VehiclesForAgencyListResponse::Data::List],
|
57
57
|
references: OnebusawaySDK::Models::References
|
58
58
|
)
|
59
|
-
.
|
59
|
+
.returns(T.attached_class)
|
60
60
|
end
|
61
|
-
def
|
61
|
+
def self.new(limit_exceeded:, list:, references:)
|
62
62
|
end
|
63
63
|
|
64
64
|
sig do
|
@@ -183,9 +183,9 @@ module OnebusawaySDK
|
|
183
183
|
phase: String,
|
184
184
|
status: String
|
185
185
|
)
|
186
|
-
.
|
186
|
+
.returns(T.attached_class)
|
187
187
|
end
|
188
|
-
def
|
188
|
+
def self.new(
|
189
189
|
last_location_update_time:,
|
190
190
|
last_update_time:,
|
191
191
|
location:,
|
@@ -238,8 +238,8 @@ module OnebusawaySDK
|
|
238
238
|
def lon=(_)
|
239
239
|
end
|
240
240
|
|
241
|
-
sig { params(lat: Float, lon: Float).
|
242
|
-
def
|
241
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
242
|
+
def self.new(lat: nil, lon: nil)
|
243
243
|
end
|
244
244
|
|
245
245
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -248,6 +248,7 @@ module OnebusawaySDK
|
|
248
248
|
end
|
249
249
|
|
250
250
|
class TripStatus < OnebusawaySDK::BaseModel
|
251
|
+
# Trip ID of the trip the vehicle is actively serving.
|
251
252
|
sig { returns(String) }
|
252
253
|
def active_trip_id
|
253
254
|
end
|
@@ -256,6 +257,7 @@ module OnebusawaySDK
|
|
256
257
|
def active_trip_id=(_)
|
257
258
|
end
|
258
259
|
|
260
|
+
# Index of the active trip into the sequence of trips for the active block.
|
259
261
|
sig { returns(Integer) }
|
260
262
|
def block_trip_sequence
|
261
263
|
end
|
@@ -264,6 +266,7 @@ module OnebusawaySDK
|
|
264
266
|
def block_trip_sequence=(_)
|
265
267
|
end
|
266
268
|
|
269
|
+
# ID of the closest stop to the current location of the transit vehicle.
|
267
270
|
sig { returns(String) }
|
268
271
|
def closest_stop
|
269
272
|
end
|
@@ -272,6 +275,7 @@ module OnebusawaySDK
|
|
272
275
|
def closest_stop=(_)
|
273
276
|
end
|
274
277
|
|
278
|
+
# Distance, in meters, the transit vehicle has progressed along the active trip.
|
275
279
|
sig { returns(Float) }
|
276
280
|
def distance_along_trip
|
277
281
|
end
|
@@ -280,6 +284,8 @@ module OnebusawaySDK
|
|
280
284
|
def distance_along_trip=(_)
|
281
285
|
end
|
282
286
|
|
287
|
+
# Last known distance along the trip received in real-time from the transit
|
288
|
+
# vehicle.
|
283
289
|
sig { returns(Float) }
|
284
290
|
def last_known_distance_along_trip
|
285
291
|
end
|
@@ -288,6 +294,7 @@ module OnebusawaySDK
|
|
288
294
|
def last_known_distance_along_trip=(_)
|
289
295
|
end
|
290
296
|
|
297
|
+
# Timestamp of the last known real-time location update from the transit vehicle.
|
291
298
|
sig { returns(Integer) }
|
292
299
|
def last_location_update_time
|
293
300
|
end
|
@@ -296,6 +303,7 @@ module OnebusawaySDK
|
|
296
303
|
def last_location_update_time=(_)
|
297
304
|
end
|
298
305
|
|
306
|
+
# Timestamp of the last known real-time update from the transit vehicle.
|
299
307
|
sig { returns(Integer) }
|
300
308
|
def last_update_time
|
301
309
|
end
|
@@ -304,6 +312,7 @@ module OnebusawaySDK
|
|
304
312
|
def last_update_time=(_)
|
305
313
|
end
|
306
314
|
|
315
|
+
# Capacity of the transit vehicle in terms of occupancy.
|
307
316
|
sig { returns(Integer) }
|
308
317
|
def occupancy_capacity
|
309
318
|
end
|
@@ -312,6 +321,7 @@ module OnebusawaySDK
|
|
312
321
|
def occupancy_capacity=(_)
|
313
322
|
end
|
314
323
|
|
324
|
+
# Current count of occupants in the transit vehicle.
|
315
325
|
sig { returns(Integer) }
|
316
326
|
def occupancy_count
|
317
327
|
end
|
@@ -320,6 +330,7 @@ module OnebusawaySDK
|
|
320
330
|
def occupancy_count=(_)
|
321
331
|
end
|
322
332
|
|
333
|
+
# Current occupancy status of the transit vehicle.
|
323
334
|
sig { returns(String) }
|
324
335
|
def occupancy_status
|
325
336
|
end
|
@@ -328,6 +339,7 @@ module OnebusawaySDK
|
|
328
339
|
def occupancy_status=(_)
|
329
340
|
end
|
330
341
|
|
342
|
+
# Current journey phase of the trip.
|
331
343
|
sig { returns(String) }
|
332
344
|
def phase
|
333
345
|
end
|
@@ -336,6 +348,7 @@ module OnebusawaySDK
|
|
336
348
|
def phase=(_)
|
337
349
|
end
|
338
350
|
|
351
|
+
# Indicates if real-time arrival info is available for this trip.
|
339
352
|
sig { returns(T::Boolean) }
|
340
353
|
def predicted
|
341
354
|
end
|
@@ -344,6 +357,7 @@ module OnebusawaySDK
|
|
344
357
|
def predicted=(_)
|
345
358
|
end
|
346
359
|
|
360
|
+
# Deviation from the schedule in seconds (positive for late, negative for early).
|
347
361
|
sig { returns(Integer) }
|
348
362
|
def schedule_deviation
|
349
363
|
end
|
@@ -352,6 +366,8 @@ module OnebusawaySDK
|
|
352
366
|
def schedule_deviation=(_)
|
353
367
|
end
|
354
368
|
|
369
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
370
|
+
# service date for the trip.
|
355
371
|
sig { returns(Integer) }
|
356
372
|
def service_date
|
357
373
|
end
|
@@ -360,6 +376,7 @@ module OnebusawaySDK
|
|
360
376
|
def service_date=(_)
|
361
377
|
end
|
362
378
|
|
379
|
+
# Current status modifiers for the trip.
|
363
380
|
sig { returns(String) }
|
364
381
|
def status
|
365
382
|
end
|
@@ -368,6 +385,7 @@ module OnebusawaySDK
|
|
368
385
|
def status=(_)
|
369
386
|
end
|
370
387
|
|
388
|
+
# Total length of the trip, in meters.
|
371
389
|
sig { returns(Float) }
|
372
390
|
def total_distance_along_trip
|
373
391
|
end
|
@@ -376,6 +394,8 @@ module OnebusawaySDK
|
|
376
394
|
def total_distance_along_trip=(_)
|
377
395
|
end
|
378
396
|
|
397
|
+
# Time offset from the closest stop to the current position of the transit vehicle
|
398
|
+
# (in seconds).
|
379
399
|
sig { returns(T.nilable(Integer)) }
|
380
400
|
def closest_stop_time_offset
|
381
401
|
end
|
@@ -384,6 +404,7 @@ module OnebusawaySDK
|
|
384
404
|
def closest_stop_time_offset=(_)
|
385
405
|
end
|
386
406
|
|
407
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
387
408
|
sig { returns(T.nilable(String)) }
|
388
409
|
def frequency
|
389
410
|
end
|
@@ -392,6 +413,7 @@ module OnebusawaySDK
|
|
392
413
|
def frequency=(_)
|
393
414
|
end
|
394
415
|
|
416
|
+
# Last known location of the transit vehicle.
|
395
417
|
sig do
|
396
418
|
returns(
|
397
419
|
T.nilable(OnebusawaySDK::Models::VehiclesForAgencyListResponse::Data::List::TripStatus::LastKnownLocation)
|
@@ -407,6 +429,7 @@ module OnebusawaySDK
|
|
407
429
|
def last_known_location=(_)
|
408
430
|
end
|
409
431
|
|
432
|
+
# Last known orientation value received in real-time from the transit vehicle.
|
410
433
|
sig { returns(T.nilable(Float)) }
|
411
434
|
def last_known_orientation
|
412
435
|
end
|
@@ -415,6 +438,7 @@ module OnebusawaySDK
|
|
415
438
|
def last_known_orientation=(_)
|
416
439
|
end
|
417
440
|
|
441
|
+
# ID of the next stop the transit vehicle is scheduled to arrive at.
|
418
442
|
sig { returns(T.nilable(String)) }
|
419
443
|
def next_stop
|
420
444
|
end
|
@@ -423,6 +447,8 @@ module OnebusawaySDK
|
|
423
447
|
def next_stop=(_)
|
424
448
|
end
|
425
449
|
|
450
|
+
# Time offset from the next stop to the current position of the transit vehicle
|
451
|
+
# (in seconds).
|
426
452
|
sig { returns(T.nilable(Integer)) }
|
427
453
|
def next_stop_time_offset
|
428
454
|
end
|
@@ -431,6 +457,7 @@ module OnebusawaySDK
|
|
431
457
|
def next_stop_time_offset=(_)
|
432
458
|
end
|
433
459
|
|
460
|
+
# Orientation of the transit vehicle, represented as an angle in degrees.
|
434
461
|
sig { returns(T.nilable(Float)) }
|
435
462
|
def orientation
|
436
463
|
end
|
@@ -439,6 +466,7 @@ module OnebusawaySDK
|
|
439
466
|
def orientation=(_)
|
440
467
|
end
|
441
468
|
|
469
|
+
# Current position of the transit vehicle.
|
442
470
|
sig { returns(T.nilable(OnebusawaySDK::Models::VehiclesForAgencyListResponse::Data::List::TripStatus::Position)) }
|
443
471
|
def position
|
444
472
|
end
|
@@ -450,6 +478,8 @@ module OnebusawaySDK
|
|
450
478
|
def position=(_)
|
451
479
|
end
|
452
480
|
|
481
|
+
# Distance, in meters, the transit vehicle is scheduled to have progressed along
|
482
|
+
# the active trip.
|
453
483
|
sig { returns(T.nilable(Float)) }
|
454
484
|
def scheduled_distance_along_trip
|
455
485
|
end
|
@@ -458,6 +488,7 @@ module OnebusawaySDK
|
|
458
488
|
def scheduled_distance_along_trip=(_)
|
459
489
|
end
|
460
490
|
|
491
|
+
# References to situation elements (if any) applicable to this trip.
|
461
492
|
sig { returns(T.nilable(T::Array[String])) }
|
462
493
|
def situation_ids
|
463
494
|
end
|
@@ -466,6 +497,7 @@ module OnebusawaySDK
|
|
466
497
|
def situation_ids=(_)
|
467
498
|
end
|
468
499
|
|
500
|
+
# ID of the transit vehicle currently serving the trip.
|
469
501
|
sig { returns(T.nilable(String)) }
|
470
502
|
def vehicle_id
|
471
503
|
end
|
@@ -504,9 +536,9 @@ module OnebusawaySDK
|
|
504
536
|
situation_ids: T::Array[String],
|
505
537
|
vehicle_id: String
|
506
538
|
)
|
507
|
-
.
|
539
|
+
.returns(T.attached_class)
|
508
540
|
end
|
509
|
-
def
|
541
|
+
def self.new(
|
510
542
|
active_trip_id:,
|
511
543
|
block_trip_sequence:,
|
512
544
|
closest_stop:,
|
@@ -575,6 +607,7 @@ module OnebusawaySDK
|
|
575
607
|
end
|
576
608
|
|
577
609
|
class LastKnownLocation < OnebusawaySDK::BaseModel
|
610
|
+
# Latitude of the last known location of the transit vehicle.
|
578
611
|
sig { returns(T.nilable(Float)) }
|
579
612
|
def lat
|
580
613
|
end
|
@@ -583,6 +616,7 @@ module OnebusawaySDK
|
|
583
616
|
def lat=(_)
|
584
617
|
end
|
585
618
|
|
619
|
+
# Longitude of the last known location of the transit vehicle.
|
586
620
|
sig { returns(T.nilable(Float)) }
|
587
621
|
def lon
|
588
622
|
end
|
@@ -591,8 +625,9 @@ module OnebusawaySDK
|
|
591
625
|
def lon=(_)
|
592
626
|
end
|
593
627
|
|
594
|
-
|
595
|
-
|
628
|
+
# Last known location of the transit vehicle.
|
629
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
630
|
+
def self.new(lat: nil, lon: nil)
|
596
631
|
end
|
597
632
|
|
598
633
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -601,6 +636,7 @@ module OnebusawaySDK
|
|
601
636
|
end
|
602
637
|
|
603
638
|
class Position < OnebusawaySDK::BaseModel
|
639
|
+
# Latitude of the current position of the transit vehicle.
|
604
640
|
sig { returns(T.nilable(Float)) }
|
605
641
|
def lat
|
606
642
|
end
|
@@ -609,6 +645,7 @@ module OnebusawaySDK
|
|
609
645
|
def lat=(_)
|
610
646
|
end
|
611
647
|
|
648
|
+
# Longitude of the current position of the transit vehicle.
|
612
649
|
sig { returns(T.nilable(Float)) }
|
613
650
|
def lon
|
614
651
|
end
|
@@ -617,8 +654,9 @@ module OnebusawaySDK
|
|
617
654
|
def lon=(_)
|
618
655
|
end
|
619
656
|
|
620
|
-
|
621
|
-
|
657
|
+
# Current position of the transit vehicle.
|
658
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
659
|
+
def self.new(lat: nil, lon: nil)
|
622
660
|
end
|
623
661
|
|
624
662
|
sig { override.returns({lat: Float, lon: Float}) }
|