Package com.cta4j.train.arrival
Interface ArrivalsApi
@NullMarked
public interface ArrivalsApi
Provides access to arrival-related endpoints of the CTA Train Tracker API.
This API allows retrieval of arrival information by map ID or stop ID.
-
Method Summary
Modifier and TypeMethodDescriptionfindByMapId(MapArrivalQuery query) Retrieves arrival information by map ID.findByMapId(String mapId) Retrieves arrival information by map ID.findByStopId(StopArrivalQuery query) Retrieves arrival information by stop ID.findByStopId(String stopId) Retrieves arrival information by stop ID.
-
Method Details
-
findByMapId
Retrieves arrival information by map ID.- Parameters:
query- the query parameters for fetching arrival information by map ID- Returns:
- a
ListofArrivals corresponding to the provided map ID, or an emptyListif no arrivals are found - Throws:
NullPointerException- ifqueryisnull
-
findByStopId
Retrieves arrival information by stop ID.- Parameters:
query- the query parameters for fetching arrival information by stop ID- Returns:
- a
ListofArrivals corresponding to the provided stop ID, or an emptyListif no arrivals are found - Throws:
NullPointerException- ifqueryisnull
-
findByMapId
Retrieves arrival information by map ID.- Parameters:
mapId- the map ID- Returns:
- a
ListofArrivals corresponding to the provided map ID, or an emptyListif no arrivals are found - Throws:
NullPointerException- ifmapIdisnull
-
findByStopId
Retrieves arrival information by stop ID.- Parameters:
stopId- the stop ID- Returns:
- a
ListofArrivals corresponding to the provided stop ID, or an emptyListif no arrivals are found - Throws:
NullPointerException- ifstopIdisnull
-