mirror of
https://github.com/tonytins/amtkstat.git
synced 2026-10-24 05:32:54 -04:00
Added handling for stale trains
- Renamed TrainLateness to LateTrain
This commit is contained in:
parent
e0077ec13b
commit
f8eef909d2
5 changed files with 72 additions and 17 deletions
|
|
@ -27,6 +27,10 @@ struct AmtrakClient {
|
|||
func fetchAllTrains() async throws -> TrainResponse {
|
||||
try await get(trainsBaseURL)
|
||||
}
|
||||
|
||||
func fetchStaleStatus() async throws -> StaleData {
|
||||
try await get(staleBaseURL)
|
||||
}
|
||||
|
||||
func fetchAllTrainStatus(num trainNum: String) async throws -> [Train] {
|
||||
let reponse = try await fetchTrain(number: trainNum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue