Interface LocationsApi


@NullMarked public interface LocationsApi
Provides access to location-related endpoints of the CTA Train Tracker API.

This API allows retrieval of train locations by line.

  • Method Details

    • findByLines

      List<TrainLocations> findByLines(List<TrainLine> lines)
      Retrieves train locations for the specified lines.
      Parameters:
      lines - a List of TrainLines to filter the train locations by
      Returns:
      a List of TrainLocations corresponding to the provided lines, or an empty List if no train locations are found for the specified lines
    • findByLine

      default List<TrainLocations> findByLine(TrainLine line)
      Retrieves train locations for the specified line.
      Parameters:
      line - the TrainLine to filter the train locations by
      Returns:
      a List of TrainLocations corresponding to the provided line, or an empty List if no train locations are found for the specified line
    • findAll

      default List<TrainLocations> findAll()
      Retrieves train locations for all lines.
      Returns:
      a List of TrainLocations for all lines, or an empty List if no train locations are found