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::TripsForLocationListResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::TripsForLocationListResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::TripsForLocationListResponse::Data}) }
|
@@ -23,6 +23,7 @@ module OnebusawaySDK
|
|
23
23
|
end
|
24
24
|
|
25
25
|
class Data < OnebusawaySDK::BaseModel
|
26
|
+
# Indicates if the limit of trips has been exceeded
|
26
27
|
sig { returns(T::Boolean) }
|
27
28
|
def limit_exceeded
|
28
29
|
end
|
@@ -50,6 +51,7 @@ module OnebusawaySDK
|
|
50
51
|
def references=(_)
|
51
52
|
end
|
52
53
|
|
54
|
+
# Indicates if the search location is out of range
|
53
55
|
sig { returns(T.nilable(T::Boolean)) }
|
54
56
|
def out_of_range
|
55
57
|
end
|
@@ -65,9 +67,9 @@ module OnebusawaySDK
|
|
65
67
|
references: OnebusawaySDK::Models::References,
|
66
68
|
out_of_range: T::Boolean
|
67
69
|
)
|
68
|
-
.
|
70
|
+
.returns(T.attached_class)
|
69
71
|
end
|
70
|
-
def
|
72
|
+
def self.new(limit_exceeded:, list:, references:, out_of_range: nil)
|
71
73
|
end
|
72
74
|
|
73
75
|
sig do
|
@@ -148,9 +150,9 @@ module OnebusawaySDK
|
|
148
150
|
service_date: Integer,
|
149
151
|
situation_ids: T::Array[String]
|
150
152
|
)
|
151
|
-
.
|
153
|
+
.returns(T.attached_class)
|
152
154
|
end
|
153
|
-
def
|
155
|
+
def self.new(schedule:, status:, trip_id:, frequency: nil, service_date: nil, situation_ids: nil)
|
154
156
|
end
|
155
157
|
|
156
158
|
sig do
|
@@ -221,9 +223,9 @@ module OnebusawaySDK
|
|
221
223
|
time_zone: String,
|
222
224
|
frequency: T.nilable(String)
|
223
225
|
)
|
224
|
-
.
|
226
|
+
.returns(T.attached_class)
|
225
227
|
end
|
226
|
-
def
|
228
|
+
def self.new(next_trip_id:, previous_trip_id:, stop_times:, time_zone:, frequency: nil)
|
227
229
|
end
|
228
230
|
|
229
231
|
sig do
|
@@ -299,9 +301,9 @@ module OnebusawaySDK
|
|
299
301
|
stop_headsign: String,
|
300
302
|
stop_id: String
|
301
303
|
)
|
302
|
-
.
|
304
|
+
.returns(T.attached_class)
|
303
305
|
end
|
304
|
-
def
|
306
|
+
def self.new(
|
305
307
|
arrival_time: nil,
|
306
308
|
departure_time: nil,
|
307
309
|
distance_along_trip: nil,
|
@@ -330,6 +332,7 @@ module OnebusawaySDK
|
|
330
332
|
end
|
331
333
|
|
332
334
|
class Status < OnebusawaySDK::BaseModel
|
335
|
+
# Trip ID of the trip the vehicle is actively serving.
|
333
336
|
sig { returns(String) }
|
334
337
|
def active_trip_id
|
335
338
|
end
|
@@ -338,6 +341,7 @@ module OnebusawaySDK
|
|
338
341
|
def active_trip_id=(_)
|
339
342
|
end
|
340
343
|
|
344
|
+
# Index of the active trip into the sequence of trips for the active block.
|
341
345
|
sig { returns(Integer) }
|
342
346
|
def block_trip_sequence
|
343
347
|
end
|
@@ -346,6 +350,7 @@ module OnebusawaySDK
|
|
346
350
|
def block_trip_sequence=(_)
|
347
351
|
end
|
348
352
|
|
353
|
+
# ID of the closest stop to the current location of the transit vehicle.
|
349
354
|
sig { returns(String) }
|
350
355
|
def closest_stop
|
351
356
|
end
|
@@ -354,6 +359,7 @@ module OnebusawaySDK
|
|
354
359
|
def closest_stop=(_)
|
355
360
|
end
|
356
361
|
|
362
|
+
# Distance, in meters, the transit vehicle has progressed along the active trip.
|
357
363
|
sig { returns(Float) }
|
358
364
|
def distance_along_trip
|
359
365
|
end
|
@@ -362,6 +368,8 @@ module OnebusawaySDK
|
|
362
368
|
def distance_along_trip=(_)
|
363
369
|
end
|
364
370
|
|
371
|
+
# Last known distance along the trip received in real-time from the transit
|
372
|
+
# vehicle.
|
365
373
|
sig { returns(Float) }
|
366
374
|
def last_known_distance_along_trip
|
367
375
|
end
|
@@ -370,6 +378,7 @@ module OnebusawaySDK
|
|
370
378
|
def last_known_distance_along_trip=(_)
|
371
379
|
end
|
372
380
|
|
381
|
+
# Timestamp of the last known real-time location update from the transit vehicle.
|
373
382
|
sig { returns(Integer) }
|
374
383
|
def last_location_update_time
|
375
384
|
end
|
@@ -378,6 +387,7 @@ module OnebusawaySDK
|
|
378
387
|
def last_location_update_time=(_)
|
379
388
|
end
|
380
389
|
|
390
|
+
# Timestamp of the last known real-time update from the transit vehicle.
|
381
391
|
sig { returns(Integer) }
|
382
392
|
def last_update_time
|
383
393
|
end
|
@@ -386,6 +396,7 @@ module OnebusawaySDK
|
|
386
396
|
def last_update_time=(_)
|
387
397
|
end
|
388
398
|
|
399
|
+
# Capacity of the transit vehicle in terms of occupancy.
|
389
400
|
sig { returns(Integer) }
|
390
401
|
def occupancy_capacity
|
391
402
|
end
|
@@ -394,6 +405,7 @@ module OnebusawaySDK
|
|
394
405
|
def occupancy_capacity=(_)
|
395
406
|
end
|
396
407
|
|
408
|
+
# Current count of occupants in the transit vehicle.
|
397
409
|
sig { returns(Integer) }
|
398
410
|
def occupancy_count
|
399
411
|
end
|
@@ -402,6 +414,7 @@ module OnebusawaySDK
|
|
402
414
|
def occupancy_count=(_)
|
403
415
|
end
|
404
416
|
|
417
|
+
# Current occupancy status of the transit vehicle.
|
405
418
|
sig { returns(String) }
|
406
419
|
def occupancy_status
|
407
420
|
end
|
@@ -410,6 +423,7 @@ module OnebusawaySDK
|
|
410
423
|
def occupancy_status=(_)
|
411
424
|
end
|
412
425
|
|
426
|
+
# Current journey phase of the trip.
|
413
427
|
sig { returns(String) }
|
414
428
|
def phase
|
415
429
|
end
|
@@ -418,6 +432,7 @@ module OnebusawaySDK
|
|
418
432
|
def phase=(_)
|
419
433
|
end
|
420
434
|
|
435
|
+
# Indicates if real-time arrival info is available for this trip.
|
421
436
|
sig { returns(T::Boolean) }
|
422
437
|
def predicted
|
423
438
|
end
|
@@ -426,6 +441,7 @@ module OnebusawaySDK
|
|
426
441
|
def predicted=(_)
|
427
442
|
end
|
428
443
|
|
444
|
+
# Deviation from the schedule in seconds (positive for late, negative for early).
|
429
445
|
sig { returns(Integer) }
|
430
446
|
def schedule_deviation
|
431
447
|
end
|
@@ -434,6 +450,8 @@ module OnebusawaySDK
|
|
434
450
|
def schedule_deviation=(_)
|
435
451
|
end
|
436
452
|
|
453
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
454
|
+
# service date for the trip.
|
437
455
|
sig { returns(Integer) }
|
438
456
|
def service_date
|
439
457
|
end
|
@@ -442,6 +460,7 @@ module OnebusawaySDK
|
|
442
460
|
def service_date=(_)
|
443
461
|
end
|
444
462
|
|
463
|
+
# Current status modifiers for the trip.
|
445
464
|
sig { returns(String) }
|
446
465
|
def status
|
447
466
|
end
|
@@ -450,6 +469,7 @@ module OnebusawaySDK
|
|
450
469
|
def status=(_)
|
451
470
|
end
|
452
471
|
|
472
|
+
# Total length of the trip, in meters.
|
453
473
|
sig { returns(Float) }
|
454
474
|
def total_distance_along_trip
|
455
475
|
end
|
@@ -458,6 +478,8 @@ module OnebusawaySDK
|
|
458
478
|
def total_distance_along_trip=(_)
|
459
479
|
end
|
460
480
|
|
481
|
+
# Time offset from the closest stop to the current position of the transit vehicle
|
482
|
+
# (in seconds).
|
461
483
|
sig { returns(T.nilable(Integer)) }
|
462
484
|
def closest_stop_time_offset
|
463
485
|
end
|
@@ -466,6 +488,7 @@ module OnebusawaySDK
|
|
466
488
|
def closest_stop_time_offset=(_)
|
467
489
|
end
|
468
490
|
|
491
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
469
492
|
sig { returns(T.nilable(String)) }
|
470
493
|
def frequency
|
471
494
|
end
|
@@ -474,6 +497,7 @@ module OnebusawaySDK
|
|
474
497
|
def frequency=(_)
|
475
498
|
end
|
476
499
|
|
500
|
+
# Last known location of the transit vehicle.
|
477
501
|
sig do
|
478
502
|
returns(
|
479
503
|
T.nilable(OnebusawaySDK::Models::TripsForLocationListResponse::Data::List::Status::LastKnownLocation)
|
@@ -489,6 +513,7 @@ module OnebusawaySDK
|
|
489
513
|
def last_known_location=(_)
|
490
514
|
end
|
491
515
|
|
516
|
+
# Last known orientation value received in real-time from the transit vehicle.
|
492
517
|
sig { returns(T.nilable(Float)) }
|
493
518
|
def last_known_orientation
|
494
519
|
end
|
@@ -497,6 +522,7 @@ module OnebusawaySDK
|
|
497
522
|
def last_known_orientation=(_)
|
498
523
|
end
|
499
524
|
|
525
|
+
# ID of the next stop the transit vehicle is scheduled to arrive at.
|
500
526
|
sig { returns(T.nilable(String)) }
|
501
527
|
def next_stop
|
502
528
|
end
|
@@ -505,6 +531,8 @@ module OnebusawaySDK
|
|
505
531
|
def next_stop=(_)
|
506
532
|
end
|
507
533
|
|
534
|
+
# Time offset from the next stop to the current position of the transit vehicle
|
535
|
+
# (in seconds).
|
508
536
|
sig { returns(T.nilable(Integer)) }
|
509
537
|
def next_stop_time_offset
|
510
538
|
end
|
@@ -513,6 +541,7 @@ module OnebusawaySDK
|
|
513
541
|
def next_stop_time_offset=(_)
|
514
542
|
end
|
515
543
|
|
544
|
+
# Orientation of the transit vehicle, represented as an angle in degrees.
|
516
545
|
sig { returns(T.nilable(Float)) }
|
517
546
|
def orientation
|
518
547
|
end
|
@@ -521,6 +550,7 @@ module OnebusawaySDK
|
|
521
550
|
def orientation=(_)
|
522
551
|
end
|
523
552
|
|
553
|
+
# Current position of the transit vehicle.
|
524
554
|
sig { returns(T.nilable(OnebusawaySDK::Models::TripsForLocationListResponse::Data::List::Status::Position)) }
|
525
555
|
def position
|
526
556
|
end
|
@@ -532,6 +562,8 @@ module OnebusawaySDK
|
|
532
562
|
def position=(_)
|
533
563
|
end
|
534
564
|
|
565
|
+
# Distance, in meters, the transit vehicle is scheduled to have progressed along
|
566
|
+
# the active trip.
|
535
567
|
sig { returns(T.nilable(Float)) }
|
536
568
|
def scheduled_distance_along_trip
|
537
569
|
end
|
@@ -540,6 +572,7 @@ module OnebusawaySDK
|
|
540
572
|
def scheduled_distance_along_trip=(_)
|
541
573
|
end
|
542
574
|
|
575
|
+
# References to situation elements (if any) applicable to this trip.
|
543
576
|
sig { returns(T.nilable(T::Array[String])) }
|
544
577
|
def situation_ids
|
545
578
|
end
|
@@ -548,6 +581,7 @@ module OnebusawaySDK
|
|
548
581
|
def situation_ids=(_)
|
549
582
|
end
|
550
583
|
|
584
|
+
# ID of the transit vehicle currently serving the trip.
|
551
585
|
sig { returns(T.nilable(String)) }
|
552
586
|
def vehicle_id
|
553
587
|
end
|
@@ -586,9 +620,9 @@ module OnebusawaySDK
|
|
586
620
|
situation_ids: T::Array[String],
|
587
621
|
vehicle_id: String
|
588
622
|
)
|
589
|
-
.
|
623
|
+
.returns(T.attached_class)
|
590
624
|
end
|
591
|
-
def
|
625
|
+
def self.new(
|
592
626
|
active_trip_id:,
|
593
627
|
block_trip_sequence:,
|
594
628
|
closest_stop:,
|
@@ -657,6 +691,7 @@ module OnebusawaySDK
|
|
657
691
|
end
|
658
692
|
|
659
693
|
class LastKnownLocation < OnebusawaySDK::BaseModel
|
694
|
+
# Latitude of the last known location of the transit vehicle.
|
660
695
|
sig { returns(T.nilable(Float)) }
|
661
696
|
def lat
|
662
697
|
end
|
@@ -665,6 +700,7 @@ module OnebusawaySDK
|
|
665
700
|
def lat=(_)
|
666
701
|
end
|
667
702
|
|
703
|
+
# Longitude of the last known location of the transit vehicle.
|
668
704
|
sig { returns(T.nilable(Float)) }
|
669
705
|
def lon
|
670
706
|
end
|
@@ -673,8 +709,9 @@ module OnebusawaySDK
|
|
673
709
|
def lon=(_)
|
674
710
|
end
|
675
711
|
|
676
|
-
|
677
|
-
|
712
|
+
# Last known location of the transit vehicle.
|
713
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
714
|
+
def self.new(lat: nil, lon: nil)
|
678
715
|
end
|
679
716
|
|
680
717
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -683,6 +720,7 @@ module OnebusawaySDK
|
|
683
720
|
end
|
684
721
|
|
685
722
|
class Position < OnebusawaySDK::BaseModel
|
723
|
+
# Latitude of the current position of the transit vehicle.
|
686
724
|
sig { returns(T.nilable(Float)) }
|
687
725
|
def lat
|
688
726
|
end
|
@@ -691,6 +729,7 @@ module OnebusawaySDK
|
|
691
729
|
def lat=(_)
|
692
730
|
end
|
693
731
|
|
732
|
+
# Longitude of the current position of the transit vehicle.
|
694
733
|
sig { returns(T.nilable(Float)) }
|
695
734
|
def lon
|
696
735
|
end
|
@@ -699,8 +738,9 @@ module OnebusawaySDK
|
|
699
738
|
def lon=(_)
|
700
739
|
end
|
701
740
|
|
702
|
-
|
703
|
-
|
741
|
+
# Current position of the transit vehicle.
|
742
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
743
|
+
def self.new(lat: nil, lon: nil)
|
704
744
|
end
|
705
745
|
|
706
746
|
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
|
+
# Determine whether full schedule elements are included. Defaults to false.
|
9
10
|
sig { returns(T.nilable(T::Boolean)) }
|
10
11
|
def include_schedule
|
11
12
|
end
|
@@ -14,6 +15,8 @@ module OnebusawaySDK
|
|
14
15
|
def include_schedule=(_)
|
15
16
|
end
|
16
17
|
|
18
|
+
# Determine whether full tripStatus elements with real-time information are
|
19
|
+
# included. Defaults to false.
|
17
20
|
sig { returns(T.nilable(T::Boolean)) }
|
18
21
|
def include_status
|
19
22
|
end
|
@@ -22,6 +25,7 @@ module OnebusawaySDK
|
|
22
25
|
def include_status=(_)
|
23
26
|
end
|
24
27
|
|
28
|
+
# Query the system at a specific time. Useful for testing.
|
25
29
|
sig { returns(T.nilable(Integer)) }
|
26
30
|
def time
|
27
31
|
end
|
@@ -37,9 +41,9 @@ module OnebusawaySDK
|
|
37
41
|
time: Integer,
|
38
42
|
request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
|
39
43
|
)
|
40
|
-
.
|
44
|
+
.returns(T.attached_class)
|
41
45
|
end
|
42
|
-
def
|
46
|
+
def self.new(include_schedule: nil, include_status: nil, time: nil, request_options: {})
|
43
47
|
end
|
44
48
|
|
45
49
|
sig do
|