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::ArrivalAndDepartureRetrieveResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::Data}) }
|
@@ -47,9 +47,9 @@ module OnebusawaySDK
|
|
47
47
|
entry: OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::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
|
@@ -65,6 +65,7 @@ module OnebusawaySDK
|
|
65
65
|
end
|
66
66
|
|
67
67
|
class Entry < OnebusawaySDK::BaseModel
|
68
|
+
# Indicates if riders can arrive on this transit vehicle.
|
68
69
|
sig { returns(T::Boolean) }
|
69
70
|
def arrival_enabled
|
70
71
|
end
|
@@ -73,6 +74,7 @@ module OnebusawaySDK
|
|
73
74
|
def arrival_enabled=(_)
|
74
75
|
end
|
75
76
|
|
77
|
+
# Index of this arrival’s trip into the sequence of trips for the active block.
|
76
78
|
sig { returns(Integer) }
|
77
79
|
def block_trip_sequence
|
78
80
|
end
|
@@ -81,6 +83,7 @@ module OnebusawaySDK
|
|
81
83
|
def block_trip_sequence=(_)
|
82
84
|
end
|
83
85
|
|
86
|
+
# Indicates if riders can depart from this transit vehicle.
|
84
87
|
sig { returns(T::Boolean) }
|
85
88
|
def departure_enabled
|
86
89
|
end
|
@@ -89,6 +92,8 @@ module OnebusawaySDK
|
|
89
92
|
def departure_enabled=(_)
|
90
93
|
end
|
91
94
|
|
95
|
+
# Number of stops between the arriving transit vehicle and the current stop
|
96
|
+
# (excluding the current stop).
|
92
97
|
sig { returns(Integer) }
|
93
98
|
def number_of_stops_away
|
94
99
|
end
|
@@ -97,6 +102,8 @@ module OnebusawaySDK
|
|
97
102
|
def number_of_stops_away=(_)
|
98
103
|
end
|
99
104
|
|
105
|
+
# Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time
|
106
|
+
# available).
|
100
107
|
sig { returns(Integer) }
|
101
108
|
def predicted_arrival_time
|
102
109
|
end
|
@@ -105,6 +112,8 @@ module OnebusawaySDK
|
|
105
112
|
def predicted_arrival_time=(_)
|
106
113
|
end
|
107
114
|
|
115
|
+
# Predicted departure time, in milliseconds since Unix epoch (zero if no real-time
|
116
|
+
# available).
|
108
117
|
sig { returns(Integer) }
|
109
118
|
def predicted_departure_time
|
110
119
|
end
|
@@ -113,6 +122,7 @@ module OnebusawaySDK
|
|
113
122
|
def predicted_departure_time=(_)
|
114
123
|
end
|
115
124
|
|
125
|
+
# The ID of the route for the arriving vehicle.
|
116
126
|
sig { returns(String) }
|
117
127
|
def route_id
|
118
128
|
end
|
@@ -121,6 +131,7 @@ module OnebusawaySDK
|
|
121
131
|
def route_id=(_)
|
122
132
|
end
|
123
133
|
|
134
|
+
# Scheduled arrival time, in milliseconds since Unix epoch.
|
124
135
|
sig { returns(Integer) }
|
125
136
|
def scheduled_arrival_time
|
126
137
|
end
|
@@ -129,6 +140,7 @@ module OnebusawaySDK
|
|
129
140
|
def scheduled_arrival_time=(_)
|
130
141
|
end
|
131
142
|
|
143
|
+
# Scheduled departure time, in milliseconds since Unix epoch.
|
132
144
|
sig { returns(Integer) }
|
133
145
|
def scheduled_departure_time
|
134
146
|
end
|
@@ -137,6 +149,8 @@ module OnebusawaySDK
|
|
137
149
|
def scheduled_departure_time=(_)
|
138
150
|
end
|
139
151
|
|
152
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
153
|
+
# service date for the trip.
|
140
154
|
sig { returns(Integer) }
|
141
155
|
def service_date
|
142
156
|
end
|
@@ -145,6 +159,7 @@ module OnebusawaySDK
|
|
145
159
|
def service_date=(_)
|
146
160
|
end
|
147
161
|
|
162
|
+
# The ID of the stop the vehicle is arriving at.
|
148
163
|
sig { returns(String) }
|
149
164
|
def stop_id
|
150
165
|
end
|
@@ -153,6 +168,8 @@ module OnebusawaySDK
|
|
153
168
|
def stop_id=(_)
|
154
169
|
end
|
155
170
|
|
171
|
+
# Index of the stop into the sequence of stops that make up the trip for this
|
172
|
+
# arrival.
|
156
173
|
sig { returns(Integer) }
|
157
174
|
def stop_sequence
|
158
175
|
end
|
@@ -161,6 +178,7 @@ module OnebusawaySDK
|
|
161
178
|
def stop_sequence=(_)
|
162
179
|
end
|
163
180
|
|
181
|
+
# Total number of stops visited on the trip for this arrival.
|
164
182
|
sig { returns(Integer) }
|
165
183
|
def total_stops_in_trip
|
166
184
|
end
|
@@ -169,6 +187,8 @@ module OnebusawaySDK
|
|
169
187
|
def total_stops_in_trip=(_)
|
170
188
|
end
|
171
189
|
|
190
|
+
# Optional trip headsign that potentially overrides the trip headsign in the
|
191
|
+
# referenced trip element.
|
172
192
|
sig { returns(String) }
|
173
193
|
def trip_headsign
|
174
194
|
end
|
@@ -177,6 +197,7 @@ module OnebusawaySDK
|
|
177
197
|
def trip_headsign=(_)
|
178
198
|
end
|
179
199
|
|
200
|
+
# The ID of the trip for the arriving vehicle.
|
180
201
|
sig { returns(String) }
|
181
202
|
def trip_id
|
182
203
|
end
|
@@ -185,6 +206,7 @@ module OnebusawaySDK
|
|
185
206
|
def trip_id=(_)
|
186
207
|
end
|
187
208
|
|
209
|
+
# ID of the transit vehicle serving this trip.
|
188
210
|
sig { returns(String) }
|
189
211
|
def vehicle_id
|
190
212
|
end
|
@@ -193,6 +215,7 @@ module OnebusawaySDK
|
|
193
215
|
def vehicle_id=(_)
|
194
216
|
end
|
195
217
|
|
218
|
+
# The actual track information of the arriving transit vehicle.
|
196
219
|
sig { returns(T.nilable(String)) }
|
197
220
|
def actual_track
|
198
221
|
end
|
@@ -201,6 +224,7 @@ module OnebusawaySDK
|
|
201
224
|
def actual_track=(_)
|
202
225
|
end
|
203
226
|
|
227
|
+
# Distance of the arriving transit vehicle from the stop, in meters.
|
204
228
|
sig { returns(T.nilable(Float)) }
|
205
229
|
def distance_from_stop
|
206
230
|
end
|
@@ -209,6 +233,7 @@ module OnebusawaySDK
|
|
209
233
|
def distance_from_stop=(_)
|
210
234
|
end
|
211
235
|
|
236
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
212
237
|
sig { returns(T.nilable(String)) }
|
213
238
|
def frequency
|
214
239
|
end
|
@@ -217,6 +242,7 @@ module OnebusawaySDK
|
|
217
242
|
def frequency=(_)
|
218
243
|
end
|
219
244
|
|
245
|
+
# Historical occupancy information of the transit vehicle.
|
220
246
|
sig { returns(T.nilable(String)) }
|
221
247
|
def historical_occupancy
|
222
248
|
end
|
@@ -225,6 +251,7 @@ module OnebusawaySDK
|
|
225
251
|
def historical_occupancy=(_)
|
226
252
|
end
|
227
253
|
|
254
|
+
# Timestamp of the last update time for this arrival.
|
228
255
|
sig { returns(T.nilable(Integer)) }
|
229
256
|
def last_update_time
|
230
257
|
end
|
@@ -233,6 +260,7 @@ module OnebusawaySDK
|
|
233
260
|
def last_update_time=(_)
|
234
261
|
end
|
235
262
|
|
263
|
+
# Current occupancy status of the transit vehicle.
|
236
264
|
sig { returns(T.nilable(String)) }
|
237
265
|
def occupancy_status
|
238
266
|
end
|
@@ -241,6 +269,7 @@ module OnebusawaySDK
|
|
241
269
|
def occupancy_status=(_)
|
242
270
|
end
|
243
271
|
|
272
|
+
# Indicates if real-time arrival info is available for this trip.
|
244
273
|
sig { returns(T.nilable(T::Boolean)) }
|
245
274
|
def predicted
|
246
275
|
end
|
@@ -249,6 +278,7 @@ module OnebusawaySDK
|
|
249
278
|
def predicted=(_)
|
250
279
|
end
|
251
280
|
|
281
|
+
# Interval for predicted arrival time, if available.
|
252
282
|
sig { returns(T.nilable(String)) }
|
253
283
|
def predicted_arrival_interval
|
254
284
|
end
|
@@ -257,6 +287,7 @@ module OnebusawaySDK
|
|
257
287
|
def predicted_arrival_interval=(_)
|
258
288
|
end
|
259
289
|
|
290
|
+
# Interval for predicted departure time, if available.
|
260
291
|
sig { returns(T.nilable(String)) }
|
261
292
|
def predicted_departure_interval
|
262
293
|
end
|
@@ -265,6 +296,7 @@ module OnebusawaySDK
|
|
265
296
|
def predicted_departure_interval=(_)
|
266
297
|
end
|
267
298
|
|
299
|
+
# Predicted occupancy status of the transit vehicle.
|
268
300
|
sig { returns(T.nilable(String)) }
|
269
301
|
def predicted_occupancy
|
270
302
|
end
|
@@ -273,6 +305,8 @@ module OnebusawaySDK
|
|
273
305
|
def predicted_occupancy=(_)
|
274
306
|
end
|
275
307
|
|
308
|
+
# Optional route long name that potentially overrides the route long name in the
|
309
|
+
# referenced route element.
|
276
310
|
sig { returns(T.nilable(String)) }
|
277
311
|
def route_long_name
|
278
312
|
end
|
@@ -281,6 +315,8 @@ module OnebusawaySDK
|
|
281
315
|
def route_long_name=(_)
|
282
316
|
end
|
283
317
|
|
318
|
+
# Optional route short name that potentially overrides the route short name in the
|
319
|
+
# referenced route element.
|
284
320
|
sig { returns(T.nilable(String)) }
|
285
321
|
def route_short_name
|
286
322
|
end
|
@@ -289,6 +325,7 @@ module OnebusawaySDK
|
|
289
325
|
def route_short_name=(_)
|
290
326
|
end
|
291
327
|
|
328
|
+
# Interval for scheduled arrival time.
|
292
329
|
sig { returns(T.nilable(String)) }
|
293
330
|
def scheduled_arrival_interval
|
294
331
|
end
|
@@ -297,6 +334,7 @@ module OnebusawaySDK
|
|
297
334
|
def scheduled_arrival_interval=(_)
|
298
335
|
end
|
299
336
|
|
337
|
+
# Interval for scheduled departure time.
|
300
338
|
sig { returns(T.nilable(String)) }
|
301
339
|
def scheduled_departure_interval
|
302
340
|
end
|
@@ -305,6 +343,7 @@ module OnebusawaySDK
|
|
305
343
|
def scheduled_departure_interval=(_)
|
306
344
|
end
|
307
345
|
|
346
|
+
# Scheduled track information of the arriving transit vehicle.
|
308
347
|
sig { returns(T.nilable(String)) }
|
309
348
|
def scheduled_track
|
310
349
|
end
|
@@ -313,6 +352,7 @@ module OnebusawaySDK
|
|
313
352
|
def scheduled_track=(_)
|
314
353
|
end
|
315
354
|
|
355
|
+
# References to situation elements (if any) applicable to this arrival.
|
316
356
|
sig { returns(T.nilable(T::Array[String])) }
|
317
357
|
def situation_ids
|
318
358
|
end
|
@@ -321,6 +361,7 @@ module OnebusawaySDK
|
|
321
361
|
def situation_ids=(_)
|
322
362
|
end
|
323
363
|
|
364
|
+
# Current status of the arrival.
|
324
365
|
sig { returns(T.nilable(String)) }
|
325
366
|
def status
|
326
367
|
end
|
@@ -329,6 +370,7 @@ module OnebusawaySDK
|
|
329
370
|
def status=(_)
|
330
371
|
end
|
331
372
|
|
373
|
+
# Trip-specific status for the arriving transit vehicle.
|
332
374
|
sig { returns(T.nilable(OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::Data::Entry::TripStatus)) }
|
333
375
|
def trip_status
|
334
376
|
end
|
@@ -377,9 +419,9 @@ module OnebusawaySDK
|
|
377
419
|
status: String,
|
378
420
|
trip_status: OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::Data::Entry::TripStatus
|
379
421
|
)
|
380
|
-
.
|
422
|
+
.returns(T.attached_class)
|
381
423
|
end
|
382
|
-
def
|
424
|
+
def self.new(
|
383
425
|
arrival_enabled:,
|
384
426
|
block_trip_sequence:,
|
385
427
|
departure_enabled:,
|
@@ -462,6 +504,7 @@ module OnebusawaySDK
|
|
462
504
|
end
|
463
505
|
|
464
506
|
class TripStatus < OnebusawaySDK::BaseModel
|
507
|
+
# Trip ID of the trip the vehicle is actively serving.
|
465
508
|
sig { returns(String) }
|
466
509
|
def active_trip_id
|
467
510
|
end
|
@@ -470,6 +513,7 @@ module OnebusawaySDK
|
|
470
513
|
def active_trip_id=(_)
|
471
514
|
end
|
472
515
|
|
516
|
+
# Index of the active trip into the sequence of trips for the active block.
|
473
517
|
sig { returns(Integer) }
|
474
518
|
def block_trip_sequence
|
475
519
|
end
|
@@ -478,6 +522,7 @@ module OnebusawaySDK
|
|
478
522
|
def block_trip_sequence=(_)
|
479
523
|
end
|
480
524
|
|
525
|
+
# ID of the closest stop to the current location of the transit vehicle.
|
481
526
|
sig { returns(String) }
|
482
527
|
def closest_stop
|
483
528
|
end
|
@@ -486,6 +531,7 @@ module OnebusawaySDK
|
|
486
531
|
def closest_stop=(_)
|
487
532
|
end
|
488
533
|
|
534
|
+
# Distance, in meters, the transit vehicle has progressed along the active trip.
|
489
535
|
sig { returns(Float) }
|
490
536
|
def distance_along_trip
|
491
537
|
end
|
@@ -494,6 +540,8 @@ module OnebusawaySDK
|
|
494
540
|
def distance_along_trip=(_)
|
495
541
|
end
|
496
542
|
|
543
|
+
# Last known distance along the trip received in real-time from the transit
|
544
|
+
# vehicle.
|
497
545
|
sig { returns(Float) }
|
498
546
|
def last_known_distance_along_trip
|
499
547
|
end
|
@@ -502,6 +550,7 @@ module OnebusawaySDK
|
|
502
550
|
def last_known_distance_along_trip=(_)
|
503
551
|
end
|
504
552
|
|
553
|
+
# Timestamp of the last known real-time location update from the transit vehicle.
|
505
554
|
sig { returns(Integer) }
|
506
555
|
def last_location_update_time
|
507
556
|
end
|
@@ -510,6 +559,7 @@ module OnebusawaySDK
|
|
510
559
|
def last_location_update_time=(_)
|
511
560
|
end
|
512
561
|
|
562
|
+
# Timestamp of the last known real-time update from the transit vehicle.
|
513
563
|
sig { returns(Integer) }
|
514
564
|
def last_update_time
|
515
565
|
end
|
@@ -518,6 +568,7 @@ module OnebusawaySDK
|
|
518
568
|
def last_update_time=(_)
|
519
569
|
end
|
520
570
|
|
571
|
+
# Capacity of the transit vehicle in terms of occupancy.
|
521
572
|
sig { returns(Integer) }
|
522
573
|
def occupancy_capacity
|
523
574
|
end
|
@@ -526,6 +577,7 @@ module OnebusawaySDK
|
|
526
577
|
def occupancy_capacity=(_)
|
527
578
|
end
|
528
579
|
|
580
|
+
# Current count of occupants in the transit vehicle.
|
529
581
|
sig { returns(Integer) }
|
530
582
|
def occupancy_count
|
531
583
|
end
|
@@ -534,6 +586,7 @@ module OnebusawaySDK
|
|
534
586
|
def occupancy_count=(_)
|
535
587
|
end
|
536
588
|
|
589
|
+
# Current occupancy status of the transit vehicle.
|
537
590
|
sig { returns(String) }
|
538
591
|
def occupancy_status
|
539
592
|
end
|
@@ -542,6 +595,7 @@ module OnebusawaySDK
|
|
542
595
|
def occupancy_status=(_)
|
543
596
|
end
|
544
597
|
|
598
|
+
# Current journey phase of the trip.
|
545
599
|
sig { returns(String) }
|
546
600
|
def phase
|
547
601
|
end
|
@@ -550,6 +604,7 @@ module OnebusawaySDK
|
|
550
604
|
def phase=(_)
|
551
605
|
end
|
552
606
|
|
607
|
+
# Indicates if real-time arrival info is available for this trip.
|
553
608
|
sig { returns(T::Boolean) }
|
554
609
|
def predicted
|
555
610
|
end
|
@@ -558,6 +613,7 @@ module OnebusawaySDK
|
|
558
613
|
def predicted=(_)
|
559
614
|
end
|
560
615
|
|
616
|
+
# Deviation from the schedule in seconds (positive for late, negative for early).
|
561
617
|
sig { returns(Integer) }
|
562
618
|
def schedule_deviation
|
563
619
|
end
|
@@ -566,6 +622,8 @@ module OnebusawaySDK
|
|
566
622
|
def schedule_deviation=(_)
|
567
623
|
end
|
568
624
|
|
625
|
+
# Time, in milliseconds since the Unix epoch, of midnight for the start of the
|
626
|
+
# service date for the trip.
|
569
627
|
sig { returns(Integer) }
|
570
628
|
def service_date
|
571
629
|
end
|
@@ -574,6 +632,7 @@ module OnebusawaySDK
|
|
574
632
|
def service_date=(_)
|
575
633
|
end
|
576
634
|
|
635
|
+
# Current status modifiers for the trip.
|
577
636
|
sig { returns(String) }
|
578
637
|
def status
|
579
638
|
end
|
@@ -582,6 +641,7 @@ module OnebusawaySDK
|
|
582
641
|
def status=(_)
|
583
642
|
end
|
584
643
|
|
644
|
+
# Total length of the trip, in meters.
|
585
645
|
sig { returns(Float) }
|
586
646
|
def total_distance_along_trip
|
587
647
|
end
|
@@ -590,6 +650,8 @@ module OnebusawaySDK
|
|
590
650
|
def total_distance_along_trip=(_)
|
591
651
|
end
|
592
652
|
|
653
|
+
# Time offset from the closest stop to the current position of the transit vehicle
|
654
|
+
# (in seconds).
|
593
655
|
sig { returns(T.nilable(Integer)) }
|
594
656
|
def closest_stop_time_offset
|
595
657
|
end
|
@@ -598,6 +660,7 @@ module OnebusawaySDK
|
|
598
660
|
def closest_stop_time_offset=(_)
|
599
661
|
end
|
600
662
|
|
663
|
+
# Information about frequency-based scheduling, if applicable to the trip.
|
601
664
|
sig { returns(T.nilable(String)) }
|
602
665
|
def frequency
|
603
666
|
end
|
@@ -606,6 +669,7 @@ module OnebusawaySDK
|
|
606
669
|
def frequency=(_)
|
607
670
|
end
|
608
671
|
|
672
|
+
# Last known location of the transit vehicle.
|
609
673
|
sig do
|
610
674
|
returns(
|
611
675
|
T.nilable(
|
@@ -627,6 +691,7 @@ module OnebusawaySDK
|
|
627
691
|
def last_known_location=(_)
|
628
692
|
end
|
629
693
|
|
694
|
+
# Last known orientation value received in real-time from the transit vehicle.
|
630
695
|
sig { returns(T.nilable(Float)) }
|
631
696
|
def last_known_orientation
|
632
697
|
end
|
@@ -635,6 +700,7 @@ module OnebusawaySDK
|
|
635
700
|
def last_known_orientation=(_)
|
636
701
|
end
|
637
702
|
|
703
|
+
# ID of the next stop the transit vehicle is scheduled to arrive at.
|
638
704
|
sig { returns(T.nilable(String)) }
|
639
705
|
def next_stop
|
640
706
|
end
|
@@ -643,6 +709,8 @@ module OnebusawaySDK
|
|
643
709
|
def next_stop=(_)
|
644
710
|
end
|
645
711
|
|
712
|
+
# Time offset from the next stop to the current position of the transit vehicle
|
713
|
+
# (in seconds).
|
646
714
|
sig { returns(T.nilable(Integer)) }
|
647
715
|
def next_stop_time_offset
|
648
716
|
end
|
@@ -651,6 +719,7 @@ module OnebusawaySDK
|
|
651
719
|
def next_stop_time_offset=(_)
|
652
720
|
end
|
653
721
|
|
722
|
+
# Orientation of the transit vehicle, represented as an angle in degrees.
|
654
723
|
sig { returns(T.nilable(Float)) }
|
655
724
|
def orientation
|
656
725
|
end
|
@@ -659,6 +728,7 @@ module OnebusawaySDK
|
|
659
728
|
def orientation=(_)
|
660
729
|
end
|
661
730
|
|
731
|
+
# Current position of the transit vehicle.
|
662
732
|
sig do
|
663
733
|
returns(
|
664
734
|
T.nilable(OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::Data::Entry::TripStatus::Position)
|
@@ -674,6 +744,8 @@ module OnebusawaySDK
|
|
674
744
|
def position=(_)
|
675
745
|
end
|
676
746
|
|
747
|
+
# Distance, in meters, the transit vehicle is scheduled to have progressed along
|
748
|
+
# the active trip.
|
677
749
|
sig { returns(T.nilable(Float)) }
|
678
750
|
def scheduled_distance_along_trip
|
679
751
|
end
|
@@ -682,6 +754,7 @@ module OnebusawaySDK
|
|
682
754
|
def scheduled_distance_along_trip=(_)
|
683
755
|
end
|
684
756
|
|
757
|
+
# References to situation elements (if any) applicable to this trip.
|
685
758
|
sig { returns(T.nilable(T::Array[String])) }
|
686
759
|
def situation_ids
|
687
760
|
end
|
@@ -690,6 +763,7 @@ module OnebusawaySDK
|
|
690
763
|
def situation_ids=(_)
|
691
764
|
end
|
692
765
|
|
766
|
+
# ID of the transit vehicle currently serving the trip.
|
693
767
|
sig { returns(T.nilable(String)) }
|
694
768
|
def vehicle_id
|
695
769
|
end
|
@@ -698,6 +772,7 @@ module OnebusawaySDK
|
|
698
772
|
def vehicle_id=(_)
|
699
773
|
end
|
700
774
|
|
775
|
+
# Trip-specific status for the arriving transit vehicle.
|
701
776
|
sig do
|
702
777
|
params(
|
703
778
|
active_trip_id: String,
|
@@ -728,9 +803,9 @@ module OnebusawaySDK
|
|
728
803
|
situation_ids: T::Array[String],
|
729
804
|
vehicle_id: String
|
730
805
|
)
|
731
|
-
.
|
806
|
+
.returns(T.attached_class)
|
732
807
|
end
|
733
|
-
def
|
808
|
+
def self.new(
|
734
809
|
active_trip_id:,
|
735
810
|
block_trip_sequence:,
|
736
811
|
closest_stop:,
|
@@ -799,6 +874,7 @@ module OnebusawaySDK
|
|
799
874
|
end
|
800
875
|
|
801
876
|
class LastKnownLocation < OnebusawaySDK::BaseModel
|
877
|
+
# Latitude of the last known location of the transit vehicle.
|
802
878
|
sig { returns(T.nilable(Float)) }
|
803
879
|
def lat
|
804
880
|
end
|
@@ -807,6 +883,7 @@ module OnebusawaySDK
|
|
807
883
|
def lat=(_)
|
808
884
|
end
|
809
885
|
|
886
|
+
# Longitude of the last known location of the transit vehicle.
|
810
887
|
sig { returns(T.nilable(Float)) }
|
811
888
|
def lon
|
812
889
|
end
|
@@ -815,8 +892,9 @@ module OnebusawaySDK
|
|
815
892
|
def lon=(_)
|
816
893
|
end
|
817
894
|
|
818
|
-
|
819
|
-
|
895
|
+
# Last known location of the transit vehicle.
|
896
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
897
|
+
def self.new(lat: nil, lon: nil)
|
820
898
|
end
|
821
899
|
|
822
900
|
sig { override.returns({lat: Float, lon: Float}) }
|
@@ -825,6 +903,7 @@ module OnebusawaySDK
|
|
825
903
|
end
|
826
904
|
|
827
905
|
class Position < OnebusawaySDK::BaseModel
|
906
|
+
# Latitude of the current position of the transit vehicle.
|
828
907
|
sig { returns(T.nilable(Float)) }
|
829
908
|
def lat
|
830
909
|
end
|
@@ -833,6 +912,7 @@ module OnebusawaySDK
|
|
833
912
|
def lat=(_)
|
834
913
|
end
|
835
914
|
|
915
|
+
# Longitude of the current position of the transit vehicle.
|
836
916
|
sig { returns(T.nilable(Float)) }
|
837
917
|
def lon
|
838
918
|
end
|
@@ -841,8 +921,9 @@ module OnebusawaySDK
|
|
841
921
|
def lon=(_)
|
842
922
|
end
|
843
923
|
|
844
|
-
|
845
|
-
|
924
|
+
# Current position of the transit vehicle.
|
925
|
+
sig { params(lat: Float, lon: Float).returns(T.attached_class) }
|
926
|
+
def self.new(lat: nil, lon: nil)
|
846
927
|
end
|
847
928
|
|
848
929
|
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::BlockRetrieveResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::BlockRetrieveResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::BlockRetrieveResponse::Data}) }
|
@@ -47,9 +47,9 @@ module OnebusawaySDK
|
|
47
47
|
entry: OnebusawaySDK::Models::BlockRetrieveResponse::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
|
@@ -89,9 +89,9 @@ module OnebusawaySDK
|
|
89
89
|
id: String,
|
90
90
|
configurations: T::Array[OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration]
|
91
91
|
)
|
92
|
-
.
|
92
|
+
.returns(T.attached_class)
|
93
93
|
end
|
94
|
-
def
|
94
|
+
def self.new(id:, configurations:)
|
95
95
|
end
|
96
96
|
|
97
97
|
sig do
|
@@ -140,9 +140,9 @@ module OnebusawaySDK
|
|
140
140
|
trips: T::Array[OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip],
|
141
141
|
inactive_service_ids: T::Array[String]
|
142
142
|
)
|
143
|
-
.
|
143
|
+
.returns(T.attached_class)
|
144
144
|
end
|
145
|
-
def
|
145
|
+
def self.new(active_service_ids:, trips:, inactive_service_ids: nil)
|
146
146
|
end
|
147
147
|
|
148
148
|
sig do
|
@@ -209,9 +209,9 @@ module OnebusawaySDK
|
|
209
209
|
distance_along_block: Float,
|
210
210
|
trip_id: String
|
211
211
|
)
|
212
|
-
.
|
212
|
+
.returns(T.attached_class)
|
213
213
|
end
|
214
|
-
def
|
214
|
+
def self.new(accumulated_slack_time:, block_stop_times:, distance_along_block:, trip_id:)
|
215
215
|
end
|
216
216
|
|
217
217
|
sig do
|
@@ -279,9 +279,9 @@ module OnebusawaySDK
|
|
279
279
|
distance_along_block: Float,
|
280
280
|
stop_time: OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime::StopTime
|
281
281
|
)
|
282
|
-
.
|
282
|
+
.returns(T.attached_class)
|
283
283
|
end
|
284
|
-
def
|
284
|
+
def self.new(accumulated_slack_time:, block_sequence:, distance_along_block:, stop_time:)
|
285
285
|
end
|
286
286
|
|
287
287
|
sig do
|
@@ -347,15 +347,9 @@ module OnebusawaySDK
|
|
347
347
|
drop_off_type: Integer,
|
348
348
|
pickup_type: Integer
|
349
349
|
)
|
350
|
-
.
|
350
|
+
.returns(T.attached_class)
|
351
351
|
end
|
352
|
-
def
|
353
|
-
arrival_time:,
|
354
|
-
departure_time:,
|
355
|
-
stop_id:,
|
356
|
-
drop_off_type: nil,
|
357
|
-
pickup_type: nil
|
358
|
-
)
|
352
|
+
def self.new(arrival_time:, departure_time:, stop_id:, drop_off_type: nil, pickup_type: nil)
|
359
353
|
end
|
360
354
|
|
361
355
|
sig do
|
@@ -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}) }
|