-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* List and search routes - Adds `TKRouteAutocompleter` to search for routes - Adds `TKBuzzInfoProvider.fetchRoutes` to fetch a list of routes Related refactoring to allow `TKAutocompletion` to return something that can't be turned into an `MKAnnotation`. Updated TripKitUIExample to use the new `TKRouteAutocompleter`. * Add routes, availableRoutes and operators to TKStopCoordinate
- Loading branch information
Showing
35 changed files
with
402 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// RouteAPIModel.swift | ||
// TripKit | ||
// | ||
// Created by Adrian Schönig on 27/10/2022. | ||
// Copyright © 2022 SkedGo Pty Ltd. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
extension TKAPI { | ||
|
||
public struct Route: Codable, Hashable { | ||
public let id: String | ||
|
||
public let routeName: String? | ||
public let routeDescription: String? | ||
public let shortName: String? | ||
private let _routeColor: RGBColor? | ||
|
||
public let operatorID: String? | ||
public let operatorName: String? | ||
|
||
public let modeInfo: TKModeInfo | ||
|
||
@available(*, deprecated, renamed: "shortName") | ||
public var number: String? { shortName } | ||
|
||
@available(*, deprecated, renamed: "routeName") | ||
public var name: String? { routeName } | ||
|
||
public var routeColor: TKColor? { _routeColor?.color } | ||
|
||
/// This color applies to an individual service. | ||
public var color: TKColor? { return routeColor ?? modeInfo.color } | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case id | ||
case routeName | ||
case routeDescription | ||
case shortName | ||
case modeInfo | ||
case _routeColor = "routeColor" | ||
case operatorID = "operatorId" | ||
case operatorName | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.