fetchStationToStation function

Future<List<StationToStation>> fetchStationToStation(
  1. String apiKey, {
  2. String? startStationCode,
  3. String? destinationStationCode,
})

Fetches the station to station information for the given stations.

apiKey is your API key for the WMATA API.

Omit both parameters to retrieve data for all stations.

Only include the startStationCode to retrieve data for all stations starting at the given station.

Only include the destinationStationCode to retrieve data for all stations ending at the given station.

Implementation

Future<List<StationToStation>> fetchStationToStation(
  String apiKey, {
  String? startStationCode,
  String? destinationStationCode,
}) async =>
    await StationToStationService.fetchStationToStation(
      apiKey,
      startStationCode: startStationCode,
      destinationStationCode: destinationStationCode,
    );