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
@@ -6,6 +6,8 @@ module OnebusawaySDK
|
|
6
6
|
extend OnebusawaySDK::RequestParameters::Converter
|
7
7
|
include OnebusawaySDK::RequestParameters
|
8
8
|
|
9
|
+
# Determines whether full <schedule/> element is included in the <tripDetails/>
|
10
|
+
# section. Defaults to false.
|
9
11
|
sig { returns(T.nilable(T::Boolean)) }
|
10
12
|
def include_schedule
|
11
13
|
end
|
@@ -14,6 +16,8 @@ module OnebusawaySDK
|
|
14
16
|
def include_schedule=(_)
|
15
17
|
end
|
16
18
|
|
19
|
+
# Determines whether the full <status/> element is included in the <tripDetails/>
|
20
|
+
# section. Defaults to true.
|
17
21
|
sig { returns(T.nilable(T::Boolean)) }
|
18
22
|
def include_status
|
19
23
|
end
|
@@ -22,6 +26,8 @@ module OnebusawaySDK
|
|
22
26
|
def include_status=(_)
|
23
27
|
end
|
24
28
|
|
29
|
+
# Determines whether full <trip/> element is included in the <references/>
|
30
|
+
# section. Defaults to false.
|
25
31
|
sig { returns(T.nilable(T::Boolean)) }
|
26
32
|
def include_trip
|
27
33
|
end
|
@@ -30,6 +36,7 @@ module OnebusawaySDK
|
|
30
36
|
def include_trip=(_)
|
31
37
|
end
|
32
38
|
|
39
|
+
# Time parameter to query the system at a specific time (optional).
|
33
40
|
sig { returns(T.nilable(Integer)) }
|
34
41
|
def time
|
35
42
|
end
|
@@ -46,15 +53,9 @@ module OnebusawaySDK
|
|
46
53
|
time: Integer,
|
47
54
|
request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
|
48
55
|
)
|
49
|
-
.
|
56
|
+
.returns(T.attached_class)
|
50
57
|
end
|
51
|
-
def
|
52
|
-
include_schedule: nil,
|
53
|
-
include_status: nil,
|
54
|
-
include_trip: nil,
|
55
|
-
time: nil,
|
56
|
-
request_options: {}
|
57
|
-
)
|
58
|
+
def self.new(include_schedule: nil, include_status: nil, include_trip: nil, time: nil, request_options: {})
|
58
59
|
end
|
59
60
|
|
60
61
|
sig do
|
@@ -14,8 +14,8 @@ module OnebusawaySDK
|
|
14
14
|
def data=(_)
|
15
15
|
end
|
16
16
|
|
17
|
-
sig { params(data: OnebusawaySDK::Models::TripForVehicleRetrieveResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::TripForVehicleRetrieveResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::TripForVehicleRetrieveResponse::Data}) }
|
@@ -47,9 +47,9 @@ module OnebusawaySDK
|
|
47
47
|
entry: OnebusawaySDK::Models::TripForVehicleRetrieveResponse::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
|
@@ -128,16 +128,9 @@ module OnebusawaySDK
|
|
128
128
|
situation_ids: T::Array[String],
|
129
129
|
status: OnebusawaySDK::Models::TripForVehicleRetrieveResponse::Data::Entry::Status
|
130
130
|
)
|
131
|
-
.
|
131
|
+
.returns(T.attached_class)
|
132
132
|
end
|
133
|
-
def
|
134
|
-
trip_id:,
|
135
|
-
frequency: nil,
|
136
|
-
schedule: nil,
|
137
|
-
service_date: nil,
|
138
|
-
situation_ids: nil,
|
139
|
-
status: nil
|
140
|
-
)
|
133
|
+
def self.new(trip_id:, frequency: nil, schedule: nil, service_date: nil, situation_ids: nil, status: nil)
|
141
134
|
end
|
142
135
|
|
143
136
|
sig do
|
@@ -210,9 +203,9 @@ module OnebusawaySDK
|
|
210
203
|
time_zone: String,
|
211
204
|
frequency: T.nilable(String)
|
212
205
|
)
|
213
|
-
.
|
206
|
+
.returns(T.attached_class)
|
214
207
|
end
|
215
|
-
def
|
208
|
+
def self.new(next_trip_id:, previous_trip_id:, stop_times:, time_zone:, frequency: nil)
|
216
209
|
end
|
217
210
|
|
218
211
|
sig do
|
@@ -288,9 +281,9 @@ module OnebusawaySDK
|
|
288
281
|
stop_headsign: String,
|
289
282
|
stop_id: String
|
290
283
|
)
|
291
|
-
.
|
284
|
+
.returns(T.attached_class)
|
292
285
|
end
|
293
|
-
def
|
286
|
+
def self.new(
|
294
287
|
arrival_time: nil,
|
295
288
|
departure_time: nil,
|
296
289
|
distance_along_trip: nil,
|
@@ -319,6 +312,7 @@ module OnebusawaySDK
|
|
319
312
|
end
|
320
313
|
|
321
314
|
class Status < OnebusawaySDK::BaseModel
|
315
|
+
# Trip ID of the trip the vehicle is actively serving.
|
322
316
|
sig { returns(String) }
|
323
317
|
def active_trip_id
|
324
318
|
end
|
@@ -327,6 +321,7 @@ module OnebusawaySDK
|
|
327
321
|
def active_trip_id=(_)
|
328
322
|
end
|
329
323
|
|
324
|
+
# Index of the active trip into the sequence of trips for the active block.
|
330
325
|
sig { returns(Integer) }
|
331
326
|
def block_trip_sequence
|
332
327
|
end
|
@@ -335,6 +330,7 @@ module OnebusawaySDK
|
|
335
330
|
def block_trip_sequence=(_)
|
336
331
|
end
|
337
332
|
|
333
|
+
# ID of the closest stop to the current location of the transit vehicle.
|
338
334
|
sig { returns(String) }
|
339
335
|
def closest_stop
|
340
336
|
end
|
@@ -343,6 +339,7 @@ module OnebusawaySDK
|
|
343
339
|
def closest_stop=(_)
|
344
340
|
end
|
345
341
|
|
342
|
+
# Distance, in meters, the transit vehicle has progressed along the active trip.
|
346
343
|
sig { returns(Float) }
|
347
344
|
def distance_along_trip
|
348
345
|
end
|
@@ -351,6 +348,8 @@ module OnebusawaySDK
|
|
351
348
|
def distance_along_trip=(_)
|
352
349
|
end
|
353
350
|
|
351
|
+
# Last known distance along the trip received in real-time from the transit
|
352
|
+
# vehicle.
|
354
353
|
sig { returns(Float) }
|
355
354
|
def last_known_distance_along_trip
|
356
355
|
end
|
@@ -359,6 +358,7 @@ module OnebusawaySDK
|
|
359
358
|
def last_known_distance_along_trip=(_)
|
360
359
|
end
|
361
360
|
|
361
|
+
# Timestamp of the last known real-time location update from the transit vehicle.
|
362
362
|
sig { returns(Integer) }
|
363
363
|
def last_location_update_time
|
364
364
|
end
|
@@ -367,6 +367,7 @@ module OnebusawaySDK
|
|
367
367
|
def last_location_update_time=(_)
|
368
368
|
end
|
369
369
|
|
370
|
+
# Timestamp of the last known real-time update from the transit vehicle.
|
370
371
|
sig { returns(Integer) }
|
371
372
|
def last_update_time
|
372
373
|
end
|
@@ -375,6 +376,7 @@ module OnebusawaySDK
|
|
375
376
|
def last_update_time=(_)
|
376
377
|
end
|
377
378
|
|
379
|
+
# Capacity of the transit vehicle in terms of occupancy.
|
378
380
|
sig { returns(Integer) }
|
379
381
|
def occupancy_capacity
|
380
382
|
end
|
@@ -383,6 +385,7 @@ module OnebusawaySDK
|
|
383
385
|
def occupancy_capacity=(_)
|
384
386
|
end
|
385
387
|
|
388
|
+
# Current count of occupants in the transit vehicle.
|
386
389
|
sig { returns(Integer) }
|
387
390
|
def occupancy_count
|
388
391
|
end
|
@@ -391,6 +394,7 @@ module OnebusawaySDK
|
|
391
394
|
def occupancy_count=(_)
|
392
395
|
end
|
393
396
|
|
397
|
+
# Current occupancy status of the transit vehicle.
|
394
398
|
sig { returns(String) }
|
395
399
|
def occupancy_status
|
396
400
|
end
|
@@ -399,6 +403,7 @@ module OnebusawaySDK
|
|
399
403
|
def occupancy_status=(_)
|
400
404
|
end
|
401
405
|
|
406
|
+
# Current journey phase of the trip.
|
402
407
|
sig { returns(String) }
|
403
408
|
def phase
|
404
409
|
end
|
@@ -407,6 +412,7 @@ module OnebusawaySDK
|
|
407
412
|
def phase=(_)
|
408
413
|
end
|
409
414
|
|
415
|
+
# Indicates if real-time arrival info is available for this trip.
|
410
416
|
sig { returns(T::Boolean) }
|
411
417
|
def predicted
|
412
418
|
end
|
@@ -415,6 +421,7 @@ module OnebusawaySDK
|
|
415
421
|
def predicted=(_)
|
416
422
|
end
|
417
423
|
|
424
|
+
# Deviation from the schedule in seconds (positive for late, negative for early).
|
418
425
|
sig { returns(Integer) }
|
419
426
|
def schedule_deviation
|
420
427
|
end
|
@@ -423,6 +430,8 @@ module OnebusawaySDK
|
|
423
430
|
def schedule_deviation=(_)
|
424
431
|
end
|
425
432
|
|
433
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
434
|
+
# service date for the trip.
|
426
435
|
sig { returns(Integer) }
|
427
436
|
def service_date
|
428
437
|
end
|
@@ -431,6 +440,7 @@ module OnebusawaySDK
|
|
431
440
|
def service_date=(_)
|
432
441
|
end
|
433
442
|
|
443
|
+
# Current status modifiers for the trip.
|
434
444
|
sig { returns(String) }
|
435
445
|
def status
|
436
446
|
end
|
@@ -439,6 +449,7 @@ module OnebusawaySDK
|
|
439
449
|
def status=(_)
|
440
450
|
end
|
441
451
|
|
452
|
+
# Total length of the trip, in meters.
|
442
453
|
sig { returns(Float) }
|
443
454
|
def total_distance_along_trip
|
444
455
|
end
|
@@ -447,6 +458,8 @@ module OnebusawaySDK
|
|
447
458
|
def total_distance_along_trip=(_)
|
448
459
|
end
|
449
460
|
|
461
|
+
# Time offset from the closest stop to the current position of the transit vehicle
|
462
|
+
# (in seconds).
|
450
463
|
sig { returns(T.nilable(Integer)) }
|
451
464
|
def closest_stop_time_offset
|
452
465
|
end
|
@@ -455,6 +468,7 @@ module OnebusawaySDK
|
|
455
468
|
def closest_stop_time_offset=(_)
|
456
469
|
end
|
457
470
|
|
471
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
458
472
|
sig { returns(T.nilable(String)) }
|
459
473
|
def frequency
|
460
474
|
end
|
@@ -463,6 +477,7 @@ module OnebusawaySDK
|
|
463
477
|
def frequency=(_)
|
464
478
|
end
|
465
479
|
|
480
|
+
# Last known location of the transit vehicle.
|
466
481
|
sig do
|
467
482
|
returns(
|
468
483
|
T.nilable(OnebusawaySDK::Models::TripForVehicleRetrieveResponse::Data::Entry::Status::LastKnownLocation)
|
@@ -478,6 +493,7 @@ module OnebusawaySDK
|
|
478
493
|
def last_known_location=(_)
|
479
494
|
end
|
480
495
|
|
496
|
+
# Last known orientation value received in real-time from the transit vehicle.
|
481
497
|
sig { returns(T.nilable(Float)) }
|
482
498
|
def last_known_orientation
|
483
499
|
end
|
@@ -486,6 +502,7 @@ module OnebusawaySDK
|
|
486
502
|
def last_known_orientation=(_)
|
487
503
|
end
|
488
504
|
|
505
|
+
# ID of the next stop the transit vehicle is scheduled to arrive at.
|
489
506
|
sig { returns(T.nilable(String)) }
|
490
507
|
def next_stop
|
491
508
|
end
|
@@ -494,6 +511,8 @@ module OnebusawaySDK
|
|
494
511
|
def next_stop=(_)
|
495
512
|
end
|
496
513
|
|
514
|
+
# Time offset from the next stop to the current position of the transit vehicle
|
515
|
+
# (in seconds).
|
497
516
|
sig { returns(T.nilable(Integer)) }
|
498
517
|
def next_stop_time_offset
|
499
518
|
end
|
@@ -502,6 +521,7 @@ module OnebusawaySDK
|
|
502
521
|
def next_stop_time_offset=(_)
|
503
522
|
end
|
504
523
|
|
524
|
+
# Orientation of the transit vehicle, represented as an angle in degrees.
|
505
525
|
sig { returns(T.nilable(Float)) }
|
506
526
|
def orientation
|
507
527
|
end
|
@@ -510,6 +530,7 @@ module OnebusawaySDK
|
|
510
530
|
def orientation=(_)
|
511
531
|
end
|
512
532
|
|
533
|
+
# Current position of the transit vehicle.
|
513
534
|
sig { returns(T.nilable(OnebusawaySDK::Models::TripForVehicleRetrieveResponse::Data::Entry::Status::Position)) }
|
514
535
|
def position
|
515
536
|
end
|
@@ -521,6 +542,8 @@ module OnebusawaySDK
|
|
521
542
|
def position=(_)
|
522
543
|
end
|
523
544
|
|
545
|
+
# Distance, in meters, the transit vehicle is scheduled to have progressed along
|
546
|
+
# the active trip.
|
524
547
|
sig { returns(T.nilable(Float)) }
|
525
548
|
def scheduled_distance_along_trip
|
526
549
|
end
|
@@ -529,6 +552,7 @@ module OnebusawaySDK
|
|
529
552
|
def scheduled_distance_along_trip=(_)
|
530
553
|
end
|
531
554
|
|
555
|
+
# References to situation elements (if any) applicable to this trip.
|
532
556
|
sig { returns(T.nilable(T::Array[String])) }
|
533
557
|
def situation_ids
|
534
558
|
end
|
@@ -537,6 +561,7 @@ module OnebusawaySDK
|
|
537
561
|
def situation_ids=(_)
|
538
562
|
end
|
539
563
|
|
564
|
+
# ID of the transit vehicle currently serving the trip.
|
540
565
|
sig { returns(T.nilable(String)) }
|
541
566
|
def vehicle_id
|
542
567
|
end
|
@@ -575,9 +600,9 @@ module OnebusawaySDK
|
|
575
600
|
situation_ids: T::Array[String],
|
576
601
|
vehicle_id: String
|
577
602
|
)
|
578
|
-
.
|
603
|
+
.returns(T.attached_class)
|
579
604
|
end
|
580
|
-
def
|
605
|
+
def self.new(
|
581
606
|
active_trip_id:,
|
582
607
|
block_trip_sequence:,
|
583
608
|
closest_stop:,
|
@@ -646,6 +671,7 @@ module OnebusawaySDK
|
|
646
671
|
end
|
647
672
|
|
648
673
|
class LastKnownLocation < OnebusawaySDK::BaseModel
|
674
|
+
# Latitude of the last known location of the transit vehicle.
|
649
675
|
sig { returns(T.nilable(Float)) }
|
650
676
|
def lat
|
651
677
|
end
|
@@ -654,6 +680,7 @@ module OnebusawaySDK
|
|
654
680
|
def lat=(_)
|
655
681
|
end
|
656
682
|
|
683
|
+
# Longitude of the last known location of the transit vehicle.
|
657
684
|
sig { returns(T.nilable(Float)) }
|
658
685
|
def lon
|
659
686
|
end
|
@@ -662,8 +689,9 @@ module OnebusawaySDK
|
|
662
689
|
def lon=(_)
|
663
690
|
end
|
664
691
|
|
665
|
-
|
666
|
-
|
692
|
+
# Last known location of the transit vehicle.
|
693
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
694
|
+
def self.new(lat: nil, lon: nil)
|
667
695
|
end
|
668
696
|
|
669
697
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -672,6 +700,7 @@ module OnebusawaySDK
|
|
672
700
|
end
|
673
701
|
|
674
702
|
class Position < OnebusawaySDK::BaseModel
|
703
|
+
# Latitude of the current position of the transit vehicle.
|
675
704
|
sig { returns(T.nilable(Float)) }
|
676
705
|
def lat
|
677
706
|
end
|
@@ -680,6 +709,7 @@ module OnebusawaySDK
|
|
680
709
|
def lat=(_)
|
681
710
|
end
|
682
711
|
|
712
|
+
# Longitude of the current position of the transit vehicle.
|
683
713
|
sig { returns(T.nilable(Float)) }
|
684
714
|
def lon
|
685
715
|
end
|
@@ -688,8 +718,9 @@ module OnebusawaySDK
|
|
688
718
|
def lon=(_)
|
689
719
|
end
|
690
720
|
|
691
|
-
|
692
|
-
|
721
|
+
# Current position of the transit vehicle.
|
722
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
723
|
+
def self.new(lat: nil, lon: nil)
|
693
724
|
end
|
694
725
|
|
695
726
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -6,8 +6,11 @@ module OnebusawaySDK
|
|
6
6
|
extend OnebusawaySDK::RequestParameters::Converter
|
7
7
|
include OnebusawaySDK::RequestParameters
|
8
8
|
|
9
|
-
sig
|
10
|
-
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {})
|
11
14
|
end
|
12
15
|
|
13
16
|
sig { override.returns({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::TripRetrieveResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::TripRetrieveResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::TripRetrieveResponse::Data}) }
|
@@ -47,9 +47,9 @@ module OnebusawaySDK
|
|
47
47
|
entry: OnebusawaySDK::Models::TripRetrieveResponse::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
|
@@ -167,9 +167,9 @@ module OnebusawaySDK
|
|
167
167
|
trip_headsign: String,
|
168
168
|
trip_short_name: String
|
169
169
|
)
|
170
|
-
.
|
170
|
+
.returns(T.attached_class)
|
171
171
|
end
|
172
|
-
def
|
172
|
+
def self.new(
|
173
173
|
id:,
|
174
174
|
route_id:,
|
175
175
|
service_id:,
|
@@ -6,6 +6,7 @@ module OnebusawaySDK
|
|
6
6
|
extend OnebusawaySDK::RequestParameters::Converter
|
7
7
|
include OnebusawaySDK::RequestParameters
|
8
8
|
|
9
|
+
# The latitude coordinate of the search center
|
9
10
|
sig { returns(Float) }
|
10
11
|
def lat
|
11
12
|
end
|
@@ -14,6 +15,7 @@ module OnebusawaySDK
|
|
14
15
|
def lat=(_)
|
15
16
|
end
|
16
17
|
|
18
|
+
# Latitude span of the search bounding box
|
17
19
|
sig { returns(Float) }
|
18
20
|
def lat_span
|
19
21
|
end
|
@@ -22,6 +24,7 @@ module OnebusawaySDK
|
|
22
24
|
def lat_span=(_)
|
23
25
|
end
|
24
26
|
|
27
|
+
# The longitude coordinate of the search center
|
25
28
|
sig { returns(Float) }
|
26
29
|
def lon
|
27
30
|
end
|
@@ -30,6 +33,7 @@ module OnebusawaySDK
|
|
30
33
|
def lon=(_)
|
31
34
|
end
|
32
35
|
|
36
|
+
# Longitude span of the search bounding box
|
33
37
|
sig { returns(Float) }
|
34
38
|
def lon_span
|
35
39
|
end
|
@@ -38,6 +42,8 @@ module OnebusawaySDK
|
|
38
42
|
def lon_span=(_)
|
39
43
|
end
|
40
44
|
|
45
|
+
# Whether to include full schedule elements in the tripDetails section. Defaults
|
46
|
+
# to false.
|
41
47
|
sig { returns(T.nilable(T::Boolean)) }
|
42
48
|
def include_schedule
|
43
49
|
end
|
@@ -46,6 +52,8 @@ module OnebusawaySDK
|
|
46
52
|
def include_schedule=(_)
|
47
53
|
end
|
48
54
|
|
55
|
+
# Whether to include full trip elements in the references section. Defaults to
|
56
|
+
# false.
|
49
57
|
sig { returns(T.nilable(T::Boolean)) }
|
50
58
|
def include_trip
|
51
59
|
end
|
@@ -54,6 +62,7 @@ module OnebusawaySDK
|
|
54
62
|
def include_trip=(_)
|
55
63
|
end
|
56
64
|
|
65
|
+
# Specific time for the query. Defaults to the current time.
|
57
66
|
sig { returns(T.nilable(Integer)) }
|
58
67
|
def time
|
59
68
|
end
|
@@ -73,18 +82,9 @@ module OnebusawaySDK
|
|
73
82
|
time: Integer,
|
74
83
|
request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
|
75
84
|
)
|
76
|
-
.
|
77
|
-
end
|
78
|
-
def
|
79
|
-
lat:,
|
80
|
-
lat_span:,
|
81
|
-
lon:,
|
82
|
-
lon_span:,
|
83
|
-
include_schedule: nil,
|
84
|
-
include_trip: nil,
|
85
|
-
time: nil,
|
86
|
-
request_options: {}
|
87
|
-
)
|
85
|
+
.returns(T.attached_class)
|
86
|
+
end
|
87
|
+
def self.new(lat:, lat_span:, lon:, lon_span:, include_schedule: nil, include_trip: nil, time: nil, request_options: {})
|
88
88
|
end
|
89
89
|
|
90
90
|
sig do
|