Interface DetoursApi


@NullMarked public interface DetoursApi
Provides access to detour-related endpoints of the CTA BusTime API.

This API allows retrieval of active service detours across all routes, or filtered by route and direction.

  • Method Details

    • list

      List<Detour> list()
      Retrieves all active detours.
      Returns:
      a List of active Detours, or an empty List if no detours are currently active
    • findByRouteId

      List<Detour> findByRouteId(String routeId)
      Retrieves all active detours for the specified route ID.
      Parameters:
      routeId - the route ID
      Returns:
      a List of Detours associated with the route ID, or an empty List if no detours exist for the route ID
      Throws:
      NullPointerException - if routeId is null
    • findByRouteIdAndDirection

      List<Detour> findByRouteIdAndDirection(String routeId, String direction)
      Retrieves all active detours for the specified route ID and direction.
      Parameters:
      routeId - the route ID
      direction - the travel direction (e.g. Northbound, Southbound)
      Returns:
      a List of Detours associated with the route ID and direction, or an empty List if no detours exist for the route ID and direction
      Throws:
      NullPointerException - if routeId or direction is null