VehicleOccupancy

public enum VehicleOccupancy : String, Codable, Hashable

Representation of real-time occupancy information for public transport

  • Declaration

    Swift

    case unknown = "UNKNOWN"
  • Declaration

    Swift

    case empty = "EMPTY"
  • Declaration

    Swift

    case manySeatsAvailable = "MANY_SEATS_AVAILABLE"
  • Declaration

    Swift

    case fewSeatsAvailable = "FEW_SEATS_AVAILABLE"
  • Declaration

    Swift

    case standingRoomOnly = "STANDING_ROOM_ONLY"
  • Declaration

    Swift

    case crushedStandingRoomOnly = "CRUSHED_STANDING_ROOM_ONLY"
  • Declaration

    Swift

    case full = "FULL"
  • Declaration

    Swift

    case notAcceptingPassengers = "NOT_ACCEPTING_PASSENGERS"
  • Declaration

    Swift

    public static func average(in all: [[TKAPI.VehicleComponents]]?) -> (TKAPI.VehicleOccupancy, title: String)?

    Parameters

    all

    Nested vehicle components

    Return Value

    Average occupancy in the provided nested list of vehicle components, nil if no occupancy found.

  • Declaration

    Swift

    public var color: TKColor? { get }
  • Declaration

    Swift

    public var localizedTitle: String { get }

Real-time vehicles