Package com.cta4j.bus.detour
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 Summary
Modifier and TypeMethodDescriptionfindByRouteId(String routeId) Retrieves all active detours for the specified route ID.findByRouteIdAndDirection(String routeId, String direction) Retrieves all active detours for the specified route ID and direction.list()Retrieves all active detours.
-
Method Details
-
list
Retrieves all active detours. -
findByRouteId
Retrieves all active detours for the specified route ID.- Parameters:
routeId- the route ID- Returns:
- a
ListofDetours associated with the route ID, or an emptyListif no detours exist for the route ID - Throws:
NullPointerException- ifrouteIdisnull
-
findByRouteIdAndDirection
Retrieves all active detours for the specified route ID and direction.- Parameters:
routeId- the route IDdirection- the travel direction (e.g. Northbound, Southbound)- Returns:
- a
ListofDetours associated with the route ID and direction, or an emptyListif no detours exist for the route ID and direction - Throws:
NullPointerException- ifrouteIdordirectionisnull
-