TKBuzzInfoProvider

public enum TKBuzzInfoProvider

Undocumented

Transit alerts

  • Asynchronously fetches transit alerts for the provided region.

    Declaration

    Swift

    public static func fetchTransitAlerts(for region: TKRegion) async throws -> [TKAPI.AlertMapping]
  • Undocumented

    Declaration

    Swift

    public static func fetchTransitAlerts(forRegion region: TKRegion) async throws -> [TKAPI.AlertMapping]
  • Fetches a list of routes in for the provided region, optionally filtered

    Warning

    Calling this method without any of the filter parameters can result both in a slow, big response due to the large number of routes in certain regions.

    Declaration

    Swift

    public static func fetchRoutes(forRegion region: TKRegion, query: String? = nil, modes: [String] = [], operatorID: String? = nil) async throws -> [TKAPI.Route]

    Parameters

    region

    The region for which to fetch a list of routes

    query

    Optional search string to filter routes by their short name (complete matches only) or by their name (partial matches)

    modes

    If provided, only routes using any of these mode identifiers will be returned, e.g., pt_pub_bus

    operatorID

    If provided, only routes for this operator will be returned

    Return Value

    List of routes

  • Fetches the details and directions of a particular route by its ID

    Declaration

    Swift

    public static func fetchRouteDetails(routeID: String, operatorID: String, region: TKRegion) async throws -> TKAPI.Route

Response data model