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 Details

    • findByMapId

      List<Arrival> findByMapId(MapArrivalQuery query)
      Retrieves arrival information by map ID.
      Parameters:
      query - the query parameters for fetching arrival information by map ID
      Returns:
      a List of Arrivals corresponding to the provided map ID, or an empty List if no arrivals are found
      Throws:
      NullPointerException - if query is null
    • findByStopId

      List<Arrival> findByStopId(StopArrivalQuery query)
      Retrieves arrival information by stop ID.
      Parameters:
      query - the query parameters for fetching arrival information by stop ID
      Returns:
      a List of Arrivals corresponding to the provided stop ID, or an empty List if no arrivals are found
      Throws:
      NullPointerException - if query is null
    • findByMapId

      default List<Arrival> findByMapId(String mapId)
      Retrieves arrival information by map ID.
      Parameters:
      mapId - the map ID
      Returns:
      a List of Arrivals corresponding to the provided map ID, or an empty List if no arrivals are found
      Throws:
      NullPointerException - if mapId is null
    • findByStopId

      default List<Arrival> findByStopId(String stopId)
      Retrieves arrival information by stop ID.
      Parameters:
      stopId - the stop ID
      Returns:
      a List of Arrivals corresponding to the provided stop ID, or an empty List if no arrivals are found
      Throws:
      NullPointerException - if stopId is null